{
  "Resources": {
    "testPreprocessorGpSyncHandlerServiceRole236C98CD": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "ManagedPolicyArns": [
          {
            "Fn::Join": [
              "",
              [
                "arn:",
                {
                  "Ref": "AWS::Partition"
                },
                ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
              ]
            ]
          }
        ]
      }
    },
    "testPreprocessorGpSyncHandlerServiceRoleDefaultPolicy436E429E": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "dynamodb:BatchGetItem",
                "dynamodb:GetRecords",
                "dynamodb:GetShardIterator",
                "dynamodb:Query",
                "dynamodb:GetItem",
                "dynamodb:Scan",
                "dynamodb:ConditionCheckItem",
                "dynamodb:BatchWriteItem",
                "dynamodb:PutItem",
                "dynamodb:UpdateItem",
                "dynamodb:DeleteItem",
                "dynamodb:DescribeTable"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Ref": "referencetoallGpTasksTable12B6BF27Arn"
                },
                {
                  "Ref": "AWS::NoValue"
                }
              ]
            },
            {
              "Action": [
                "dynamodb:BatchGetItem",
                "dynamodb:GetRecords",
                "dynamodb:GetShardIterator",
                "dynamodb:Query",
                "dynamodb:GetItem",
                "dynamodb:Scan",
                "dynamodb:ConditionCheckItem",
                "dynamodb:BatchWriteItem",
                "dynamodb:PutItem",
                "dynamodb:UpdateItem",
                "dynamodb:DeleteItem",
                "dynamodb:DescribeTable"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Ref": "referencetoallGpEstimatesTableCE15A663Arn"
                },
                {
                  "Ref": "AWS::NoValue"
                }
              ]
            },
            {
              "Action": [
                "s3:GetObject*",
                "s3:GetBucket*",
                "s3:List*",
                "s3:DeleteObject*",
                "s3:PutObject",
                "s3:PutObjectLegalHold",
                "s3:PutObjectRetention",
                "s3:PutObjectTagging",
                "s3:PutObjectVersionTagging",
                "s3:Abort*"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Ref": "referencetoallGpResultBucketB02A2DF5Arn"
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Ref": "referencetoallGpResultBucketB02A2DF5Arn"
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": [
                "s3:GetObject*",
                "s3:GetBucket*",
                "s3:List*"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Ref": "referencetoallGpDatasetBucket908AF7ACArn"
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Ref": "referencetoallGpDatasetBucket908AF7ACArn"
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "testPreprocessorGpSyncHandlerServiceRoleDefaultPolicy436E429E",
        "Roles": [
          {
            "Ref": "testPreprocessorGpSyncHandlerServiceRole236C98CD"
          }
        ]
      }
    },
    "testPreprocessorGpSyncHandler6EC47FBF": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-west-1"
          },
          "S3Key": "d88c808bb3dd9921bd866d3ee9d064e84424b7431e24c5648f6cacce62af9e57.zip"
        },
        "Description": "Test preprocessor",
        "Environment": {
          "Variables": {
            "TASKS_TABLE": {
              "Ref": "referencetoallGpTasksTable12B6BF27Ref"
            },
            "ESTIMATES_TABLE": {
              "Ref": "referencetoallGpEstimatesTableCE15A663Ref"
            },
            "resultBucketUrl": {
              "Fn::Join": [
                "",
                [
                  "https://s3.us-west-1.",
                  {
                    "Ref": "AWS::URLSuffix"
                  },
                  "/",
                  {
                    "Ref": "referencetoallGpResultBucketB02A2DF5Ref"
                  }
                ]
              ]
            },
            "datasetBucketUrl": {
              "Fn::Join": [
                "",
                [
                  "https://s3.us-west-1.",
                  {
                    "Ref": "AWS::URLSuffix"
                  },
                  "/",
                  {
                    "Ref": "referencetoallGpDatasetBucket908AF7ACRef"
                  }
                ]
              ]
            }
          }
        },
        "FunctionName": "gp-all-sync-testPreprocessor",
        "Handler": "testPreprocessorHandler.handler",
        "MemorySize": 4096,
        "Role": {
          "Fn::GetAtt": [
            "testPreprocessorGpSyncHandlerServiceRole236C98CD",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Timeout": 40
      },
      "DependsOn": [
        "testPreprocessorGpSyncHandlerServiceRoleDefaultPolicy436E429E",
        "testPreprocessorGpSyncHandlerServiceRole236C98CD"
      ]
    },
    "testAsyncGeoprocessorGpAsyncHandlerStartServiceRoleB6E62873": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "ManagedPolicyArns": [
          {
            "Fn::Join": [
              "",
              [
                "arn:",
                {
                  "Ref": "AWS::Partition"
                },
                ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
              ]
            ]
          }
        ]
      }
    },
    "testAsyncGeoprocessorGpAsyncHandlerStartServiceRoleDefaultPolicy83C59B27": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "testAsyncGeoprocessorGpAsyncHandlerRun601CE57C",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "dynamodb:BatchGetItem",
                "dynamodb:GetRecords",
                "dynamodb:GetShardIterator",
                "dynamodb:Query",
                "dynamodb:GetItem",
                "dynamodb:Scan",
                "dynamodb:ConditionCheckItem",
                "dynamodb:BatchWriteItem",
                "dynamodb:PutItem",
                "dynamodb:UpdateItem",
                "dynamodb:DeleteItem",
                "dynamodb:DescribeTable"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Ref": "referencetoallGpTasksTable12B6BF27Arn"
                },
                {
                  "Ref": "AWS::NoValue"
                }
              ]
            },
            {
              "Action": [
                "dynamodb:BatchGetItem",
                "dynamodb:GetRecords",
                "dynamodb:GetShardIterator",
                "dynamodb:Query",
                "dynamodb:GetItem",
                "dynamodb:Scan",
                "dynamodb:ConditionCheckItem",
                "dynamodb:BatchWriteItem",
                "dynamodb:PutItem",
                "dynamodb:UpdateItem",
                "dynamodb:DeleteItem",
                "dynamodb:DescribeTable"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Ref": "referencetoallGpEstimatesTableCE15A663Arn"
                },
                {
                  "Ref": "AWS::NoValue"
                }
              ]
            },
            {
              "Action": [
                "s3:GetObject*",
                "s3:GetBucket*",
                "s3:List*",
                "s3:DeleteObject*",
                "s3:PutObject",
                "s3:PutObjectLegalHold",
                "s3:PutObjectRetention",
                "s3:PutObjectTagging",
                "s3:PutObjectVersionTagging",
                "s3:Abort*"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Ref": "referencetoallGpResultBucketB02A2DF5Arn"
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Ref": "referencetoallGpResultBucketB02A2DF5Arn"
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "testAsyncGeoprocessorGpAsyncHandlerStartServiceRoleDefaultPolicy83C59B27",
        "Roles": [
          {
            "Ref": "testAsyncGeoprocessorGpAsyncHandlerStartServiceRoleB6E62873"
          }
        ]
      }
    },
    "testAsyncGeoprocessorGpAsyncHandlerStartC5A7FD29": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-west-1"
          },
          "S3Key": "944b13d138c81a31a28071f8acccfeba7de50d020506081f8ce8b82e07e86e3b.zip"
        },
        "Description": "Test async geoprocessor",
        "Environment": {
          "Variables": {
            "ASYNC_REQUEST_TYPE": "start",
            "RUN_HANDLER_FUNCTION_NAME": "gp-all-async-testAsyncGeoprocessor-run",
            "TASKS_TABLE": {
              "Ref": "referencetoallGpTasksTable12B6BF27Ref"
            },
            "ESTIMATES_TABLE": {
              "Ref": "referencetoallGpEstimatesTableCE15A663Ref"
            },
            "SUBSCRIPTIONS_TABLE": {
              "Ref": "referencetoallGpSubscriptionsTableA2CCEB35Ref"
            },
            "WSS_REF": {
              "Ref": "referencetoallWebSocketApi6D42F63ERef"
            },
            "WSS_REGION": "us-west-1",
            "WSS_STAGE": "prod"
          }
        },
        "FunctionName": "gp-all-async-testAsyncGeoprocessor-start",
        "Handler": "testAsyncGeoprocessorHandler.handler",
        "MemorySize": 4096,
        "Role": {
          "Fn::GetAtt": [
            "testAsyncGeoprocessorGpAsyncHandlerStartServiceRoleB6E62873",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Timeout": 5
      },
      "DependsOn": [
        "testAsyncGeoprocessorGpAsyncHandlerStartServiceRoleDefaultPolicy83C59B27",
        "testAsyncGeoprocessorGpAsyncHandlerStartServiceRoleB6E62873"
      ]
    },
    "testAsyncGeoprocessorGpAsyncHandlerRunServiceRoleDA7CE4B5": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "ManagedPolicyArns": [
          {
            "Fn::Join": [
              "",
              [
                "arn:",
                {
                  "Ref": "AWS::Partition"
                },
                ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
              ]
            ]
          }
        ]
      }
    },
    "testAsyncGeoprocessorGpAsyncHandlerRunServiceRoleDefaultPolicy9BBEB807": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Ref": "referencetoallworkersgroup0NestedStackworkersgroup0NestedStackResource2196E801Outputsallworkersgroup0testWorkerGpSyncHandlerB8F270BDArn"
              }
            },
            {
              "Action": [
                "dynamodb:BatchGetItem",
                "dynamodb:GetRecords",
                "dynamodb:GetShardIterator",
                "dynamodb:Query",
                "dynamodb:GetItem",
                "dynamodb:Scan",
                "dynamodb:ConditionCheckItem",
                "dynamodb:BatchWriteItem",
                "dynamodb:PutItem",
                "dynamodb:UpdateItem",
                "dynamodb:DeleteItem",
                "dynamodb:DescribeTable"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Ref": "referencetoallGpTasksTable12B6BF27Arn"
                },
                {
                  "Ref": "AWS::NoValue"
                }
              ]
            },
            {
              "Action": [
                "dynamodb:BatchGetItem",
                "dynamodb:GetRecords",
                "dynamodb:GetShardIterator",
                "dynamodb:Query",
                "dynamodb:GetItem",
                "dynamodb:Scan",
                "dynamodb:ConditionCheckItem",
                "dynamodb:BatchWriteItem",
                "dynamodb:PutItem",
                "dynamodb:UpdateItem",
                "dynamodb:DeleteItem",
                "dynamodb:DescribeTable"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Ref": "referencetoallGpEstimatesTableCE15A663Arn"
                },
                {
                  "Ref": "AWS::NoValue"
                }
              ]
            },
            {
              "Action": [
                "s3:GetObject*",
                "s3:GetBucket*",
                "s3:List*",
                "s3:DeleteObject*",
                "s3:PutObject",
                "s3:PutObjectLegalHold",
                "s3:PutObjectRetention",
                "s3:PutObjectTagging",
                "s3:PutObjectVersionTagging",
                "s3:Abort*"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Ref": "referencetoallGpResultBucketB02A2DF5Arn"
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Ref": "referencetoallGpResultBucketB02A2DF5Arn"
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": [
                "s3:GetObject*",
                "s3:GetBucket*",
                "s3:List*"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Ref": "referencetoallGpDatasetBucket908AF7ACArn"
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Ref": "referencetoallGpDatasetBucket908AF7ACArn"
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "testAsyncGeoprocessorGpAsyncHandlerRunServiceRoleDefaultPolicy9BBEB807",
        "Roles": [
          {
            "Ref": "testAsyncGeoprocessorGpAsyncHandlerRunServiceRoleDA7CE4B5"
          }
        ]
      }
    },
    "testAsyncGeoprocessorGpAsyncHandlerRun601CE57C": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-west-1"
          },
          "S3Key": "944b13d138c81a31a28071f8acccfeba7de50d020506081f8ce8b82e07e86e3b.zip"
        },
        "Description": "Test async geoprocessor",
        "Environment": {
          "Variables": {
            "ASYNC_REQUEST_TYPE": "run",
            "TASKS_TABLE": {
              "Ref": "referencetoallGpTasksTable12B6BF27Ref"
            },
            "ESTIMATES_TABLE": {
              "Ref": "referencetoallGpEstimatesTableCE15A663Ref"
            },
            "SUBSCRIPTIONS_TABLE": {
              "Ref": "referencetoallGpSubscriptionsTableA2CCEB35Ref"
            },
            "resultBucketUrl": {
              "Fn::Join": [
                "",
                [
                  "https://s3.us-west-1.",
                  {
                    "Ref": "AWS::URLSuffix"
                  },
                  "/",
                  {
                    "Ref": "referencetoallGpResultBucketB02A2DF5Ref"
                  }
                ]
              ]
            },
            "datasetBucketUrl": {
              "Fn::Join": [
                "",
                [
                  "https://s3.us-west-1.",
                  {
                    "Ref": "AWS::URLSuffix"
                  },
                  "/",
                  {
                    "Ref": "referencetoallGpDatasetBucket908AF7ACRef"
                  }
                ]
              ]
            },
            "WSS_REF": {
              "Ref": "referencetoallWebSocketApi6D42F63ERef"
            },
            "WSS_REGION": "us-west-1",
            "WSS_STAGE": "prod"
          }
        },
        "FunctionName": "gp-all-async-testAsyncGeoprocessor-run",
        "Handler": "testAsyncGeoprocessorHandler.handler",
        "MemorySize": 4096,
        "Role": {
          "Fn::GetAtt": [
            "testAsyncGeoprocessorGpAsyncHandlerRunServiceRoleDA7CE4B5",
            "Arn"
          ]
        },
        "Runtime": "nodejs22.x",
        "Timeout": 40
      },
      "DependsOn": [
        "testAsyncGeoprocessorGpAsyncHandlerRunServiceRoleDefaultPolicy9BBEB807",
        "testAsyncGeoprocessorGpAsyncHandlerRunServiceRoleDA7CE4B5"
      ]
    },
    "GpAsyncLambdaRole091B5FDCB": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "lambda.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        }
      }
    },
    "GpAsyncLambdaRole0DefaultPolicy52BC883F": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "testAsyncGeoprocessorGpAsyncHandlerRun601CE57C",
                  "Arn"
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "GpAsyncLambdaRole0DefaultPolicy52BC883F",
        "Roles": [
          {
            "Ref": "GpAsyncLambdaRole091B5FDCB"
          }
        ]
      }
    }
  },
  "Parameters": {
    "referencetoallGpTasksTable12B6BF27Arn": {
      "Type": "String"
    },
    "referencetoallGpEstimatesTableCE15A663Arn": {
      "Type": "String"
    },
    "referencetoallGpResultBucketB02A2DF5Arn": {
      "Type": "String"
    },
    "referencetoallGpDatasetBucket908AF7ACArn": {
      "Type": "String"
    },
    "referencetoallGpTasksTable12B6BF27Ref": {
      "Type": "String"
    },
    "referencetoallGpEstimatesTableCE15A663Ref": {
      "Type": "String"
    },
    "referencetoallGpResultBucketB02A2DF5Ref": {
      "Type": "String"
    },
    "referencetoallGpDatasetBucket908AF7ACRef": {
      "Type": "String"
    },
    "referencetoallGpSubscriptionsTableA2CCEB35Ref": {
      "Type": "String"
    },
    "referencetoallWebSocketApi6D42F63ERef": {
      "Type": "String"
    },
    "referencetoallworkersgroup0NestedStackworkersgroup0NestedStackResource2196E801Outputsallworkersgroup0testWorkerGpSyncHandlerB8F270BDArn": {
      "Type": "String"
    }
  },
  "Outputs": {
    "allfunctionsgroup0testPreprocessorGpSyncHandler3FE19D94Arn": {
      "Value": {
        "Fn::GetAtt": [
          "testPreprocessorGpSyncHandler6EC47FBF",
          "Arn"
        ]
      }
    },
    "allfunctionsgroup0testAsyncGeoprocessorGpAsyncHandlerStartCDB54107Arn": {
      "Value": {
        "Fn::GetAtt": [
          "testAsyncGeoprocessorGpAsyncHandlerStartC5A7FD29",
          "Arn"
        ]
      }
    }
  }
}
