{
  "Description": "(SO8002) - Data Transfer Hub - S3 Plugin - Template version v2.6.6",
  "Metadata": {
    "AWS::CloudFormation::Interface": {
      "ParameterGroups": [
        {
          "Label": {
            "default": "Source Information"
          },
          "Parameters": [
            "srcType",
            "srcBucket",
            "srcPrefix",
            "srcPrefixsListFile",
            "srcPrefixListBucket",
            "srcRegion",
            "srcEndpoint",
            "srcInCurrentAccount",
            "srcCredentials",
            "srcEvent",
            "srcSkipCompare",
            "isPayerRequest"
          ]
        },
        {
          "Label": {
            "default": "Destination Information"
          },
          "Parameters": [
            "destBucket",
            "destPrefix",
            "destRegion",
            "destInCurrentAccount",
            "destCredentials",
            "destStorageClass",
            "destAcl",
            "destPutObjectSSEType",
            "destPutObjectSSEKmsKeyId"
          ]
        },
        {
          "Label": {
            "default": "Notification Information"
          },
          "Parameters": [
            "alarmEmail"
          ]
        },
        {
          "Label": {
            "default": "EC2 Cluster Information"
          },
          "Parameters": [
            "ec2VpcId",
            "ec2Subnets",
            "finderEc2Memory",
            "ec2CronExpression"
          ]
        },
        {
          "Label": {
            "default": "Advanced Options"
          },
          "Parameters": [
            "finderDepth",
            "finderNumber",
            "workerNumber",
            "includeMetadata",
            "maxCapacity",
            "minCapacity",
            "desiredCapacity"
          ]
        }
      ],
      "ParameterLabels": {
        "srcType": {
          "default": "Source Type"
        },
        "srcBucket": {
          "default": "Source Bucket"
        },
        "srcPrefix": {
          "default": "Source Prefix"
        },
        "srcPrefixsListFile": {
          "default": "Source Prefix List File"
        },
        "srcPrefixListBucket": {
          "default": "Bucket Name for Source Prefix List File"
        },
        "srcSkipCompare": {
          "default": "Skip Data Comparison"
        },
        "srcRegion": {
          "default": "Source Region"
        },
        "srcEndpoint": {
          "default": "Source Endpoint URL"
        },
        "srcInCurrentAccount": {
          "default": "Source In Current Account"
        },
        "srcCredentials": {
          "default": "Source Credentials"
        },
        "isPayerRequest": {
          "default": "Enable Payer Request"
        },
        "destBucket": {
          "default": "Destination Bucket"
        },
        "destPrefix": {
          "default": "Destination Prefix"
        },
        "destRegion": {
          "default": "Destination Region"
        },
        "destInCurrentAccount": {
          "default": "Destination In Current Account"
        },
        "destCredentials": {
          "default": "Destination Credentials"
        },
        "destStorageClass": {
          "default": "Destination Storage Class"
        },
        "destAcl": {
          "default": "Destination Access Control List"
        },
        "destPutObjectSSEType": {
          "default": "Destination Bucket PutObjectPolicy SSE Type"
        },
        "destPutObjectSSEKmsKeyId": {
          "default": "Destination Bucket SSE KMS Key ID"
        },
        "ec2VpcId": {
          "default": "VPC ID"
        },
        "ec2Subnets": {
          "default": "Subnet IDs"
        },
        "finderEc2Memory": {
          "default": "EC2 Finder Memory"
        },
        "ec2CronExpression": {
          "default": "EC2 Cron Expression"
        },
        "alarmEmail": {
          "default": "Alarm Email"
        },
        "includeMetadata": {
          "default": "Include Metadata"
        },
        "srcEvent": {
          "default": "Enable S3 Event"
        },
        "maxCapacity": {
          "default": "Maximum Capacity"
        },
        "minCapacity": {
          "default": "Minimum Capacity"
        },
        "desiredCapacity": {
          "default": "Desired Capacity"
        }
      }
    },
    "cdk_nag": {
      "rules_to_suppress": [
        {
          "reason": "some policies need to get dynamic resources",
          "id": "AwsSolutions-IAM5"
        },
        {
          "reason": "these policies is used by CDK Customer Resource lambda",
          "id": "AwsSolutions-IAM4"
        },
        {
          "reason": "not applicable to use the latest lambda runtime version for aws cdk cr",
          "id": "AwsSolutions-L1"
        }
      ]
    }
  },
  "Parameters": {
    "srcType": {
      "Type": "String",
      "Default": "Amazon_S3",
      "AllowedValues": [
        "Amazon_S3",
        "Aliyun_OSS",
        "Qiniu_Kodo",
        "Tencent_COS"
      ],
      "Description": "Choose type of source storage, including Amazon S3, Aliyun OSS, Qiniu Kodo, Tencent COS or Google GCS"
    },
    "srcBucket": {
      "Type": "String",
      "Description": "Source Bucket Name"
    },
    "srcPrefix": {
      "Type": "String",
      "Default": "",
      "Description": "Source Prefix (Optional)"
    },
    "srcPrefixsListFile": {
      "Type": "String",
      "Default": "",
      "Description": "Source Prefix List File S3 path (Optional), support txt type, the maximum number of lines is 10 millions. e.g. my_prefix_list.txt"
    },
    "srcPrefixListBucket": {
      "Type": "String",
      "Default": "",
      "Description": "Source prefix list file S3 bucket name (Optional). It used to store the Source prefix list file. The specified bucket must be located in the same AWS region and under the same account as the DTH deployment. If your PrefixList File is stored in the Source Bucket, please leave this parameter empty."
    },
    "srcSkipCompare": {
      "Type": "String",
      "Default": "false",
      "AllowedValues": [
        "true",
        "false"
      ],
      "Description": "Skip the data comparison in task finding process? If yes, all data in the source will be sent to the destination"
    },
    "srcRegion": {
      "Type": "String",
      "Default": "",
      "Description": "Source Region Name"
    },
    "srcEndpoint": {
      "Type": "String",
      "Default": "",
      "Description": "Source Endpoint URL (Optional), leave blank unless you want to provide a custom Endpoint URL"
    },
    "srcInCurrentAccount": {
      "Type": "String",
      "Default": "false",
      "AllowedValues": [
        "true",
        "false"
      ],
      "Description": "Source Bucket in current account? If not, you should provide a credential with read access"
    },
    "srcCredentials": {
      "Type": "String",
      "Default": "",
      "Description": "The secret name in Secrets Manager used to keep AK/SK credentials for Source Bucket. Leave blank if source bucket is in current account or source is open data"
    },
    "isPayerRequest": {
      "Type": "String",
      "Default": "false",
      "AllowedValues": [
        "true",
        "false"
      ],
      "Description": "Enable Payer Request?"
    },
    "destBucket": {
      "Type": "String",
      "Description": "Destination Bucket Name"
    },
    "destPrefix": {
      "Type": "String",
      "Default": "",
      "Description": "Destination Prefix (Optional)"
    },
    "destRegion": {
      "Type": "String",
      "Default": "",
      "Description": "Destination Region Name"
    },
    "destInCurrentAccount": {
      "Type": "String",
      "Default": "true",
      "AllowedValues": [
        "true",
        "false"
      ],
      "Description": "Destination Bucket in current account? If not, you should provide a credential with read and write access"
    },
    "destCredentials": {
      "Type": "String",
      "Default": "",
      "Description": "The secret name in Secrets Manager used to keep AK/SK credentials for Destination Bucket. Leave blank if desination bucket is in current account"
    },
    "destStorageClass": {
      "Type": "String",
      "Default": "INTELLIGENT_TIERING",
      "AllowedValues": [
        "STANDARD",
        "STANDARD_IA",
        "ONEZONE_IA",
        "INTELLIGENT_TIERING"
      ],
      "Description": "Destination Storage Class, Default to INTELLIGENT_TIERING"
    },
    "destAcl": {
      "Type": "String",
      "Default": "bucket-owner-full-control",
      "AllowedValues": [
        "private",
        "public-read",
        "public-read-write",
        "authenticated-read",
        "aws-exec-read",
        "bucket-owner-read",
        "bucket-owner-full-control"
      ],
      "Description": "Destination Access Control List"
    },
    "destPutObjectSSEType": {
      "Type": "String",
      "Default": "None",
      "AllowedValues": [
        "None",
        "AES256",
        "AWS_KMS"
      ],
      "Description": "Specifies the server-side encryption algorithm used for storing objects in Amazon S3 (PutObjectPolicy)."
    },
    "destPutObjectSSEKmsKeyId": {
      "Type": "String",
      "Default": "",
      "Description": "Destination Bucket SSE KMS Key ID (Optional). This field is required only if the SSE Type in your Destination Bucket's PutObject Policy is set to 'AWS_KMS'."
    },
    "ec2VpcId": {
      "Type": "AWS::EC2::VPC::Id",
      "Default": "",
      "Description": "VPC ID to run EC2 task, e.g. vpc-bef13dc7"
    },
    "ec2Subnets": {
      "Type": "List<AWS::EC2::Subnet::Id>",
      "Default": "",
      "Description": "Subnet IDs to run EC2 task. Please provide two subnets at least delimited by comma, e.g. subnet-97bfc4cd,subnet-7ad7de32"
    },
    "finderEc2Memory": {
      "Type": "String",
      "Default": "8",
      "AllowedValues": [
        "8",
        "16",
        "32",
        "64",
        "128",
        "256",
        "384",
        "512"
      ],
      "Description": "The amount of memory (in GB) used by the Finder task."
    },
    "ec2CronExpression": {
      "Type": "String",
      "Default": "0/60 * * * ? *",
      "Description": "Cron Expression For EC2 Finder Task. Leave blank to execute only once."
    },
    "alarmEmail": {
      "Type": "String",
      "AllowedPattern": "\\w[-\\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\\.)+[A-Za-z]{2,14}",
      "Description": "Errors will be sent to this email."
    },
    "includeMetadata": {
      "Type": "String",
      "Default": "true",
      "AllowedValues": [
        "true",
        "false"
      ],
      "Description": "Add replication of object metadata, there will be additional API calls"
    },
    "srcEvent": {
      "Type": "String",
      "Default": "No",
      "AllowedValues": [
        "No",
        "Create",
        "CreateAndDelete"
      ],
      "Description": "Whether to enable S3 Event to trigger the replication. Note that S3Event is only applicable if source is in Current account"
    },
    "finderDepth": {
      "Type": "String",
      "Default": "0",
      "Description": "The depth of sub folders to compare in parallel. 0 means comparing all objects in sequence"
    },
    "finderNumber": {
      "Type": "String",
      "Default": "1",
      "Description": "The number of finder threads to run in parallel"
    },
    "workerNumber": {
      "Type": "String",
      "Default": "4",
      "Description": "The number of worker threads to run in one worker node/instance"
    },
    "maxCapacity": {
      "Type": "Number",
      "Default": "20",
      "Description": "Maximum Capacity for Auto Scaling Group"
    },
    "minCapacity": {
      "Type": "Number",
      "Default": "1",
      "Description": "Minimum Capacity for Auto Scaling Group"
    },
    "desiredCapacity": {
      "Type": "Number",
      "Default": "1",
      "Description": "Desired Capacity for Auto Scaling Group"
    },
    "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amikernel510hvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter": {
      "Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>",
      "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-arm64-gp2"
    }
  },
  "Resources": {
    "S3TransferTable": {
      "Type": "AWS::DynamoDB::Table",
      "Properties": {
        "AttributeDefinitions": [
          {
            "AttributeName": "ObjectKey",
            "AttributeType": "S"
          }
        ],
        "BillingMode": "PAY_PER_REQUEST",
        "KeySchema": [
          {
            "AttributeName": "ObjectKey",
            "KeyType": "HASH"
          }
        ],
        "PointInTimeRecoverySpecification": {
          "PointInTimeRecoveryEnabled": true
        },
        "SSESpecification": {
          "SSEEnabled": false
        }
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/S3TransferTable/Resource",
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W74",
              "reason": "Use deafult encryption. Encryption key owned by Amazon"
            }
          ]
        }
      }
    },
    "S3SplitPartTable": {
      "Type": "AWS::DynamoDB::Table",
      "Properties": {
        "AttributeDefinitions": [
          {
            "AttributeName": "UploadId",
            "AttributeType": "S"
          },
          {
            "AttributeName": "PartNumber",
            "AttributeType": "N"
          }
        ],
        "BillingMode": "PAY_PER_REQUEST",
        "KeySchema": [
          {
            "AttributeName": "UploadId",
            "KeyType": "HASH"
          },
          {
            "AttributeName": "PartNumber",
            "KeyType": "RANGE"
          }
        ],
        "PointInTimeRecoverySpecification": {
          "PointInTimeRecoveryEnabled": true
        },
        "SSESpecification": {
          "SSEEnabled": false
        }
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/S3SplitPartTable/Resource",
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W74",
              "reason": "Use deafult encryption. Encryption key owned by Amazon"
            }
          ]
        }
      }
    },
    "S3TransferQueueDLQ": {
      "Type": "AWS::SQS::Queue",
      "Properties": {
        "KmsMasterKeyId": "alias/aws/sqs",
        "MessageRetentionPeriod": 1209600,
        "VisibilityTimeout": 1800
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/S3TransferQueueDLQ/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "it is a DLQ",
              "id": "AwsSolutions-SQS3"
            },
            {
              "reason": "it is a DLQ",
              "id": "AwsSolutions-SQS2"
            },
            {
              "reason": "it is a DLQ",
              "id": "AwsSolutions-SQS4"
            }
          ]
        }
      }
    },
    "S3TransferQueue": {
      "Type": "AWS::SQS::Queue",
      "Properties": {
        "MessageRetentionPeriod": 1209600,
        "RedrivePolicy": {
          "deadLetterTargetArn": {
            "Fn::GetAtt": [
              "S3TransferQueueDLQ",
              "Arn"
            ]
          },
          "maxReceiveCount": 5
        },
        "VisibilityTimeout": 900
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/S3TransferQueue/Resource",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "this queue only used by DTH solution",
              "id": "AwsSolutions-SQS2"
            },
            {
              "reason": "this queue only used by DTH solution",
              "id": "AwsSolutions-SQS4"
            }
          ]
        },
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W48",
              "reason": "No need to use encryption"
            }
          ]
        }
      }
    },
    "CommonS3TransferQueuePolicy08E28469": {
      "Type": "AWS::SQS::QueuePolicy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "sqs:SendMessage",
                "sqs:GetQueueAttributes",
                "sqs:GetQueueUrl"
              ],
              "Condition": {
                "ArnLike": {
                  "aws:SourceArn": {
                    "Fn::Join": [
                      "",
                      [
                        "arn:",
                        {
                          "Ref": "AWS::Partition"
                        },
                        ":s3:::",
                        {
                          "Ref": "srcBucket"
                        }
                      ]
                    ]
                  }
                }
              },
              "Effect": "Allow",
              "Principal": {
                "Service": "s3.amazonaws.com"
              },
              "Resource": {
                "Fn::GetAtt": [
                  "S3TransferQueue",
                  "Arn"
                ]
              }
            },
            {
              "Action": "sqs:SendMessage",
              "Condition": {
                "StringEquals": {
                  "aws:SourceArn": {
                    "Fn::Join": [
                      "",
                      [
                        "arn:",
                        {
                          "Ref": "AWS::Partition"
                        },
                        ":s3:::",
                        {
                          "Ref": "srcBucket"
                        }
                      ]
                    ]
                  }
                }
              },
              "Effect": "Allow",
              "Principal": {
                "Service": "s3.amazonaws.com"
              },
              "Resource": {
                "Fn::GetAtt": [
                  "S3TransferQueue",
                  "Arn"
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Queues": [
          {
            "Ref": "S3TransferQueue"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/S3TransferQueue/Policy/Resource"
      }
    },
    "CommonS3TransferDLQAlarm01AE3F95": {
      "Type": "AWS::CloudWatch::Alarm",
      "Properties": {
        "AlarmActions": [
          {
            "Ref": "S3TransferAlarmTopic"
          }
        ],
        "ComparisonOperator": "GreaterThanThreshold",
        "DatapointsToAlarm": 1,
        "Dimensions": [
          {
            "Name": "QueueName",
            "Value": {
              "Fn::GetAtt": [
                "S3TransferQueueDLQ",
                "QueueName"
              ]
            }
          }
        ],
        "EvaluationPeriods": 1,
        "MetricName": "ApproximateNumberOfMessagesVisible",
        "Namespace": "AWS/SQS",
        "Period": 300,
        "Statistic": "Maximum",
        "Threshold": 0
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/S3TransferDLQAlarm/Resource"
      }
    },
    "CommonSNSTopicEncryptionKeyAC08966E": {
      "Type": "AWS::KMS::Key",
      "Properties": {
        "Description": "Data Transfer Hub KMS-CMK for encrypting the objects in SNS",
        "EnableKeyRotation": true,
        "Enabled": true,
        "KeyPolicy": {
          "Statement": [
            {
              "Action": [
                "kms:GenerateDataKey*",
                "kms:Decrypt",
                "kms:Encrypt"
              ],
              "Effect": "Allow",
              "Principal": {
                "Service": [
                  "sns.amazonaws.com",
                  "cloudwatch.amazonaws.com"
                ]
              },
              "Resource": "*",
              "Sid": "0"
            },
            {
              "Action": [
                "kms:Create*",
                "kms:Describe*",
                "kms:Enable*",
                "kms:List*",
                "kms:Put*",
                "kms:Update*",
                "kms:Revoke*",
                "kms:Disable*",
                "kms:Get*",
                "kms:Delete*",
                "kms:ScheduleKeyDeletion",
                "kms:CancelKeyDeletion",
                "kms:GenerateDataKey",
                "kms:TagResource",
                "kms:UntagResource"
              ],
              "Effect": "Allow",
              "Principal": {
                "AWS": {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":iam::",
                      {
                        "Ref": "AWS::AccountId"
                      },
                      ":root"
                    ]
                  ]
                }
              },
              "Resource": "*",
              "Sid": "1"
            }
          ],
          "Version": "2012-10-17"
        },
        "PendingWindowInDays": 7
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/SNSTopicEncryptionKey/Resource"
      }
    },
    "CommonSNSTopicEncryptionKeyAliasBD265BB5": {
      "Type": "AWS::KMS::Alias",
      "Properties": {
        "AliasName": {
          "Fn::Join": [
            "",
            [
              "alias/dth/sns/",
              {
                "Ref": "AWS::StackName"
              }
            ]
          ]
        },
        "TargetKeyId": {
          "Fn::GetAtt": [
            "CommonSNSTopicEncryptionKeyAC08966E",
            "Arn"
          ]
        }
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/SNSTopicEncryptionKey/Alias/Resource"
      }
    },
    "S3TransferAlarmTopic": {
      "Type": "AWS::SNS::Topic",
      "Properties": {
        "DisplayName": {
          "Fn::Join": [
            "",
            [
              "Data Transfer Hub Alarm (",
              {
                "Ref": "AWS::StackName"
              },
              ")"
            ]
          ]
        },
        "KmsMasterKeyId": {
          "Fn::GetAtt": [
            "CommonSNSTopicEncryptionKeyAC08966E",
            "Arn"
          ]
        }
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/S3TransferAlarmTopic/Resource"
      }
    },
    "CommonS3TransferAlarmTopicTokenSubscription1A53FF898": {
      "Type": "AWS::SNS::Subscription",
      "Properties": {
        "Endpoint": {
          "Ref": "alarmEmail"
        },
        "Protocol": "email",
        "TopicArn": {
          "Ref": "S3TransferAlarmTopic"
        }
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/S3TransferAlarmTopic/TokenSubscription:1/Resource"
      }
    },
    "CommonS3RepWorkerLogGroupE38567D7": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "RetentionInDays": 14
      },
      "UpdateReplacePolicy": "Retain",
      "DeletionPolicy": "Retain",
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/S3RepWorkerLogGroup/Resource",
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W84",
              "reason": "log group is encrypted with the default master key"
            }
          ]
        }
      }
    },
    "CommonS3RepWorkerLogGroupCompletedBytes1C1014FD": {
      "Type": "AWS::Logs::MetricFilter",
      "Properties": {
        "FilterPattern": "[data, time, p=\"----->Completed\", Bytes, ...]",
        "LogGroupName": {
          "Ref": "CommonS3RepWorkerLogGroupE38567D7"
        },
        "MetricTransformations": [
          {
            "MetricName": "CompletedBytes",
            "MetricNamespace": {
              "Ref": "AWS::StackName"
            },
            "MetricValue": "$Bytes"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/S3RepWorkerLogGroup/CompletedBytes/Resource"
      }
    },
    "CommonS3RepWorkerLogGroupTransferredObjectsB539592D": {
      "Type": "AWS::Logs::MetricFilter",
      "Properties": {
        "FilterPattern": "[data, time, p=\"----->Transferred\", ..., s=\"DONE\"]",
        "LogGroupName": {
          "Ref": "CommonS3RepWorkerLogGroupE38567D7"
        },
        "MetricTransformations": [
          {
            "MetricName": "TransferredObjects",
            "MetricNamespace": {
              "Ref": "AWS::StackName"
            },
            "MetricValue": "1"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/S3RepWorkerLogGroup/Transferred-Objects/Resource"
      }
    },
    "CommonS3RepWorkerLogGroupFailedObjects93309340": {
      "Type": "AWS::Logs::MetricFilter",
      "Properties": {
        "FilterPattern": "[data, time, p=\"----->Transferred\", ..., s=\"ERROR\"]",
        "LogGroupName": {
          "Ref": "CommonS3RepWorkerLogGroupE38567D7"
        },
        "MetricTransformations": [
          {
            "MetricName": "FailedObjects",
            "MetricNamespace": {
              "Ref": "AWS::StackName"
            },
            "MetricValue": "1"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/Common/S3RepWorkerLogGroup/Failed-Objects/Resource"
      }
    },
    "DefaultPolicyBB6BAB25": {
      "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"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "S3TransferTable",
                    "Arn"
                  ]
                },
                {
                  "Fn::GetAtt": [
                    "S3SplitPartTable",
                    "Arn"
                  ]
                }
              ]
            },
            {
              "Action": [
                "secretsmanager:GetSecretValue",
                "secretsmanager:DescribeSecret"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":secretsmanager:",
                      {
                        "Ref": "AWS::Region"
                      },
                      ":",
                      {
                        "Ref": "AWS::AccountId"
                      },
                      ":secret:",
                      {
                        "Ref": "srcCredentials"
                      },
                      "-??????"
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":secretsmanager:",
                      {
                        "Ref": "AWS::Region"
                      },
                      ":",
                      {
                        "Ref": "AWS::AccountId"
                      },
                      ":secret:",
                      {
                        "Ref": "destCredentials"
                      },
                      "-??????"
                    ]
                  ]
                }
              ]
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "DefaultPolicyBB6BAB25",
        "Roles": [
          {
            "Ref": "MultiPartStateMachineCheckMultiPartUploadStatusFnServiceRoleD7B8F23C"
          },
          {
            "Ref": "MultiPartStateMachineMultiPartUploadResultFnServiceRole1E9B4DC4"
          },
          {
            "Ref": "FinderStackFinderRoleA666A5A8"
          },
          {
            "Ref": "EC2WorkerStackWorkerAsgRole81C6AA56"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/DefaultPolicy/Resource"
      }
    },
    "MultiPartStateMachineCheckMultiPartUploadStatusFnServiceRoleD7B8F23C": {
      "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"
              ]
            ]
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/MultiPartStateMachine/CheckMultiPartUploadStatusFn/ServiceRole/Resource"
      }
    },
    "MultiPartStateMachineCheckMultiPartUploadStatusFnServiceRoleDefaultPolicy1D2BBE66": {
      "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": [
                {
                  "Fn::GetAtt": [
                    "S3SplitPartTable",
                    "Arn"
                  ]
                },
                {
                  "Ref": "AWS::NoValue"
                }
              ]
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "MultiPartStateMachineCheckMultiPartUploadStatusFnServiceRoleDefaultPolicy1D2BBE66",
        "Roles": [
          {
            "Ref": "MultiPartStateMachineCheckMultiPartUploadStatusFnServiceRoleD7B8F23C"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/MultiPartStateMachine/CheckMultiPartUploadStatusFn/ServiceRole/DefaultPolicy/Resource"
      }
    },
    "MultiPartStateMachineCheckMultiPartUploadStatusFnBB9CF59A": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "data-transfer-hub/v2.6.6/1a287706e2cb47208b3e338260573afe365bf41f6e2e9c2ab26a70f345aa2f95.zip"
        },
        "Description": "Data Transfer Hub - Multi-Part Check Job Status Handler",
        "Environment": {
          "Variables": {
            "STACK_NAME": {
              "Ref": "AWS::StackName"
            },
            "SOLUTION_VERSION": "v2.6.6",
            "SPLIT_PART_TABLE_NAME": {
              "Ref": "S3SplitPartTable"
            },
            "DESTINATION_BUCKET_NAME": {
              "Ref": "destBucket"
            },
            "OBJECT_TRANSFER_TABLE_NAME": {
              "Ref": "S3TransferTable"
            },
            "WORKER_LOG_GROUP_NAME": {
              "Ref": "CommonS3RepWorkerLogGroupE38567D7"
            },
            "DESTINATION_PREFIX": {
              "Ref": "destPrefix"
            }
          }
        },
        "Handler": "check_multi_part_upload_status.lambda_handler",
        "MemorySize": 512,
        "Role": {
          "Fn::GetAtt": [
            "MultiPartStateMachineCheckMultiPartUploadStatusFnServiceRoleD7B8F23C",
            "Arn"
          ]
        },
        "Runtime": "python3.9",
        "Timeout": 900
      },
      "DependsOn": [
        "MultiPartStateMachineCheckMultiPartUploadStatusFnServiceRoleDefaultPolicy1D2BBE66",
        "MultiPartStateMachineCheckMultiPartUploadStatusFnServiceRoleD7B8F23C"
      ],
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/MultiPartStateMachine/CheckMultiPartUploadStatusFn/Resource",
        "aws:asset:path": "asset.1a287706e2cb47208b3e338260573afe365bf41f6e2e9c2ab26a70f345aa2f95",
        "aws:asset:is-bundled": false,
        "aws:asset:property": "Code"
      }
    },
    "MultiPartStateMachineMultiPartUploadResultFnServiceRole1E9B4DC4": {
      "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"
              ]
            ]
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/MultiPartStateMachine/MultiPartUploadResultFn/ServiceRole/Resource"
      }
    },
    "MultiPartStateMachineMultiPartUploadResultFnServiceRoleDefaultPolicyBBB2951F": {
      "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": [
                {
                  "Fn::GetAtt": [
                    "S3TransferTable",
                    "Arn"
                  ]
                },
                {
                  "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": [
                {
                  "Fn::GetAtt": [
                    "S3SplitPartTable",
                    "Arn"
                  ]
                },
                {
                  "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": [
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "destBucket"
                      }
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "destBucket"
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": [
                "logs:FilterLogEvents",
                "logs:GetLogEvents",
                "logs:GetLogGroupFields",
                "logs:DescribeLogGroups",
                "logs:DescribeLogStreams"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "CommonS3RepWorkerLogGroupE38567D7",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "logs:CreateLogStream",
                "logs:PutLogEvents"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "CommonS3RepWorkerLogGroupE38567D7",
                  "Arn"
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "MultiPartStateMachineMultiPartUploadResultFnServiceRoleDefaultPolicyBBB2951F",
        "Roles": [
          {
            "Ref": "MultiPartStateMachineMultiPartUploadResultFnServiceRole1E9B4DC4"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/MultiPartStateMachine/MultiPartUploadResultFn/ServiceRole/DefaultPolicy/Resource"
      }
    },
    "MultiPartStateMachineMultiPartUploadResultFnBAC48FC6": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "data-transfer-hub/v2.6.6/1a287706e2cb47208b3e338260573afe365bf41f6e2e9c2ab26a70f345aa2f95.zip"
        },
        "Description": "Data Transfer Hub - Multi-Part Upload Result Handler",
        "Environment": {
          "Variables": {
            "STACK_NAME": {
              "Ref": "AWS::StackName"
            },
            "SOLUTION_VERSION": "v2.6.6",
            "SPLIT_PART_TABLE_NAME": {
              "Ref": "S3SplitPartTable"
            },
            "DESTINATION_BUCKET_NAME": {
              "Ref": "destBucket"
            },
            "OBJECT_TRANSFER_TABLE_NAME": {
              "Ref": "S3TransferTable"
            },
            "WORKER_LOG_GROUP_NAME": {
              "Ref": "CommonS3RepWorkerLogGroupE38567D7"
            },
            "DEST_CREDENTIALS": {
              "Ref": "destCredentials"
            },
            "DEST_REGION": {
              "Ref": "destRegion"
            },
            "DESTINATION_PREFIX": {
              "Ref": "destPrefix"
            }
          }
        },
        "Handler": "multi_part_upload_result.lambda_handler",
        "MemorySize": 512,
        "Role": {
          "Fn::GetAtt": [
            "MultiPartStateMachineMultiPartUploadResultFnServiceRole1E9B4DC4",
            "Arn"
          ]
        },
        "Runtime": "python3.9",
        "Timeout": 900
      },
      "DependsOn": [
        "MultiPartStateMachineMultiPartUploadResultFnServiceRoleDefaultPolicyBBB2951F",
        "MultiPartStateMachineMultiPartUploadResultFnServiceRole1E9B4DC4"
      ],
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/MultiPartStateMachine/MultiPartUploadResultFn/Resource",
        "aws:asset:path": "asset.1a287706e2cb47208b3e338260573afe365bf41f6e2e9c2ab26a70f345aa2f95",
        "aws:asset:is-bundled": false,
        "aws:asset:property": "Code"
      }
    },
    "MultiPartStateMachineErrorLogGroup4D68B3F1": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "LogGroupName": {
          "Fn::Join": [
            "",
            [
              "/aws/vendedlogs/states/",
              {
                "Fn::Select": [
                  6,
                  {
                    "Fn::Split": [
                      ":",
                      {
                        "Fn::GetAtt": [
                          "MultiPartStateMachineCheckMultiPartUploadStatusFnBB9CF59A",
                          "Arn"
                        ]
                      }
                    ]
                  }
                ]
              },
              "-MultiPart-Controller"
            ]
          ]
        },
        "RetentionInDays": 731
      },
      "UpdateReplacePolicy": "Retain",
      "DeletionPolicy": "Retain",
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/MultiPartStateMachine/ErrorLogGroup/Resource",
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W84",
              "reason": "log group is encrypted with the default master key"
            }
          ]
        }
      }
    },
    "MultiPartStateMachinemultiPartControllerStateMachineRoleAC8DB00C": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": {
                  "Fn::FindInMap": [
                    "ServiceprincipalMap",
                    {
                      "Ref": "AWS::Region"
                    },
                    "states"
                  ]
                }
              }
            }
          ],
          "Version": "2012-10-17"
        }
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/MultiPartStateMachine/multiPartControllerStateMachine/Role/Resource"
      }
    },
    "MultiPartStateMachinemultiPartControllerStateMachineRoleDefaultPolicyC1407B11": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "MultiPartStateMachineCheckMultiPartUploadStatusFnBB9CF59A",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "MultiPartStateMachineCheckMultiPartUploadStatusFnBB9CF59A",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "MultiPartStateMachineMultiPartUploadResultFnBAC48FC6",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "MultiPartStateMachineMultiPartUploadResultFnBAC48FC6",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": [
                "logs:CreateLogDelivery",
                "logs:GetLogDelivery",
                "logs:UpdateLogDelivery",
                "logs:DeleteLogDelivery",
                "logs:ListLogDeliveries",
                "logs:PutResourcePolicy",
                "logs:DescribeResourcePolicies",
                "logs:DescribeLogGroups"
              ],
              "Effect": "Allow",
              "Resource": "*"
            },
            {
              "Action": [
                "xray:PutTraceSegments",
                "xray:PutTelemetryRecords",
                "xray:GetSamplingRules",
                "xray:GetSamplingTargets"
              ],
              "Effect": "Allow",
              "Resource": "*"
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "MultiPartStateMachinemultiPartControllerStateMachineRoleDefaultPolicyC1407B11",
        "Roles": [
          {
            "Ref": "MultiPartStateMachinemultiPartControllerStateMachineRoleAC8DB00C"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/MultiPartStateMachine/multiPartControllerStateMachine/Role/DefaultPolicy/Resource"
      }
    },
    "MultiPartStateMachinemultiPartControllerStateMachine59B94F06": {
      "Type": "AWS::StepFunctions::StateMachine",
      "Properties": {
        "DefinitionString": {
          "Fn::Join": [
            "",
            [
              "{\"StartAt\":\"Check Multi-Part Upload Job Status\",\"States\":{\"Check Multi-Part Upload Job Status\":{\"Next\":\"Check Multi-Part Upload Job Status Choice\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"OutputPath\":\"$.Payload\",\"Resource\":\"arn:",
              {
                "Ref": "AWS::Partition"
              },
              ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
              {
                "Fn::GetAtt": [
                  "MultiPartStateMachineCheckMultiPartUploadStatusFnBB9CF59A",
                  "Arn"
                ]
              },
              "\",\"Payload.$\":\"$\"}},\"Wait for 1 minute\":{\"Type\":\"Wait\",\"Seconds\":60,\"Next\":\"Check Multi-Part Upload Job Status\"},\"Check Multi-Part Upload Job Status Choice\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.status\",\"StringEquals\":\"ERROR\",\"Next\":\"Handle Multi-Part Upload Result\"},{\"Variable\":\"$.status\",\"StringEquals\":\"COMPLETED\",\"Next\":\"Handle Multi-Part Upload Result\"}],\"Default\":\"Wait for 1 minute\"},\"Handle Multi-Part Upload Result\":{\"Next\":\"Complete or Abort Multi-Part Upload Job Status Choice\",\"Retry\":[{\"ErrorEquals\":[\"Lambda.ClientExecutionTimeoutException\",\"Lambda.ServiceException\",\"Lambda.AWSLambdaException\",\"Lambda.SdkClientException\"],\"IntervalSeconds\":2,\"MaxAttempts\":6,\"BackoffRate\":2}],\"Type\":\"Task\",\"OutputPath\":\"$.Payload\",\"Resource\":\"arn:",
              {
                "Ref": "AWS::Partition"
              },
              ":states:::lambda:invoke\",\"Parameters\":{\"FunctionName\":\"",
              {
                "Fn::GetAtt": [
                  "MultiPartStateMachineMultiPartUploadResultFnBAC48FC6",
                  "Arn"
                ]
              },
              "\",\"Payload.$\":\"$\"}},\"Complete or Abort Multi-Part Upload Job Status Choice\":{\"Type\":\"Choice\",\"Choices\":[{\"Variable\":\"$.status\",\"StringEquals\":\"COMPLETED\",\"Next\":\"Multi-Part Upload Complete\"}],\"Default\":\"Multi-Part Upload Failed\"},\"Multi-Part Upload Failed\":{\"Type\":\"Fail\"},\"Multi-Part Upload Complete\":{\"Type\":\"Succeed\"}}}"
            ]
          ]
        },
        "LoggingConfiguration": {
          "Destinations": [
            {
              "CloudWatchLogsLogGroup": {
                "LogGroupArn": {
                  "Fn::GetAtt": [
                    "MultiPartStateMachineErrorLogGroup4D68B3F1",
                    "Arn"
                  ]
                }
              }
            }
          ],
          "Level": "ALL"
        },
        "RoleArn": {
          "Fn::GetAtt": [
            "MultiPartStateMachinemultiPartControllerStateMachineRoleAC8DB00C",
            "Arn"
          ]
        },
        "StateMachineName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-MultiPart-ControllerSM"
            ]
          ]
        },
        "TracingConfiguration": {
          "Enabled": true
        }
      },
      "DependsOn": [
        "MultiPartStateMachinemultiPartControllerStateMachineRoleDefaultPolicyC1407B11",
        "MultiPartStateMachinemultiPartControllerStateMachineRoleAC8DB00C"
      ],
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/MultiPartStateMachine/multiPartControllerStateMachine/Resource"
      }
    },
    "FinderStackFinderLogGroup9408DAAE": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "RetentionInDays": 14
      },
      "UpdateReplacePolicy": "Retain",
      "DeletionPolicy": "Retain",
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/FinderLogGroup/Resource",
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W84",
              "reason": "log group is encrypted with the default master key"
            }
          ]
        }
      }
    },
    "FinderStackFinderLogGroupFinderErrorCounts92EAAF30": {
      "Type": "AWS::Logs::MetricFilter",
      "Properties": {
        "FilterPattern": "?\"Error\" ?\"error\"",
        "LogGroupName": {
          "Ref": "FinderStackFinderLogGroup9408DAAE"
        },
        "MetricTransformations": [
          {
            "MetricName": "FinderErrorCounts",
            "MetricNamespace": {
              "Ref": "AWS::StackName"
            },
            "MetricValue": "1"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/FinderLogGroup/Finder-Error-Counts/Resource"
      }
    },
    "FinderStackS3FinderEC2SGF6F80004": {
      "Type": "AWS::EC2::SecurityGroup",
      "Properties": {
        "GroupDescription": "Security Group for Data Transfer Hub Fidner instance",
        "SecurityGroupEgress": [
          {
            "CidrIp": "0.0.0.0/0",
            "Description": "Allow all outbound traffic by default",
            "IpProtocol": "-1"
          }
        ],
        "VpcId": {
          "Ref": "ec2VpcId"
        }
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/S3FinderEC2SG/Resource",
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W5",
              "reason": "Open egress rule is required to access public network"
            },
            {
              "id": "W40",
              "reason": "Open egress rule is required to access public network"
            }
          ]
        }
      }
    },
    "FinderStackFinderRoleA666A5A8": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "ec2.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "ManagedPolicyArns": [
          {
            "Fn::Join": [
              "",
              [
                "arn:",
                {
                  "Ref": "AWS::Partition"
                },
                ":iam::aws:policy/AmazonSSMManagedInstanceCore"
              ]
            ]
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/FinderRole/Resource"
      }
    },
    "FinderStackFinderRoleDefaultPolicy820CDD13": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "cloudformation:SignalResource",
              "Effect": "Allow",
              "Resource": {
                "Ref": "AWS::StackId"
              }
            },
            {
              "Action": [
                "sqs:SendMessage",
                "sqs:GetQueueAttributes",
                "sqs:GetQueueUrl"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "S3TransferQueue",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "s3:GetObject*",
                "s3:GetBucket*",
                "s3:List*"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "srcBucket"
                      }
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "srcBucket"
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": [
                "s3:GetObject*",
                "s3:GetBucket*",
                "s3:List*"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "destBucket"
                      }
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "destBucket"
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": [
                "s3:GetObject*",
                "s3:GetBucket*",
                "s3:List*"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "srcPrefixListBucket"
                      }
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "srcPrefixListBucket"
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": [
                "states:ListExecutions",
                "states:ListStateMachines"
              ],
              "Effect": "Allow",
              "Resource": {
                "Ref": "MultiPartStateMachinemultiPartControllerStateMachine59B94F06"
              }
            },
            {
              "Action": [
                "states:DescribeExecution",
                "states:DescribeStateMachineForExecution",
                "states:GetExecutionHistory"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::Join": [
                  "",
                  [
                    "arn:",
                    {
                      "Ref": "AWS::Partition"
                    },
                    ":states:",
                    {
                      "Ref": "AWS::Region"
                    },
                    ":",
                    {
                      "Ref": "AWS::AccountId"
                    },
                    ":execution:",
                    {
                      "Fn::Select": [
                        6,
                        {
                          "Fn::Split": [
                            ":",
                            {
                              "Ref": "MultiPartStateMachinemultiPartControllerStateMachine59B94F06"
                            }
                          ]
                        }
                      ]
                    },
                    ":*"
                  ]
                ]
              }
            },
            {
              "Action": [
                "states:ListActivities",
                "states:DescribeStateMachine",
                "states:DescribeActivity"
              ],
              "Effect": "Allow",
              "Resource": "*"
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "FinderStackFinderRoleDefaultPolicy820CDD13",
        "Roles": [
          {
            "Ref": "FinderStackFinderRoleA666A5A8"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/FinderRole/DefaultPolicy/Resource"
      }
    },
    "FinderStackCWAgentPolicy9BC5DA84": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "cloudwatch:PutMetricData",
                "ec2:DescribeVolumes",
                "ec2:DescribeTags",
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:DescribeLogStreams",
                "logs:DescribeLogGroups",
                "autoscaling:UpdateAutoScalingGroup"
              ],
              "Effect": "Allow",
              "Resource": "*"
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "FinderStackCWAgentPolicy9BC5DA84",
        "Roles": [
          {
            "Ref": "FinderStackFinderRoleA666A5A8"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/CWAgentPolicy/Resource",
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W12",
              "reason": "Publish log streams requires any resources"
            }
          ]
        }
      }
    },
    "FinderStackFinderEC2LaunchTemplateProfileC751664D": {
      "Type": "AWS::IAM::InstanceProfile",
      "Properties": {
        "Roles": [
          {
            "Ref": "FinderStackFinderRoleA666A5A8"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/FinderEC2LaunchTemplate/Profile"
      }
    },
    "FinderStackFinderEC2LaunchTemplate65450087": {
      "Type": "AWS::EC2::LaunchTemplate",
      "Properties": {
        "LaunchTemplateData": {
          "BlockDeviceMappings": [
            {
              "DeviceName": "/dev/xvda",
              "Ebs": {
                "Encrypted": true,
                "VolumeSize": 8
              }
            }
          ],
          "IamInstanceProfile": {
            "Arn": {
              "Fn::GetAtt": [
                "FinderStackFinderEC2LaunchTemplateProfileC751664D",
                "Arn"
              ]
            }
          },
          "ImageId": {
            "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amikernel510hvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter"
          },
          "InstanceType": {
            "Fn::FindInMap": [
              "FinderStackInstanceTypeTableBBF36176",
              {
                "Ref": "finderEc2Memory"
              },
              "instanceType"
            ]
          },
          "MetadataOptions": {
            "HttpTokens": "required"
          },
          "Monitoring": {
            "Enabled": true
          },
          "NetworkInterfaces": [
            {
              "AssociatePublicIpAddress": true,
              "DeviceIndex": 0,
              "Groups": [
                {
                  "Fn::GetAtt": [
                    "FinderStackS3FinderEC2SGF6F80004",
                    "GroupId"
                  ]
                }
              ]
            }
          ],
          "TagSpecifications": [
            {
              "ResourceType": "instance",
              "Tags": [
                {
                  "Key": "Name",
                  "Value": "DataTransferS3Stack/FinderStack/FinderEC2LaunchTemplate"
                }
              ]
            },
            {
              "ResourceType": "volume",
              "Tags": [
                {
                  "Key": "Name",
                  "Value": "DataTransferS3Stack/FinderStack/FinderEC2LaunchTemplate"
                }
              ]
            }
          ],
          "UserData": {
            "Fn::Base64": {
              "Fn::Join": [
                "",
                [
                  "#!/bin/bash\nyum update -y\ncd /home/ec2-user/\necho \"net.core.default_qdisc = fq\" >> /etc/sysctl.conf\necho \"net.ipv4.tcp_congestion_control = bbr\" >> /etc/sysctl.conf\nsysctl -p\necho `sysctl net.ipv4.tcp_congestion_control` > finder.log\necho \"{\\\"agent\\\": {\\\"metrics_collection_interval\\\": 60,\\\"run_as_user\\\": \\\"root\\\"},\\\"logs\\\": {\\\"logs_collected\\\": {\\\"files\\\": {\\\"collect_list\\\": [{\\\"file_path\\\": \\\"/home/ec2-user/finder.log\\\",\\\"log_group_name\\\": \\\"##log group##\\\"}]}}}}\" >> /home/ec2-user/cw_agent_config.json\nyum install -y amazon-cloudwatch-agent\nsed -i  -e \"s/##log group##/",
                  {
                    "Ref": "FinderStackFinderLogGroup9408DAAE"
                  },
                  "/g\" cw_agent_config.json\n/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/home/ec2-user/cw_agent_config.json -s\ncurl -LO \"",
                  {
                    "Fn::FindInMap": [
                      "FinderStackAssetTableC56DDAEC",
                      {
                        "Ref": "AWS::Partition"
                      },
                      "assetDomain"
                    ]
                  },
                  "/data-transfer-hub-cli/v1.4.0/dthcli_1.4.0_linux_arm64.tar.gz\"\ntar zxvf dthcli_1.4.0_linux_arm64.tar.gz\necho \"export JOB_TABLE_NAME=",
                  {
                    "Ref": "S3TransferTable"
                  },
                  "\" >> env.sh\necho \"export JOB_QUEUE_NAME=",
                  {
                    "Fn::GetAtt": [
                      "S3TransferQueue",
                      "QueueName"
                    ]
                  },
                  "\" >> env.sh\necho \"export SINGLE_PART_TABLE_NAME=",
                  {
                    "Ref": "S3SplitPartTable"
                  },
                  "\" >> env.sh\necho \"export SFN_ARN=",
                  {
                    "Ref": "MultiPartStateMachinemultiPartControllerStateMachine59B94F06"
                  },
                  "\" >> env.sh\necho \"export SOURCE_TYPE=",
                  {
                    "Ref": "srcType"
                  },
                  "\" >> env.sh\necho \"export SRC_BUCKET=",
                  {
                    "Ref": "srcBucket"
                  },
                  "\" >> env.sh\necho \"export SRC_PREFIX=",
                  {
                    "Ref": "srcPrefix"
                  },
                  "\" >> env.sh\necho \"export SRC_PREFIX_LIST=",
                  {
                    "Ref": "srcPrefixsListFile"
                  },
                  "\" >> env.sh\necho \"export SRC_PREFIX_LIST_BUCKET=",
                  {
                    "Ref": "srcPrefixListBucket"
                  },
                  "\" >> env.sh\necho \"export SRC_REGION=",
                  {
                    "Ref": "srcRegion"
                  },
                  "\" >> env.sh\necho \"export SRC_ENDPOINT=",
                  {
                    "Ref": "srcEndpoint"
                  },
                  "\" >> env.sh\necho \"export SRC_CREDENTIALS=",
                  {
                    "Ref": "srcCredentials"
                  },
                  "\" >> env.sh\necho \"export SRC_IN_CURRENT_ACCOUNT=",
                  {
                    "Ref": "srcInCurrentAccount"
                  },
                  "\" >> env.sh\necho \"export PAYER_REQUEST=",
                  {
                    "Ref": "isPayerRequest"
                  },
                  "\" >> env.sh\necho \"export DEST_BUCKET=",
                  {
                    "Ref": "destBucket"
                  },
                  "\" >> env.sh\necho \"export DEST_PREFIX=",
                  {
                    "Ref": "destPrefix"
                  },
                  "\" >> env.sh\necho \"export DEST_REGION=",
                  {
                    "Ref": "destRegion"
                  },
                  "\" >> env.sh\necho \"export DEST_CREDENTIALS=",
                  {
                    "Ref": "destCredentials"
                  },
                  "\" >> env.sh\necho \"export DEST_IN_CURRENT_ACCOUNT=",
                  {
                    "Ref": "destInCurrentAccount"
                  },
                  "\" >> env.sh\necho \"export DEST_STORAGE_CLASS=undefined\" >> env.sh\necho \"export DEST_ACL=undefined\" >> env.sh\necho \"export FINDER_DEPTH=",
                  {
                    "Ref": "finderDepth"
                  },
                  "\" >> env.sh\necho \"export SKIP_COMPARE=",
                  {
                    "Ref": "srcSkipCompare"
                  },
                  "\" >> env.sh\necho \"export FINDER_NUMBER=",
                  {
                    "Ref": "finderNumber"
                  },
                  "\" >> env.sh\necho \"export finder_NUMBER=undefined\" >> env.sh\necho \"export INCLUDE_METADATA=undefined\" >> env.sh\necho \"export AWS_DEFAULT_REGION=",
                  {
                    "Ref": "AWS::Region"
                  },
                  "\" >> env.sh\necho \"source /home/ec2-user/env.sh\" >> start-finder.sh\necho \"nohup ./dthcli run -t Finder |& tee -a /home/ec2-user/finder.log\" >> start-finder.sh\necho \"echo 'Exit Finder proccess, trying to set auto scaling group desiredCapacity to 0 to terminate instance after 60 seconds...' >> /home/ec2-user/finder.log\" >> start-finder.sh\necho \"sleep 61; mycount=0; while (( \\$mycount < 5 )); do aws autoscaling update-auto-scaling-group --region ",
                  {
                    "Ref": "AWS::Region"
                  },
                  " --auto-scaling-group-name ",
                  {
                    "Ref": "AWS::StackName"
                  },
                  "-Finder-ASG --desired-capacity 0; sleep 10; ((mycount=$mycount+1)); done;\" >> start-finder.sh\nchmod +x start-finder.sh\necho \"@reboot /home/ec2-user/start-finder.sh\" >> /var/spool/cron/root\n./start-finder.sh"
                ]
              ]
            }
          }
        },
        "TagSpecifications": [
          {
            "ResourceType": "launch-template",
            "Tags": [
              {
                "Key": "Name",
                "Value": "DataTransferS3Stack/FinderStack/FinderEC2LaunchTemplate"
              }
            ]
          }
        ]
      },
      "DependsOn": [
        "FinderStackFinderRoleDefaultPolicy820CDD13",
        "FinderStackFinderRoleA666A5A8"
      ],
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/FinderEC2LaunchTemplate/Resource"
      }
    },
    "FinderStackS3RepFinderASGDE8942A3": {
      "Type": "AWS::AutoScaling::AutoScalingGroup",
      "Properties": {
        "AutoScalingGroupName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-Finder-ASG"
            ]
          ]
        },
        "Cooldown": "120",
        "DesiredCapacity": "1",
        "LaunchTemplate": {
          "LaunchTemplateId": {
            "Ref": "FinderStackFinderEC2LaunchTemplate65450087"
          },
          "Version": {
            "Fn::GetAtt": [
              "FinderStackFinderEC2LaunchTemplate65450087",
              "LatestVersionNumber"
            ]
          }
        },
        "MaxSize": "1",
        "MetricsCollection": [
          {
            "Granularity": "1Minute",
            "Metrics": [
              "GroupDesiredCapacity",
              "GroupInServiceInstances"
            ]
          }
        ],
        "MinSize": "0",
        "Tags": [
          {
            "Key": "Name",
            "PropagateAtLaunch": true,
            "Value": {
              "Fn::Join": [
                "",
                [
                  {
                    "Ref": "AWS::StackName"
                  },
                  "-Replication-Finder"
                ]
              ]
            }
          }
        ],
        "VPCZoneIdentifier": {
          "Ref": "ec2Subnets"
        }
      },
      "CreationPolicy": {
        "ResourceSignal": {
          "Count": 0
        }
      },
      "UpdatePolicy": {
        "AutoScalingScheduledAction": {
          "IgnoreUnmodifiedGroupSizeProperties": true
        }
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/S3RepFinderASG/ASG",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "we do not need notification, this asg will change automated",
              "id": "AwsSolutions-AS3"
            }
          ]
        }
      }
    },
    "FinderStackFinderLauncherPolicyAB04D39E": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "autoscaling:DescribeAutoScalingGroups",
                "autoscaling:UpdateAutoScalingGroup"
              ],
              "Effect": "Allow",
              "Resource": "*"
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "FinderStackFinderLauncherPolicyAB04D39E",
        "Roles": [
          {
            "Ref": "FinderStackFinderLaunchHelperServiceRoleA7147370"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/FinderLauncherPolicy/Resource"
      }
    },
    "FinderStackFinderLaunchHelperServiceRoleA7147370": {
      "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"
              ]
            ]
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/FinderLaunchHelper/ServiceRole/Resource"
      }
    },
    "FinderStackFinderLaunchHelper8813ECEB": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "data-transfer-hub/v2.6.6/60ef30fc3f2da145e91f18dcd2eff5260cd9cc9e3adb39156ad97bbf2dbbe167.zip"
        },
        "Environment": {
          "Variables": {
            "ASG_NAME": {
              "Ref": "FinderStackS3RepFinderASGDE8942A3"
            }
          }
        },
        "Handler": "lambda_function.lambda_handler",
        "MemorySize": 256,
        "Role": {
          "Fn::GetAtt": [
            "FinderStackFinderLaunchHelperServiceRoleA7147370",
            "Arn"
          ]
        },
        "Runtime": "python3.9",
        "Timeout": 900
      },
      "DependsOn": [
        "FinderStackFinderLaunchHelperServiceRoleA7147370"
      ],
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/FinderLaunchHelper/Resource",
        "aws:asset:path": "asset.60ef30fc3f2da145e91f18dcd2eff5260cd9cc9e3adb39156ad97bbf2dbbe167",
        "aws:asset:is-bundled": false,
        "aws:asset:property": "Code"
      }
    },
    "FinderStackDTHFinderScheduleFC9E063F": {
      "Type": "AWS::Events::Rule",
      "Properties": {
        "ScheduleExpression": {
          "Fn::Join": [
            "",
            [
              "cron(",
              {
                "Fn::If": [
                  "FinderStackenableFinderTriggerEC192EA1",
                  "0/60 * * * ? 2000",
                  {
                    "Ref": "ec2CronExpression"
                  }
                ]
              },
              ")"
            ]
          ]
        },
        "State": "ENABLED",
        "Targets": [
          {
            "Arn": {
              "Fn::GetAtt": [
                "FinderStackFinderLaunchHelper8813ECEB",
                "Arn"
              ]
            },
            "Id": "Target0"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/DTHFinderSchedule/Resource"
      }
    },
    "FinderStackDTHFinderScheduleAllowEventRuleDataTransferS3StackFinderStackFinderLaunchHelper6C114D0B331350B5": {
      "Type": "AWS::Lambda::Permission",
      "Properties": {
        "Action": "lambda:InvokeFunction",
        "FunctionName": {
          "Fn::GetAtt": [
            "FinderStackFinderLaunchHelper8813ECEB",
            "Arn"
          ]
        },
        "Principal": "events.amazonaws.com",
        "SourceArn": {
          "Fn::GetAtt": [
            "FinderStackDTHFinderScheduleFC9E063F",
            "Arn"
          ]
        }
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/FinderStack/DTHFinderSchedule/AllowEventRuleDataTransferS3StackFinderStackFinderLaunchHelper6C114D0B"
      }
    },
    "EC2WorkerStackS3RepEC2SG6645AAB9": {
      "Type": "AWS::EC2::SecurityGroup",
      "Properties": {
        "GroupDescription": "Security Group for Data Replication Hub EC2 instances",
        "SecurityGroupEgress": [
          {
            "CidrIp": "0.0.0.0/0",
            "Description": "Allow all outbound traffic by default",
            "IpProtocol": "-1"
          }
        ],
        "VpcId": {
          "Ref": "ec2VpcId"
        }
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/EC2WorkerStack/S3RepEC2SG/Resource",
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W5",
              "reason": "Open egress rule is required to access public network"
            },
            {
              "id": "W40",
              "reason": "Open egress rule is required to access public network"
            }
          ]
        }
      }
    },
    "EC2WorkerStackWorkerAsgRole81C6AA56": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "ec2.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "ManagedPolicyArns": [
          {
            "Fn::Join": [
              "",
              [
                "arn:",
                {
                  "Ref": "AWS::Partition"
                },
                ":iam::aws:policy/AmazonSSMManagedInstanceCore"
              ]
            ]
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/EC2WorkerStack/WorkerAsgRole/Resource"
      }
    },
    "EC2WorkerStackWorkerAsgRoleDefaultPolicy3BF8DE22": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "cloudformation:SignalResource",
              "Effect": "Allow",
              "Resource": {
                "Ref": "AWS::StackId"
              }
            },
            {
              "Action": [
                "cloudformation:DescribeStackResource",
                "cloudformation:SignalResource"
              ],
              "Effect": "Allow",
              "Resource": {
                "Ref": "AWS::StackId"
              }
            },
            {
              "Action": [
                "sqs:ReceiveMessage",
                "sqs:ChangeMessageVisibility",
                "sqs:GetQueueUrl",
                "sqs:DeleteMessage",
                "sqs:GetQueueAttributes"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "S3TransferQueue",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "sqs:SendMessage",
                "sqs:GetQueueAttributes",
                "sqs:GetQueueUrl"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "S3TransferQueue",
                  "Arn"
                ]
              }
            },
            {
              "Action": [
                "s3:GetObject*",
                "s3:GetBucket*",
                "s3:List*"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "srcBucket"
                      }
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "srcBucket"
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": [
                "s3:GetObject*",
                "s3:GetBucket*",
                "s3:List*",
                "s3:DeleteObject*",
                "s3:PutObject",
                "s3:PutObjectLegalHold",
                "s3:PutObjectRetention",
                "s3:PutObjectTagging",
                "s3:PutObjectVersionTagging",
                "s3:Abort*"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "destBucket"
                      }
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "destBucket"
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            },
            {
              "Action": "states:StartExecution",
              "Effect": "Allow",
              "Resource": {
                "Ref": "MultiPartStateMachinemultiPartControllerStateMachine59B94F06"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "EC2WorkerStackWorkerAsgRoleDefaultPolicy3BF8DE22",
        "Roles": [
          {
            "Ref": "EC2WorkerStackWorkerAsgRole81C6AA56"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/EC2WorkerStack/WorkerAsgRole/DefaultPolicy/Resource"
      }
    },
    "EC2WorkerStackCWAgentPolicy2A407C92": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "cloudwatch:PutMetricData",
                "ec2:DescribeVolumes",
                "ec2:DescribeTags",
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:DescribeLogStreams",
                "logs:DescribeLogGroups"
              ],
              "Effect": "Allow",
              "Resource": "*"
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "EC2WorkerStackCWAgentPolicy2A407C92",
        "Roles": [
          {
            "Ref": "EC2WorkerStackWorkerAsgRole81C6AA56"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/EC2WorkerStack/CWAgentPolicy/Resource",
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W12",
              "reason": "Publish log streams requires any resources"
            }
          ]
        }
      }
    },
    "EC2WorkerStackWorkerEC2LaunchTemplateProfile62CB513A": {
      "Type": "AWS::IAM::InstanceProfile",
      "Properties": {
        "Roles": [
          {
            "Ref": "EC2WorkerStackWorkerAsgRole81C6AA56"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/EC2WorkerStack/WorkerEC2LaunchTemplate/Profile"
      }
    },
    "EC2WorkerStackWorkerEC2LaunchTemplate7DDBFE23": {
      "Type": "AWS::EC2::LaunchTemplate",
      "Properties": {
        "LaunchTemplateData": {
          "BlockDeviceMappings": [
            {
              "DeviceName": "/dev/xvda",
              "Ebs": {
                "Encrypted": true,
                "VolumeSize": 8
              }
            }
          ],
          "IamInstanceProfile": {
            "Arn": {
              "Fn::GetAtt": [
                "EC2WorkerStackWorkerEC2LaunchTemplateProfile62CB513A",
                "Arn"
              ]
            }
          },
          "ImageId": {
            "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amikernel510hvmarm64gp2C96584B6F00A464EAD1953AFF4B05118Parameter"
          },
          "InstanceType": "t4g.micro",
          "MetadataOptions": {
            "HttpTokens": "required"
          },
          "Monitoring": {
            "Enabled": true
          },
          "NetworkInterfaces": [
            {
              "AssociatePublicIpAddress": true,
              "DeviceIndex": 0,
              "Groups": [
                {
                  "Fn::GetAtt": [
                    "EC2WorkerStackS3RepEC2SG6645AAB9",
                    "GroupId"
                  ]
                }
              ]
            }
          ],
          "TagSpecifications": [
            {
              "ResourceType": "instance",
              "Tags": [
                {
                  "Key": "Name",
                  "Value": "DataTransferS3Stack/EC2WorkerStack/WorkerEC2LaunchTemplate"
                }
              ]
            },
            {
              "ResourceType": "volume",
              "Tags": [
                {
                  "Key": "Name",
                  "Value": "DataTransferS3Stack/EC2WorkerStack/WorkerEC2LaunchTemplate"
                }
              ]
            }
          ],
          "UserData": {
            "Fn::Base64": {
              "Fn::Join": [
                "",
                [
                  "#!/bin/bash\n# fingerprint: 576dab768f74c98b\n(\n  set +e\n  /opt/aws/bin/cfn-init -v --region ",
                  {
                    "Ref": "AWS::Region"
                  },
                  " --stack ",
                  {
                    "Ref": "AWS::StackName"
                  },
                  " --resource EC2WorkerStackS3RepWorkerASGED108717 -c default\n  /opt/aws/bin/cfn-signal -e $? --region ",
                  {
                    "Ref": "AWS::Region"
                  },
                  " --stack ",
                  {
                    "Ref": "AWS::StackName"
                  },
                  " --resource EC2WorkerStackS3RepWorkerASGED108717\n  cat /var/log/cfn-init.log >&2\n)\nyum update -y\ncd /home/ec2-user/\necho \"net.core.default_qdisc = fq\" >> /etc/sysctl.conf\necho \"net.ipv4.tcp_congestion_control = bbr\" >> /etc/sysctl.conf\nsysctl -p\necho `sysctl net.ipv4.tcp_congestion_control` > worker.log\nyum install -y amazon-cloudwatch-agent\nsed -i  -e \"s/##log group##/",
                  {
                    "Ref": "CommonS3RepWorkerLogGroupE38567D7"
                  },
                  "/g\" cw_agent_config.json\n/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/home/ec2-user/cw_agent_config.json -s\ncurl -LO \"",
                  {
                    "Fn::FindInMap": [
                      "EC2WorkerStackAssetTableD4360D99",
                      {
                        "Ref": "AWS::Partition"
                      },
                      "assetDomain"
                    ]
                  },
                  "/data-transfer-hub-cli/v1.4.0/dthcli_1.4.0_linux_arm64.tar.gz\"\ntar zxvf dthcli_1.4.0_linux_arm64.tar.gz\necho \"export JOB_TABLE_NAME=",
                  {
                    "Ref": "S3TransferTable"
                  },
                  "\" >> env.sh\necho \"export JOB_QUEUE_NAME=",
                  {
                    "Fn::GetAtt": [
                      "S3TransferQueue",
                      "QueueName"
                    ]
                  },
                  "\" >> env.sh\necho \"export SINGLE_PART_TABLE_NAME=",
                  {
                    "Ref": "S3SplitPartTable"
                  },
                  "\" >> env.sh\necho \"export SFN_ARN=",
                  {
                    "Ref": "MultiPartStateMachinemultiPartControllerStateMachine59B94F06"
                  },
                  "\" >> env.sh\necho \"export SOURCE_TYPE=",
                  {
                    "Ref": "srcType"
                  },
                  "\" >> env.sh\necho \"export SRC_BUCKET=",
                  {
                    "Ref": "srcBucket"
                  },
                  "\" >> env.sh\necho \"export SRC_PREFIX=",
                  {
                    "Ref": "srcPrefix"
                  },
                  "\" >> env.sh\necho \"export SRC_REGION=",
                  {
                    "Ref": "srcRegion"
                  },
                  "\" >> env.sh\necho \"export SRC_ENDPOINT=",
                  {
                    "Ref": "srcEndpoint"
                  },
                  "\" >> env.sh\necho \"export SRC_CREDENTIALS=",
                  {
                    "Ref": "srcCredentials"
                  },
                  "\" >> env.sh\necho \"export SRC_IN_CURRENT_ACCOUNT=",
                  {
                    "Ref": "srcInCurrentAccount"
                  },
                  "\" >> env.sh\necho \"export PAYER_REQUEST=",
                  {
                    "Ref": "isPayerRequest"
                  },
                  "\" >> env.sh\necho \"export DEST_BUCKET=",
                  {
                    "Ref": "destBucket"
                  },
                  "\" >> env.sh\necho \"export DEST_PREFIX=",
                  {
                    "Ref": "destPrefix"
                  },
                  "\" >> env.sh\necho \"export DEST_REGION=",
                  {
                    "Ref": "destRegion"
                  },
                  "\" >> env.sh\necho \"export DEST_CREDENTIALS=",
                  {
                    "Ref": "destCredentials"
                  },
                  "\" >> env.sh\necho \"export DEST_IN_CURRENT_ACCOUNT=",
                  {
                    "Ref": "destInCurrentAccount"
                  },
                  "\" >> env.sh\necho \"export DEST_STORAGE_CLASS=",
                  {
                    "Ref": "destStorageClass"
                  },
                  "\" >> env.sh\necho \"export DEST_ACL=",
                  {
                    "Ref": "destAcl"
                  },
                  "\" >> env.sh\necho \"export DEST_SSE_TYPE=",
                  {
                    "Ref": "destPutObjectSSEType"
                  },
                  "\" >> env.sh\necho \"export DEST_SSE_KMS_KEY_ID=",
                  {
                    "Ref": "destPutObjectSSEKmsKeyId"
                  },
                  "\" >> env.sh\necho \"export FINDER_DEPTH=",
                  {
                    "Ref": "finderDepth"
                  },
                  "\" >> env.sh\necho \"export FINDER_NUMBER=",
                  {
                    "Ref": "finderNumber"
                  },
                  "\" >> env.sh\necho \"export WORKER_NUMBER=",
                  {
                    "Ref": "workerNumber"
                  },
                  "\" >> env.sh\necho \"export INCLUDE_METADATA=",
                  {
                    "Ref": "includeMetadata"
                  },
                  "\" >> env.sh\necho \"export AWS_DEFAULT_REGION=",
                  {
                    "Ref": "AWS::Region"
                  },
                  "\" >> env.sh\necho \"source /home/ec2-user/env.sh\" >> start-worker.sh\necho \"nohup ./dthcli run -t Worker |& tee -a /home/ec2-user/worker.log\" >> start-worker.sh\necho \"echo 'Error occured, trying to terminate instance...' >> /home/ec2-user/worker.log\" >> start-worker.sh\necho \"shutdown\" >> start-worker.sh\nchmod +x start-worker.sh\necho \"@reboot /home/ec2-user/start-worker.sh\" >> /var/spool/cron/root\n./start-worker.sh"
                ]
              ]
            }
          }
        },
        "TagSpecifications": [
          {
            "ResourceType": "launch-template",
            "Tags": [
              {
                "Key": "Name",
                "Value": "DataTransferS3Stack/EC2WorkerStack/WorkerEC2LaunchTemplate"
              }
            ]
          }
        ]
      },
      "DependsOn": [
        "EC2WorkerStackWorkerAsgRoleDefaultPolicy3BF8DE22",
        "EC2WorkerStackWorkerAsgRole81C6AA56"
      ],
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/EC2WorkerStack/WorkerEC2LaunchTemplate/Resource"
      }
    },
    "EC2WorkerStackS3RepWorkerASGED108717": {
      "Type": "AWS::AutoScaling::AutoScalingGroup",
      "Properties": {
        "AutoScalingGroupName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-Worker-ASG"
            ]
          ]
        },
        "Cooldown": "120",
        "DesiredCapacity": {
          "Ref": "desiredCapacity"
        },
        "LaunchTemplate": {
          "LaunchTemplateId": {
            "Ref": "EC2WorkerStackWorkerEC2LaunchTemplate7DDBFE23"
          },
          "Version": {
            "Fn::GetAtt": [
              "EC2WorkerStackWorkerEC2LaunchTemplate7DDBFE23",
              "LatestVersionNumber"
            ]
          }
        },
        "MaxSize": {
          "Ref": "maxCapacity"
        },
        "MetricsCollection": [
          {
            "Granularity": "1Minute",
            "Metrics": [
              "GroupDesiredCapacity",
              "GroupInServiceInstances"
            ]
          }
        ],
        "MinSize": {
          "Ref": "minCapacity"
        },
        "Tags": [
          {
            "Key": "Name",
            "PropagateAtLaunch": true,
            "Value": {
              "Fn::Join": [
                "",
                [
                  {
                    "Ref": "AWS::StackName"
                  },
                  "-Replication-Worker"
                ]
              ]
            }
          }
        ],
        "VPCZoneIdentifier": {
          "Ref": "ec2Subnets"
        }
      },
      "CreationPolicy": {
        "ResourceSignal": {
          "Count": {
            "Ref": "minCapacity"
          }
        }
      },
      "UpdatePolicy": {
        "AutoScalingScheduledAction": {
          "IgnoreUnmodifiedGroupSizeProperties": true
        }
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/EC2WorkerStack/S3RepWorkerASG/ASG",
        "cdk_nag": {
          "rules_to_suppress": [
            {
              "reason": "we do not need notification, this asg will change automated",
              "id": "AwsSolutions-AS3"
            }
          ]
        },
        "AWS::CloudFormation::Init": {
          "configSets": {
            "default": [
              "config"
            ]
          },
          "config": {
            "files": {
              "/home/ec2-user/cw_agent_config.json": {
                "content": "{\n    \"agent\": {\n        \"metrics_collection_interval\": 60,\n        \"run_as_user\": \"root\"\n    },\n    \"logs\": {\n        \"logs_collected\": {\n            \"files\": {\n                \"collect_list\": [\n                    {\n                        \"file_path\": \"/home/ec2-user/worker.log\",\n                        \"log_group_name\": \"##log group##\",\n                        \"log_stream_name\": \"Instance-{instance_id}\"\n                    }\n                ]\n            }\n        }\n    },\n    \"metrics\": {\n        \"append_dimensions\": {\n            \"AutoScalingGroupName\": \"${aws:AutoScalingGroupName}\",\n            \"InstanceId\": \"${aws:InstanceId}\"\n        },\n        \"aggregation_dimensions\": [\n            [\n                \"AutoScalingGroupName\"\n            ]\n        ],\n        \"metrics_collected\": {\n            \"disk\": {\n                \"measurement\": [\n                    \"used_percent\"\n                ],\n                \"metrics_collection_interval\": 60,\n                \"resources\": [\n                    \"*\"\n                ]\n            },\n            \"mem\": {\n                \"measurement\": [\n                    \"mem_used_percent\"\n                ],\n                \"metrics_collection_interval\": 60\n            }\n        }\n    }\n}",
                "encoding": "plain",
                "mode": "000644",
                "owner": "root",
                "group": "root"
              }
            }
          }
        }
      }
    },
    "EC2WorkerStackS3RepWorkerASGScaleOutSQSLowerPolicyF2DDE3D0": {
      "Type": "AWS::AutoScaling::ScalingPolicy",
      "Properties": {
        "AdjustmentType": "ChangeInCapacity",
        "AutoScalingGroupName": {
          "Ref": "EC2WorkerStackS3RepWorkerASGED108717"
        },
        "PolicyType": "StepScaling",
        "StepAdjustments": [
          {
            "MetricIntervalUpperBound": 0,
            "ScalingAdjustment": -10000
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/EC2WorkerStack/S3RepWorkerASG/ScaleOutSQS/LowerPolicy/Resource"
      }
    },
    "EC2WorkerStackS3RepWorkerASGScaleOutSQSLowerAlarmA6D05E90": {
      "Type": "AWS::CloudWatch::Alarm",
      "Properties": {
        "AlarmActions": [
          {
            "Ref": "EC2WorkerStackS3RepWorkerASGScaleOutSQSLowerPolicyF2DDE3D0"
          }
        ],
        "AlarmDescription": "Lower threshold scaling alarm",
        "ComparisonOperator": "LessThanOrEqualToThreshold",
        "EvaluationPeriods": 1,
        "Metrics": [
          {
            "Expression": "notvisible + visible",
            "Id": "expr_1",
            "Label": "# of messages"
          },
          {
            "Id": "notvisible",
            "MetricStat": {
              "Metric": {
                "Dimensions": [
                  {
                    "Name": "QueueName",
                    "Value": {
                      "Fn::GetAtt": [
                        "S3TransferQueue",
                        "QueueName"
                      ]
                    }
                  }
                ],
                "MetricName": "ApproximateNumberOfMessagesNotVisible",
                "Namespace": "AWS/SQS"
              },
              "Period": 60,
              "Stat": "Maximum"
            },
            "ReturnData": false
          },
          {
            "Id": "visible",
            "MetricStat": {
              "Metric": {
                "Dimensions": [
                  {
                    "Name": "QueueName",
                    "Value": {
                      "Fn::GetAtt": [
                        "S3TransferQueue",
                        "QueueName"
                      ]
                    }
                  }
                ],
                "MetricName": "ApproximateNumberOfMessagesVisible",
                "Namespace": "AWS/SQS"
              },
              "Period": 60,
              "Stat": "Maximum"
            },
            "ReturnData": false
          }
        ],
        "Threshold": 0
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/EC2WorkerStack/S3RepWorkerASG/ScaleOutSQS/LowerAlarm/Resource"
      }
    },
    "EC2WorkerStackS3RepWorkerASGScaleOutSQSUpperPolicy9EC3CAD2": {
      "Type": "AWS::AutoScaling::ScalingPolicy",
      "Properties": {
        "AdjustmentType": "ChangeInCapacity",
        "AutoScalingGroupName": {
          "Ref": "EC2WorkerStackS3RepWorkerASGED108717"
        },
        "PolicyType": "StepScaling",
        "StepAdjustments": [
          {
            "MetricIntervalLowerBound": 0,
            "MetricIntervalUpperBound": 400,
            "ScalingAdjustment": 1
          },
          {
            "MetricIntervalLowerBound": 400,
            "MetricIntervalUpperBound": 1900,
            "ScalingAdjustment": 2
          },
          {
            "MetricIntervalLowerBound": 1900,
            "MetricIntervalUpperBound": 9900,
            "ScalingAdjustment": 5
          },
          {
            "MetricIntervalLowerBound": 9900,
            "ScalingAdjustment": 10
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/EC2WorkerStack/S3RepWorkerASG/ScaleOutSQS/UpperPolicy/Resource"
      }
    },
    "EC2WorkerStackS3RepWorkerASGScaleOutSQSUpperAlarmB2E9CFF5": {
      "Type": "AWS::CloudWatch::Alarm",
      "Properties": {
        "AlarmActions": [
          {
            "Ref": "EC2WorkerStackS3RepWorkerASGScaleOutSQSUpperPolicy9EC3CAD2"
          }
        ],
        "AlarmDescription": "Upper threshold scaling alarm",
        "ComparisonOperator": "GreaterThanOrEqualToThreshold",
        "EvaluationPeriods": 1,
        "Metrics": [
          {
            "Expression": "notvisible + visible",
            "Id": "expr_1",
            "Label": "# of messages"
          },
          {
            "Id": "notvisible",
            "MetricStat": {
              "Metric": {
                "Dimensions": [
                  {
                    "Name": "QueueName",
                    "Value": {
                      "Fn::GetAtt": [
                        "S3TransferQueue",
                        "QueueName"
                      ]
                    }
                  }
                ],
                "MetricName": "ApproximateNumberOfMessagesNotVisible",
                "Namespace": "AWS/SQS"
              },
              "Period": 60,
              "Stat": "Maximum"
            },
            "ReturnData": false
          },
          {
            "Id": "visible",
            "MetricStat": {
              "Metric": {
                "Dimensions": [
                  {
                    "Name": "QueueName",
                    "Value": {
                      "Fn::GetAtt": [
                        "S3TransferQueue",
                        "QueueName"
                      ]
                    }
                  }
                ],
                "MetricName": "ApproximateNumberOfMessagesVisible",
                "Namespace": "AWS/SQS"
              },
              "Period": 60,
              "Stat": "Maximum"
            },
            "ReturnData": false
          }
        ],
        "Threshold": 100
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/EC2WorkerStack/S3RepWorkerASG/ScaleOutSQS/UpperAlarm/Resource"
      }
    },
    "DashboardStackS3Migration32EE701A": {
      "Type": "AWS::CloudWatch::Dashboard",
      "Properties": {
        "DashboardBody": {
          "Fn::Join": [
            "",
            [
              "{\"widgets\":[{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":0,\"y\":0,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Network\",\"region\":\"",
              {
                "Ref": "AWS::Region"
              },
              "\",\"metrics\":[[\"",
              {
                "Ref": "AWS::StackName"
              },
              "\",\"CompletedBytes\",{\"label\":\"Completed(Bytes)\",\"period\":60,\"stat\":\"Sum\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":6,\"y\":0,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Transferred/Failed Objects\",\"region\":\"",
              {
                "Ref": "AWS::Region"
              },
              "\",\"metrics\":[[\"",
              {
                "Ref": "AWS::StackName"
              },
              "\",\"TransferredObjects\",{\"label\":\"Transferred(Objects)\",\"period\":60,\"stat\":\"Sum\"}],[\"",
              {
                "Ref": "AWS::StackName"
              },
              "\",\"FailedObjects\",{\"label\":\"Failed(Objects)\",\"period\":60,\"stat\":\"Sum\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":12,\"y\":0,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Running/Waiting Jobs History\",\"region\":\"",
              {
                "Ref": "AWS::Region"
              },
              "\",\"metrics\":[[\"AWS/SQS\",\"ApproximateNumberOfMessagesVisible\",\"QueueName\",\"",
              {
                "Fn::GetAtt": [
                  "S3TransferQueue",
                  "QueueName"
                ]
              },
              "\",{\"label\":\"Waiting Jobs\",\"period\":60,\"stat\":\"Maximum\"}],[\"AWS/SQS\",\"ApproximateNumberOfMessagesNotVisible\",\"QueueName\",\"",
              {
                "Fn::GetAtt": [
                  "S3TransferQueue",
                  "QueueName"
                ]
              },
              "\",{\"label\":\"Running Jobs\",\"period\":60,\"stat\":\"Maximum\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":18,\"y\":0,\"properties\":{\"view\":\"singleValue\",\"title\":\"Running/Waiting Jobs\",\"region\":\"",
              {
                "Ref": "AWS::Region"
              },
              "\",\"metrics\":[[\"AWS/SQS\",\"ApproximateNumberOfMessagesVisible\",\"QueueName\",\"",
              {
                "Fn::GetAtt": [
                  "S3TransferQueue",
                  "QueueName"
                ]
              },
              "\",{\"label\":\"Waiting Jobs\",\"period\":60,\"stat\":\"Maximum\"}],[\"AWS/SQS\",\"ApproximateNumberOfMessagesNotVisible\",\"QueueName\",\"",
              {
                "Fn::GetAtt": [
                  "S3TransferQueue",
                  "QueueName"
                ]
              },
              "\",{\"label\":\"Running Jobs\",\"period\":60,\"stat\":\"Maximum\"}]]}},{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":0,\"y\":6,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Network In/Out\",\"region\":\"",
              {
                "Ref": "AWS::Region"
              },
              "\",\"metrics\":[[\"AWS/EC2\",\"NetworkIn\",\"AutoScalingGroupName\",\"",
              {
                "Ref": "EC2WorkerStackS3RepWorkerASGED108717"
              },
              "\",{\"period\":60,\"stat\":\"Sum\"}],[\"AWS/EC2\",\"NetworkOut\",\"AutoScalingGroupName\",\"",
              {
                "Ref": "EC2WorkerStackS3RepWorkerASGED108717"
              },
              "\",{\"period\":60,\"stat\":\"Sum\"}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":6,\"y\":6,\"properties\":{\"view\":\"timeSeries\",\"title\":\"CPU Utilization (Average)\",\"region\":\"",
              {
                "Ref": "AWS::Region"
              },
              "\",\"metrics\":[[\"AWS/EC2\",\"CPUUtilization\",\"AutoScalingGroupName\",\"",
              {
                "Ref": "EC2WorkerStackS3RepWorkerASGED108717"
              },
              "\",{\"label\":\"CPU %\",\"period\":60}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":12,\"y\":6,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Memory / Disk (Average)\",\"region\":\"",
              {
                "Ref": "AWS::Region"
              },
              "\",\"metrics\":[[\"CWAgent\",\"mem_used_percent\",\"AutoScalingGroupName\",\"",
              {
                "Ref": "EC2WorkerStackS3RepWorkerASGED108717"
              },
              "\",{\"label\":\"MEM %\",\"period\":60}],[\"CWAgent\",\"disk_used_percent\",\"AutoScalingGroupName\",\"",
              {
                "Ref": "EC2WorkerStackS3RepWorkerASGED108717"
              },
              "\",{\"label\":\"Disk %\",\"period\":60}]],\"yAxis\":{}}},{\"type\":\"metric\",\"width\":6,\"height\":6,\"x\":18,\"y\":6,\"properties\":{\"view\":\"timeSeries\",\"title\":\"Desired / InService Instances\",\"region\":\"",
              {
                "Ref": "AWS::Region"
              },
              "\",\"metrics\":[[\"AWS/AutoScaling\",\"GroupDesiredCapacity\",\"AutoScalingGroupName\",\"",
              {
                "Ref": "EC2WorkerStackS3RepWorkerASGED108717"
              },
              "\",{\"label\":\"Desired Capacity\",\"period\":60,\"stat\":\"Maximum\"}],[\"AWS/AutoScaling\",\"GroupInServiceInstances\",\"AutoScalingGroupName\",\"",
              {
                "Ref": "EC2WorkerStackS3RepWorkerASGED108717"
              },
              "\",{\"label\":\"In Service Instances\",\"period\":60,\"stat\":\"Maximum\"}]],\"yAxis\":{}}}]}"
            ]
          ]
        },
        "DashboardName": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              "-Dashboard-",
              {
                "Ref": "AWS::Region"
              }
            ]
          ]
        }
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/DashboardStack/S3Migration/Resource"
      }
    },
    "s3NotificationHelperFnServiceRole3CA00261": {
      "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"
              ]
            ]
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/s3NotificationHelperFn/ServiceRole/Resource"
      }
    },
    "s3NotificationHelperFnServiceRoleDefaultPolicy43DE8875": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "s3:GetBucketNotification",
                "s3:PutBucketNotification"
              ],
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "srcBucket"
                      }
                    ]
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      "arn:",
                      {
                        "Ref": "AWS::Partition"
                      },
                      ":s3:::",
                      {
                        "Ref": "srcBucket"
                      },
                      "/*"
                    ]
                  ]
                }
              ]
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "s3NotificationHelperFnServiceRoleDefaultPolicy43DE8875",
        "Roles": [
          {
            "Ref": "s3NotificationHelperFnServiceRole3CA00261"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/s3NotificationHelperFn/ServiceRole/DefaultPolicy/Resource"
      }
    },
    "s3NotificationHelperFnE37BE3D0": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "data-transfer-hub/v2.6.6/0f8e0039118c286fbb3c22416454fd6986f519944252001140220c7dac86de46.zip"
        },
        "Description": {
          "Fn::Join": [
            "",
            [
              {
                "Ref": "AWS::StackName"
              },
              " - Create S3 Notification Processor"
            ]
          ]
        },
        "Environment": {
          "Variables": {
            "STACK_NAME": {
              "Ref": "AWS::StackName"
            },
            "SOLUTION_VERSION": "v2.6.6",
            "BUCKET_NAME": {
              "Ref": "srcBucket"
            },
            "OBJECT_PREFIX": {
              "Ref": "srcPrefix"
            },
            "EVENT_QUEUE_NAME": {
              "Fn::GetAtt": [
                "S3TransferQueue",
                "QueueName"
              ]
            },
            "EVENT_QUEUE_ARN": {
              "Fn::GetAtt": [
                "S3TransferQueue",
                "Arn"
              ]
            },
            "EVENT_ACTION": {
              "Ref": "srcEvent"
            }
          }
        },
        "Handler": "lambda_function.lambda_handler",
        "MemorySize": 256,
        "Role": {
          "Fn::GetAtt": [
            "s3NotificationHelperFnServiceRole3CA00261",
            "Arn"
          ]
        },
        "Runtime": "python3.9",
        "Timeout": 60
      },
      "DependsOn": [
        "s3NotificationHelperFnServiceRoleDefaultPolicy43DE8875",
        "s3NotificationHelperFnServiceRole3CA00261"
      ],
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/s3NotificationHelperFn/Resource",
        "aws:asset:path": "asset.0f8e0039118c286fbb3c22416454fd6986f519944252001140220c7dac86de46",
        "aws:asset:is-bundled": false,
        "aws:asset:property": "Code"
      }
    },
    "s3NotificationHelperProviderframeworkonEventServiceRoleE2FA917F": {
      "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"
              ]
            ]
          }
        ]
      },
      "DependsOn": [
        "s3NotificationHelperFnE37BE3D0",
        "s3NotificationHelperFnServiceRoleDefaultPolicy43DE8875",
        "s3NotificationHelperFnServiceRole3CA00261"
      ],
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/s3NotificationHelperProvider/framework-onEvent/ServiceRole/Resource"
      }
    },
    "s3NotificationHelperProviderframeworkonEventServiceRoleDefaultPolicyE80BDAF9": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": "lambda:InvokeFunction",
              "Effect": "Allow",
              "Resource": [
                {
                  "Fn::GetAtt": [
                    "s3NotificationHelperFnE37BE3D0",
                    "Arn"
                  ]
                },
                {
                  "Fn::Join": [
                    "",
                    [
                      {
                        "Fn::GetAtt": [
                          "s3NotificationHelperFnE37BE3D0",
                          "Arn"
                        ]
                      },
                      ":*"
                    ]
                  ]
                }
              ]
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "s3NotificationHelperProviderframeworkonEventServiceRoleDefaultPolicyE80BDAF9",
        "Roles": [
          {
            "Ref": "s3NotificationHelperProviderframeworkonEventServiceRoleE2FA917F"
          }
        ]
      },
      "DependsOn": [
        "s3NotificationHelperFnE37BE3D0",
        "s3NotificationHelperFnServiceRoleDefaultPolicy43DE8875",
        "s3NotificationHelperFnServiceRole3CA00261"
      ],
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/s3NotificationHelperProvider/framework-onEvent/ServiceRole/DefaultPolicy/Resource"
      }
    },
    "s3NotificationHelperProviderframeworkonEvent34BC98A6": {
      "Type": "AWS::Lambda::Function",
      "Properties": {
        "Code": {
          "S3Bucket": {
            "Fn::Sub": "solutions-${AWS::Region}"
          },
          "S3Key": "data-transfer-hub/v2.6.6/3542be390685e0c8353d92ccb5796d343cd93ca946b6b0de798004206a199adc.zip"
        },
        "Description": "AWS CDK resource provider framework - onEvent (DataTransferS3Stack/s3NotificationHelperProvider)",
        "Environment": {
          "Variables": {
            "USER_ON_EVENT_FUNCTION_ARN": {
              "Fn::GetAtt": [
                "s3NotificationHelperFnE37BE3D0",
                "Arn"
              ]
            }
          }
        },
        "Handler": "framework.onEvent",
        "Role": {
          "Fn::GetAtt": [
            "s3NotificationHelperProviderframeworkonEventServiceRoleE2FA917F",
            "Arn"
          ]
        },
        "Runtime": "nodejs18.x",
        "Timeout": 900
      },
      "DependsOn": [
        "s3NotificationHelperFnE37BE3D0",
        "s3NotificationHelperFnServiceRoleDefaultPolicy43DE8875",
        "s3NotificationHelperFnServiceRole3CA00261",
        "s3NotificationHelperProviderframeworkonEventServiceRoleDefaultPolicyE80BDAF9",
        "s3NotificationHelperProviderframeworkonEventServiceRoleE2FA917F"
      ],
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/s3NotificationHelperProvider/framework-onEvent/Resource",
        "aws:asset:path": "asset.3542be390685e0c8353d92ccb5796d343cd93ca946b6b0de798004206a199adc",
        "aws:asset:is-bundled": false,
        "aws:asset:property": "Code"
      }
    },
    "s3NotificationHelperLambdaTrigger": {
      "Type": "AWS::CloudFormation::CustomResource",
      "Properties": {
        "ServiceToken": {
          "Fn::GetAtt": [
            "s3NotificationHelperProviderframeworkonEvent34BC98A6",
            "Arn"
          ]
        }
      },
      "DependsOn": [
        "s3NotificationHelperProviderframeworkonEvent34BC98A6",
        "s3NotificationHelperProviderframeworkonEventServiceRoleDefaultPolicyE80BDAF9",
        "s3NotificationHelperProviderframeworkonEventServiceRoleE2FA917F"
      ],
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/s3NotificationHelperLambdaTrigger/Default"
      }
    },
    "CDKMetadata": {
      "Type": "AWS::CDK::Metadata",
      "Properties": {
        "Analytics": "v2:deflate64:H4sIAAAAAAAA/2VT0Y7aMBD8lnv3uXcgVX3lqKhO5VRKkPqINs4Cvjh26l2DkOV/r+zkUtC9ZGfG68lmHM/k8/yrfHqACz2qpn00upaxYlCtWB7sBjx0yOjFFskFr1DAhfaR5vIlqBb5BQhFc7XQuaaWcQe1wbyxgCToL8n4O2Ao4gDKc+OMVtdJHGgSyrjQXIDVScaFAd/ljgF8BzrVDnyTpYkk0XYk408sXrksjAYatmmgJMiSjDvXa1XmKqAKNSmve9bOZvWWJ2HckWRcu+MP70Kf1yf8huy1WmmTI1ke7C1PQkMn4/8vG9HWDZF81FdLDFbhxruDziEZ6OoGZFwFqz4musUb9J0mKrPRfA9EyCQXuQhi7A9jL+0ZqCW5Ln6v9uxavG+Q8Q9oFlVQCrERK9BGLE9OKxQVA+MbqJO2ZcpbngSqmYwVquA1X6dY7oU1BKtOO+x6A1w87pUkILAjBUbbo4yLwK4ayGT4SasY+1EY07xRFlNCdy1J4Bktk4zbMCYfDKaU0a/AfWBRsqsYjtoeyzFC349w6Wyji68KxK7b+/HHJ7nx7qybfPBlZboR+Q0jTsK6BuU7fTk/f5OzJzl/eCetH32wrDuU26H+AxmlRY51AwAA"
      },
      "Metadata": {
        "aws:cdk:path": "DataTransferS3Stack/CDKMetadata/Default"
      },
      "Condition": "CDKMetadataAvailable"
    }
  },
  "Outputs": {
    "CommonTableName4099A6E9": {
      "Description": "DynamoDB Table Name",
      "Value": {
        "Ref": "S3TransferTable"
      }
    },
    "CommonSplitPartTableName68CB1187": {
      "Description": "Split Part DynamoDB Table Name",
      "Value": {
        "Ref": "S3SplitPartTable"
      }
    },
    "CommonQueueNameEB26B1B7": {
      "Description": "Queue Name",
      "Value": {
        "Fn::GetAtt": [
          "S3TransferQueue",
          "QueueName"
        ]
      }
    },
    "CommonDLQQueueName98D51C56": {
      "Description": "Dead Letter Queue Name",
      "Value": {
        "Fn::GetAtt": [
          "S3TransferQueueDLQ",
          "QueueName"
        ]
      }
    },
    "CommonAlarmTopicName54A80B94": {
      "Description": "Alarm Topic Name",
      "Value": {
        "Fn::GetAtt": [
          "S3TransferAlarmTopic",
          "TopicName"
        ]
      }
    },
    "CommonStackName013B3BAB": {
      "Description": "Stack Name",
      "Value": {
        "Ref": "AWS::StackName"
      }
    },
    "MultiPartStateMachineSfnArnFA9E5135": {
      "Description": "SFN ARN",
      "Value": {
        "Ref": "MultiPartStateMachinemultiPartControllerStateMachine59B94F06"
      }
    },
    "FinderStackFinderLogGroupNameB966FCFB": {
      "Description": "Finder Log Group Name",
      "Value": {
        "Ref": "FinderStackFinderLogGroup9408DAAE"
      }
    },
    "EC2WorkerStackWorkerLogGroupName752FB4C3": {
      "Description": "Worker Log Group Name",
      "Value": {
        "Ref": "CommonS3RepWorkerLogGroupE38567D7"
      }
    },
    "EC2WorkerStackWorkerASGName4A04CB6D": {
      "Description": "Worker ASG Name",
      "Value": {
        "Ref": "EC2WorkerStackS3RepWorkerASGED108717"
      }
    }
  },
  "Mappings": {
    "FinderStackAssetTableC56DDAEC": {
      "aws": {
        "assetDomain": "https://aws-gcr-solutions-assets.s3.amazonaws.com"
      },
      "aws-cn": {
        "assetDomain": "https://aws-gcr-solutions-assets.s3.cn-northwest-1.amazonaws.com.cn"
      },
      "aws-us-gov": {
        "assetDomain": "https://aws-gcr-solutions-assets.s3.amazonaws.com"
      }
    },
    "FinderStackInstanceTypeTableBBF36176": {
      "8": {
        "instanceType": "m6g.large"
      },
      "16": {
        "instanceType": "r6g.large"
      },
      "32": {
        "instanceType": "r6g.xlarge"
      },
      "64": {
        "instanceType": "r6g.2xlarge"
      },
      "128": {
        "instanceType": "r6g.4xlarge"
      },
      "256": {
        "instanceType": "r6g.8xlarge"
      },
      "384": {
        "instanceType": "r6g.12xlarge"
      },
      "512": {
        "instanceType": "r6g.16xlarge"
      }
    },
    "EC2WorkerStackAssetTableD4360D99": {
      "aws": {
        "assetDomain": "https://aws-gcr-solutions-assets.s3.amazonaws.com"
      },
      "aws-cn": {
        "assetDomain": "https://aws-gcr-solutions-assets.s3.cn-northwest-1.amazonaws.com.cn"
      },
      "aws-us-gov": {
        "assetDomain": "https://aws-gcr-solutions-assets.s3.amazonaws.com"
      }
    },
    "ServiceprincipalMap": {
      "af-south-1": {
        "states": "states.af-south-1.amazonaws.com"
      },
      "ap-east-1": {
        "states": "states.ap-east-1.amazonaws.com"
      },
      "ap-northeast-1": {
        "states": "states.ap-northeast-1.amazonaws.com"
      },
      "ap-northeast-2": {
        "states": "states.ap-northeast-2.amazonaws.com"
      },
      "ap-northeast-3": {
        "states": "states.ap-northeast-3.amazonaws.com"
      },
      "ap-south-1": {
        "states": "states.ap-south-1.amazonaws.com"
      },
      "ap-south-2": {
        "states": "states.ap-south-2.amazonaws.com"
      },
      "ap-southeast-1": {
        "states": "states.ap-southeast-1.amazonaws.com"
      },
      "ap-southeast-2": {
        "states": "states.ap-southeast-2.amazonaws.com"
      },
      "ap-southeast-3": {
        "states": "states.ap-southeast-3.amazonaws.com"
      },
      "ap-southeast-4": {
        "states": "states.ap-southeast-4.amazonaws.com"
      },
      "ca-central-1": {
        "states": "states.ca-central-1.amazonaws.com"
      },
      "cn-north-1": {
        "states": "states.cn-north-1.amazonaws.com"
      },
      "cn-northwest-1": {
        "states": "states.cn-northwest-1.amazonaws.com"
      },
      "eu-central-1": {
        "states": "states.eu-central-1.amazonaws.com"
      },
      "eu-central-2": {
        "states": "states.eu-central-2.amazonaws.com"
      },
      "eu-north-1": {
        "states": "states.eu-north-1.amazonaws.com"
      },
      "eu-south-1": {
        "states": "states.eu-south-1.amazonaws.com"
      },
      "eu-south-2": {
        "states": "states.eu-south-2.amazonaws.com"
      },
      "eu-west-1": {
        "states": "states.eu-west-1.amazonaws.com"
      },
      "eu-west-2": {
        "states": "states.eu-west-2.amazonaws.com"
      },
      "eu-west-3": {
        "states": "states.eu-west-3.amazonaws.com"
      },
      "il-central-1": {
        "states": "states.il-central-1.amazonaws.com"
      },
      "me-central-1": {
        "states": "states.me-central-1.amazonaws.com"
      },
      "me-south-1": {
        "states": "states.me-south-1.amazonaws.com"
      },
      "sa-east-1": {
        "states": "states.sa-east-1.amazonaws.com"
      },
      "us-east-1": {
        "states": "states.us-east-1.amazonaws.com"
      },
      "us-east-2": {
        "states": "states.us-east-2.amazonaws.com"
      },
      "us-gov-east-1": {
        "states": "states.us-gov-east-1.amazonaws.com"
      },
      "us-gov-west-1": {
        "states": "states.us-gov-west-1.amazonaws.com"
      },
      "us-iso-east-1": {
        "states": "states.amazonaws.com"
      },
      "us-iso-west-1": {
        "states": "states.amazonaws.com"
      },
      "us-isob-east-1": {
        "states": "states.amazonaws.com"
      },
      "us-west-1": {
        "states": "states.us-west-1.amazonaws.com"
      },
      "us-west-2": {
        "states": "states.us-west-2.amazonaws.com"
      }
    }
  },
  "Conditions": {
    "FinderStackenableFinderTriggerEC192EA1": {
      "Fn::Equals": [
        {
          "Ref": "ec2CronExpression"
        },
        ""
      ]
    },
    "CDKMetadataAvailable": {
      "Fn::Or": [
        {
          "Fn::Or": [
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "af-south-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-east-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-northeast-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-northeast-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-south-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-southeast-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-southeast-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ca-central-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "cn-north-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "cn-northwest-1"
              ]
            }
          ]
        },
        {
          "Fn::Or": [
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-central-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-north-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-south-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-west-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-west-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-west-3"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "il-central-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "me-central-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "me-south-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "sa-east-1"
              ]
            }
          ]
        },
        {
          "Fn::Or": [
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "us-east-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "us-east-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "us-west-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "us-west-2"
              ]
            }
          ]
        }
      ]
    }
  },
  "Rules": {}
}