diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-certificatemanager/test/integ.dns-validated-certificate.js.snapshot/integ-dns-validated-certificate.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-certificatemanager/test/integ.dns-validated-certificate.js.snapshot/integ-dns-validated-certificate.template.json index 6a3eb71757ee3..ebd390be0cb2e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-certificatemanager/test/integ.dns-validated-certificate.js.snapshot/integ-dns-validated-certificate.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-certificatemanager/test/integ.dns-validated-certificate.js.snapshot/integ-dns-validated-certificate.template.json @@ -31,7 +31,7 @@ ] } }, - "CertificateCertificateRequestorFunctionServiceRoleDefaultPolicy3C8845BC": { + "CertificateCertificateRequestorFunctioninlinePolicyAddedToExecutionRole02D5DA9E2": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -41,12 +41,48 @@ "acm:AddTagsToCertificate", "acm:DeleteCertificate", "acm:DescribeCertificate", - "acm:RequestCertificate", - "route53:GetChange" + "acm:RequestCertificate" ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CertificateCertificateRequestorFunctioninlinePolicyAddedToExecutionRole02D5DA9E2", + "Roles": [ + { + "Ref": "CertificateCertificateRequestorFunctionServiceRoleC04C13DA" + } + ] + } + }, + "CertificateCertificateRequestorFunctioninlinePolicyAddedToExecutionRole18173669F": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "route53:GetChange", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CertificateCertificateRequestorFunctioninlinePolicyAddedToExecutionRole18173669F", + "Roles": [ + { + "Ref": "CertificateCertificateRequestorFunctionServiceRoleC04C13DA" + } + ] + } + }, + "CertificateCertificateRequestorFunctioninlinePolicyAddedToExecutionRole20FBD3CBF": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "route53:changeResourceRecordSets", "Condition": { @@ -81,7 +117,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "CertificateCertificateRequestorFunctionServiceRoleDefaultPolicy3C8845BC", + "PolicyName": "CertificateCertificateRequestorFunctioninlinePolicyAddedToExecutionRole20FBD3CBF", "Roles": [ { "Ref": "CertificateCertificateRequestorFunctionServiceRoleC04C13DA" @@ -117,7 +153,6 @@ "Timeout": 900 }, "DependsOn": [ - "CertificateCertificateRequestorFunctionServiceRoleDefaultPolicy3C8845BC", "CertificateCertificateRequestorFunctionServiceRoleC04C13DA" ] }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-certificatemanager/test/integ.dns-validated-certificate.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-certificatemanager/test/integ.dns-validated-certificate.js.snapshot/manifest.json index eb49c3cb9c66a..5e811579ac9c0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-certificatemanager/test/integ.dns-validated-certificate.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-certificatemanager/test/integ.dns-validated-certificate.js.snapshot/manifest.json @@ -40,10 +40,22 @@ "data": "CertificateCertificateRequestorFunctionServiceRoleC04C13DA" } ], - "/integ-dns-validated-certificate/Certificate/CertificateRequestorFunction/ServiceRole/DefaultPolicy/Resource": [ + "/integ-dns-validated-certificate/Certificate/CertificateRequestorFunction/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "CertificateCertificateRequestorFunctionServiceRoleDefaultPolicy3C8845BC" + "data": "CertificateCertificateRequestorFunctioninlinePolicyAddedToExecutionRole02D5DA9E2" + } + ], + "/integ-dns-validated-certificate/Certificate/CertificateRequestorFunction/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "CertificateCertificateRequestorFunctioninlinePolicyAddedToExecutionRole18173669F" + } + ], + "/integ-dns-validated-certificate/Certificate/CertificateRequestorFunction/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "CertificateCertificateRequestorFunctioninlinePolicyAddedToExecutionRole20FBD3CBF" } ], "/integ-dns-validated-certificate/Certificate/CertificateRequestorFunction/Resource": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/aws-cdk-codepipeline-lambda.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/aws-cdk-codepipeline-lambda.assets.json index 3be0c58b5d347..b46a98f312dfd 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/aws-cdk-codepipeline-lambda.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/aws-cdk-codepipeline-lambda.assets.json @@ -1,7 +1,7 @@ { - "version": "34.0.0", + "version": "39.0.0", "files": { - "294db12dc14ebbe6a9d811957c4cd9a3e2f4c39db5b71cc997e40de782f672cb": { + "df34b2df735e0f503ff60945d27845c0c760649008b32f822b19dc8942b54975": { "source": { "path": "aws-cdk-codepipeline-lambda.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "294db12dc14ebbe6a9d811957c4cd9a3e2f4c39db5b71cc997e40de782f672cb.json", + "objectKey": "df34b2df735e0f503ff60945d27845c0c760649008b32f822b19dc8942b54975.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/aws-cdk-codepipeline-lambda.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/aws-cdk-codepipeline-lambda.template.json index 4ce100cedd9f4..0b3bc608179a5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/aws-cdk-codepipeline-lambda.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/aws-cdk-codepipeline-lambda.template.json @@ -846,7 +846,26 @@ ] } }, - "LambdaFunServiceRoleDefaultPolicy217FED83": { + "LambdaFun98622869": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "\n exports.handler = function () {\n console.log(\"Hello, world!\");\n };\n " + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "LambdaFunServiceRoleF0979767", + "Arn" + ] + }, + "Runtime": "nodejs18.x" + }, + "DependsOn": [ + "LambdaFunServiceRoleF0979767" + ] + }, + "LambdaFuninlinePolicyAddedToExecutionRole0E4128878": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -862,33 +881,13 @@ ], "Version": "2012-10-17" }, - "PolicyName": "LambdaFunServiceRoleDefaultPolicy217FED83", + "PolicyName": "LambdaFuninlinePolicyAddedToExecutionRole0E4128878", "Roles": [ { "Ref": "LambdaFunServiceRoleF0979767" } ] } - }, - "LambdaFun98622869": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "\n exports.handler = function () {\n console.log(\"Hello, world!\");\n };\n " - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "LambdaFunServiceRoleF0979767", - "Arn" - ] - }, - "Runtime": "nodejs18.x" - }, - "DependsOn": [ - "LambdaFunServiceRoleDefaultPolicy217FED83", - "LambdaFunServiceRoleF0979767" - ] } }, "Parameters": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/cdk.out index 2313ab5436501..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"34.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/integ.json index e1a4a3a80bc83..0c2d88eb0c016 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "39.0.0", "testCases": { "integ.lambda-pipeline": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/manifest.json index b96dd42d38b9f..9ac74723b9ee5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "39.0.0", "artifacts": { "aws-cdk-codepipeline-lambda.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-cdk-codepipeline-lambda.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/294db12dc14ebbe6a9d811957c4cd9a3e2f4c39db5b71cc997e40de782f672cb.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/df34b2df735e0f503ff60945d27845c0c760649008b32f822b19dc8942b54975.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -33,6 +34,12 @@ "aws-cdk-codepipeline-lambda.assets" ], "metadata": { + "/aws-cdk-codepipeline-lambda/Pipeline": [ + { + "type": "aws:cdk:warning", + "data": "V1 pipeline type is implicitly selected when `pipelineType` is not set. If you want to use V2 type, set `PipelineType.V2`. [ack: @aws-cdk/aws-codepipeline:unspecifiedPipelineType]" + } + ], "/aws-cdk-codepipeline-lambda/Pipeline/ArtifactsBucketEncryptionKey/Resource": [ { "type": "aws:cdk:logicalId", @@ -147,16 +154,16 @@ "data": "LambdaFunServiceRoleF0979767" } ], - "/aws-cdk-codepipeline-lambda/LambdaFun/ServiceRole/DefaultPolicy/Resource": [ + "/aws-cdk-codepipeline-lambda/LambdaFun/Resource": [ { "type": "aws:cdk:logicalId", - "data": "LambdaFunServiceRoleDefaultPolicy217FED83" + "data": "LambdaFun98622869" } ], - "/aws-cdk-codepipeline-lambda/LambdaFun/Resource": [ + "/aws-cdk-codepipeline-lambda/LambdaFun/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "LambdaFun98622869" + "data": "LambdaFuninlinePolicyAddedToExecutionRole0E4128878" } ], "/aws-cdk-codepipeline-lambda/BootstrapVersion": [ @@ -170,6 +177,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "LambdaFunServiceRoleDefaultPolicy217FED83": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaFunServiceRoleDefaultPolicy217FED83", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-cdk-codepipeline-lambda" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/tree.json index 992dea283ca9e..c2d563a29a4f4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js.snapshot/tree.json @@ -627,13 +627,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.4.2" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.4.2" } }, "EventsRole": { @@ -874,13 +874,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.4.2" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.4.2" } } }, @@ -1257,48 +1257,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-codepipeline-lambda/LambdaFun/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-codepipeline-lambda/LambdaFun/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "codepipeline:PutJobFailureResult", - "codepipeline:PutJobSuccessResult" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "LambdaFunServiceRoleDefaultPolicy217FED83", - "roles": [ - { - "Ref": "LambdaFunServiceRoleF0979767" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1329,6 +1287,48 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-codepipeline-lambda/LambdaFun/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-lambda/LambdaFun/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "codepipeline:PutJobFailureResult", + "codepipeline:PutJobSuccessResult" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "LambdaFuninlinePolicyAddedToExecutionRole0E4128878", + "roles": [ + { + "Ref": "LambdaFunServiceRoleF0979767" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1363,7 +1363,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.assets.json index 5f8c3d0616f2e..9aceb87474003 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.assets.json @@ -27,7 +27,7 @@ } } }, - "9f9e7436ed98342a4f1f0b598ef9976aa52d9ad4f145e5ef3b06928a267551fd": { + "03e45b463efcc8924ce152fd4b37318ee4b21a1ae09151a4e7375f1dda2a67ee": { "source": { "path": "awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json", "packaging": "file" @@ -35,12 +35,12 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9f9e7436ed98342a4f1f0b598ef9976aa52d9ad4f145e5ef3b06928a267551fd.json", + "objectKey": "03e45b463efcc8924ce152fd4b37318ee4b21a1ae09151a4e7375f1dda2a67ee.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "762db13f1a00b8f830d9abd4721ad1280fab279e84a33f1fa954091188fae226": { + "b936637ec76fb36c6ec11d87a0b342bf96dcc124b23530eb732aa002166c7c36": { "source": { "path": "aws-cdk-dynamodb-global-replicas-provisioned.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "762db13f1a00b8f830d9abd4721ad1280fab279e84a33f1fa954091188fae226.json", + "objectKey": "b936637ec76fb36c6ec11d87a0b342bf96dcc124b23530eb732aa002166c7c36.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.template.json index b2f70261ca29a..20496946d4f6b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.template.json @@ -291,7 +291,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/9f9e7436ed98342a4f1f0b598ef9976aa52d9ad4f145e5ef3b06928a267551fd.json" + "/03e45b463efcc8924ce152fd4b37318ee4b21a1ae09151a4e7375f1dda2a67ee.json" ] ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json index bad6dcab28573..2a21e129f8eeb 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json @@ -155,7 +155,38 @@ ] } }, - "OnEventHandlerServiceRoleDefaultPolicyC57085D4": { + "OnEventHandler42BEBAE0": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "654051b03fb3684cba885b9015a42237db092a98a4fd2ffc75f07919dde1aca4.zip" + }, + "Handler": "index.onEventHandler", + "Role": { + "Fn::GetAtt": [ + "OnEventHandlerServiceRole15A26729", + "Arn" + ] + }, + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, + "Timeout": 300 + }, + "DependsOn": [ + "OnEventHandlerServiceRole15A26729" + ] + }, + "OnEventHandlerinlinePolicyAddedToExecutionRole05B1C3796": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -179,12 +210,44 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "OnEventHandlerinlinePolicyAddedToExecutionRole05B1C3796", + "Roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "OnEventHandlerinlinePolicyAddedToExecutionRole187629D5C": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "dynamodb:DescribeLimits", "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "OnEventHandlerinlinePolicyAddedToExecutionRole187629D5C", + "Roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "OnEventHandlerinlinePolicyAddedToExecutionRole28650F749": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "dynamodb:DeleteTable", @@ -235,7 +298,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "OnEventHandlerServiceRoleDefaultPolicyC57085D4", + "PolicyName": "OnEventHandlerinlinePolicyAddedToExecutionRole28650F749", "Roles": [ { "Ref": "OnEventHandlerServiceRole15A26729" @@ -243,38 +306,6 @@ ] } }, - "OnEventHandler42BEBAE0": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "654051b03fb3684cba885b9015a42237db092a98a4fd2ffc75f07919dde1aca4.zip" - }, - "Handler": "index.onEventHandler", - "Role": { - "Fn::GetAtt": [ - "OnEventHandlerServiceRole15A26729", - "Arn" - ] - }, - "Runtime": { - "Fn::FindInMap": [ - "LatestNodeRuntimeMap", - { - "Ref": "AWS::Region" - }, - "value" - ] - }, - "Timeout": 300 - }, - "DependsOn": [ - "OnEventHandlerServiceRoleDefaultPolicyC57085D4", - "OnEventHandlerServiceRole15A26729" - ] - }, "IsCompleteHandlerServiceRole5810CC58": { "Type": "AWS::IAM::Role", "Properties": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/manifest.json index 52c0c25140281..badfcdbee49f1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/762db13f1a00b8f830d9abd4721ad1280fab279e84a33f1fa954091188fae226.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b936637ec76fb36c6ec11d87a0b342bf96dcc124b23530eb732aa002166c7c36.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -106,16 +106,28 @@ "data": "OnEventHandlerServiceRole15A26729" } ], - "/aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/ServiceRole/DefaultPolicy/Resource": [ + "/aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/Resource": [ { "type": "aws:cdk:logicalId", - "data": "OnEventHandlerServiceRoleDefaultPolicyC57085D4" + "data": "OnEventHandler42BEBAE0" } ], - "/aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/Resource": [ + "/aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "OnEventHandler42BEBAE0" + "data": "OnEventHandlerinlinePolicyAddedToExecutionRole05B1C3796" + } + ], + "/aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OnEventHandlerinlinePolicyAddedToExecutionRole187629D5C" + } + ], + "/aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OnEventHandlerinlinePolicyAddedToExecutionRole28650F749" } ], "/aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/IsCompleteHandler": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/tree.json index 3f47e7e3f8123..07dd9bcfe8dd1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/tree.json @@ -474,112 +474,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "iam:CreateServiceLinkedRole", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/replication.dynamodb.amazonaws.com/AWSServiceRoleForDynamoDBReplication" - ] - ] - } - }, - { - "Action": "dynamodb:DescribeLimits", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "dynamodb:DeleteTable", - "dynamodb:DeleteTableReplica" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:eu-west-3:", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "referencetoawscdkdynamodbglobalreplicasprovisionedTable12280A12Ref" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:us-east-2:", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "referencetoawscdkdynamodbglobalreplicasprovisionedTable12280A12Ref" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "policyName": "OnEventHandlerServiceRoleDefaultPolicyC57085D4", - "roles": [ - { - "Ref": "OnEventHandlerServiceRole15A26729" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -648,6 +542,180 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "iam:CreateServiceLinkedRole", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/aws-service-role/replication.dynamodb.amazonaws.com/AWSServiceRoleForDynamoDBReplication" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "OnEventHandlerinlinePolicyAddedToExecutionRole05B1C3796", + "roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "dynamodb:DescribeLimits", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "OnEventHandlerinlinePolicyAddedToExecutionRole187629D5C", + "roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:DeleteTable", + "dynamodb:DeleteTableReplica" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:eu-west-3:", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Ref": "referencetoawscdkdynamodbglobalreplicasprovisionedTable12280A12Ref" + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:us-east-2:", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Ref": "referencetoawscdkdynamodbglobalreplicasprovisionedTable12280A12Ref" + } + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "OnEventHandlerinlinePolicyAddedToExecutionRole28650F749", + "roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1793,7 +1861,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/9f9e7436ed98342a4f1f0b598ef9976aa52d9ad4f145e5ef3b06928a267551fd.json" + "/03e45b463efcc8924ce152fd4b37318ee4b21a1ae09151a4e7375f1dda2a67ee.json" ] ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.assets.json index e94a0578c299f..0d81dcd85f99e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.assets.json @@ -29,7 +29,7 @@ } } }, - "5d87eb5120979a918240100326d776a84cf6f760c983751bed4dbfd01e0727d7": { + "e201ef99a110b36880a917df080ff5e08fe74a3655c9562f5f587fd39a18ef0e": { "source": { "path": "cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderB281C954.nested.template.json", "packaging": "file" @@ -37,13 +37,13 @@ "destinations": { "current_account-eu-west-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1", - "objectKey": "5d87eb5120979a918240100326d776a84cf6f760c983751bed4dbfd01e0727d7.json", + "objectKey": "e201ef99a110b36880a917df080ff5e08fe74a3655c9562f5f587fd39a18ef0e.json", "region": "eu-west-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-eu-west-1" } } }, - "e88f7dc799488ac70517b9e0605a810c816eeda66c444953274ad513c4595916": { + "d7c00f87f6871cbf0052bd9c1e511fa3db0c7e972a2f0924a19f89e2af8f2822": { "source": { "path": "cdk-dynamodb-global-20191121.template.json", "packaging": "file" @@ -51,7 +51,7 @@ "destinations": { "current_account-eu-west-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1", - "objectKey": "e88f7dc799488ac70517b9e0605a810c816eeda66c444953274ad513c4595916.json", + "objectKey": "d7c00f87f6871cbf0052bd9c1e511fa3db0c7e972a2f0924a19f89e2af8f2822.json", "region": "eu-west-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-eu-west-1" } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.template.json index 670d02b03ab24..4bd10b282ae1a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdk-dynamodb-global-20191121.template.json @@ -246,7 +246,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1" }, - "/5d87eb5120979a918240100326d776a84cf6f760c983751bed4dbfd01e0727d7.json" + "/e201ef99a110b36880a917df080ff5e08fe74a3655c9562f5f587fd39a18ef0e.json" ] ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderB281C954.nested.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderB281C954.nested.template.json index 583a1697fcd8e..4f0fc3abca19d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderB281C954.nested.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/cdkdynamodbglobal20191121awscdkawsdynamodbReplicaProviderB281C954.nested.template.json @@ -31,7 +31,30 @@ ] } }, - "OnEventHandlerServiceRoleDefaultPolicyC57085D4": { + "OnEventHandler42BEBAE0": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1" + }, + "S3Key": "654051b03fb3684cba885b9015a42237db092a98a4fd2ffc75f07919dde1aca4.zip" + }, + "Handler": "index.onEventHandler", + "Role": { + "Fn::GetAtt": [ + "OnEventHandlerServiceRole15A26729", + "Arn" + ] + }, + "Runtime": "nodejs20.x", + "Timeout": 300 + }, + "DependsOn": [ + "OnEventHandlerServiceRole15A26729" + ] + }, + "OnEventHandlerinlinePolicyAddedToExecutionRole05B1C3796": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -51,12 +74,44 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "OnEventHandlerinlinePolicyAddedToExecutionRole05B1C3796", + "Roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "OnEventHandlerinlinePolicyAddedToExecutionRole187629D5C": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "dynamodb:DescribeLimits", "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "OnEventHandlerinlinePolicyAddedToExecutionRole187629D5C", + "Roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "OnEventHandlerinlinePolicyAddedToExecutionRole28650F749": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "dynamodb:DeleteTable", @@ -107,7 +162,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "OnEventHandlerServiceRoleDefaultPolicyC57085D4", + "PolicyName": "OnEventHandlerinlinePolicyAddedToExecutionRole28650F749", "Roles": [ { "Ref": "OnEventHandlerServiceRole15A26729" @@ -115,30 +170,6 @@ ] } }, - "OnEventHandler42BEBAE0": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1" - }, - "S3Key": "654051b03fb3684cba885b9015a42237db092a98a4fd2ffc75f07919dde1aca4.zip" - }, - "Handler": "index.onEventHandler", - "Role": { - "Fn::GetAtt": [ - "OnEventHandlerServiceRole15A26729", - "Arn" - ] - }, - "Runtime": "nodejs20.x", - "Timeout": 300 - }, - "DependsOn": [ - "OnEventHandlerServiceRoleDefaultPolicyC57085D4", - "OnEventHandlerServiceRole15A26729" - ] - }, "IsCompleteHandlerServiceRole5810CC58": { "Type": "AWS::IAM::Role", "Properties": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/manifest.json index 25cb0a13c0d8e..f2f2de0b6340c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-eu-west-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-eu-west-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1/e88f7dc799488ac70517b9e0605a810c816eeda66c444953274ad513c4595916.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1/d7c00f87f6871cbf0052bd9c1e511fa3db0c7e972a2f0924a19f89e2af8f2822.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -76,16 +76,28 @@ "data": "OnEventHandlerServiceRole15A26729" } ], - "/cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/ServiceRole/DefaultPolicy/Resource": [ + "/cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/Resource": [ { "type": "aws:cdk:logicalId", - "data": "OnEventHandlerServiceRoleDefaultPolicyC57085D4" + "data": "OnEventHandler42BEBAE0" } ], - "/cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/Resource": [ + "/cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "OnEventHandler42BEBAE0" + "data": "OnEventHandlerinlinePolicyAddedToExecutionRole05B1C3796" + } + ], + "/cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OnEventHandlerinlinePolicyAddedToExecutionRole187629D5C" + } + ], + "/cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OnEventHandlerinlinePolicyAddedToExecutionRole28650F749" } ], "/cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/IsCompleteHandler": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/tree.json index 42c7bd5d769ab..c390e869f0937 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global.js.snapshot/tree.json @@ -381,108 +381,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "iam:CreateServiceLinkedRole", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:aws:iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/replication.dynamodb.amazonaws.com/AWSServiceRoleForDynamoDBReplication" - ] - ] - } - }, - { - "Action": "dynamodb:DescribeLimits", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "dynamodb:DeleteTable", - "dynamodb:DeleteTableReplica" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:eu-central-1:", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "referencetocdkdynamodbglobal20191121TableB640876BRef" - } - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:eu-west-2:", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "referencetocdkdynamodbglobal20191121TableB640876BRef" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "policyName": "OnEventHandlerServiceRoleDefaultPolicyC57085D4", - "roles": [ - { - "Ref": "OnEventHandlerServiceRole15A26729" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -543,6 +441,176 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "iam:CreateServiceLinkedRole", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/aws-service-role/replication.dynamodb.amazonaws.com/AWSServiceRoleForDynamoDBReplication" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "OnEventHandlerinlinePolicyAddedToExecutionRole05B1C3796", + "roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "dynamodb:DescribeLimits", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "OnEventHandlerinlinePolicyAddedToExecutionRole187629D5C", + "roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-dynamodb-global-20191121/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:DeleteTable", + "dynamodb:DeleteTableReplica" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:eu-central-1:", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Ref": "referencetocdkdynamodbglobal20191121TableB640876BRef" + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:eu-west-2:", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Ref": "referencetocdkdynamodbglobal20191121TableB640876BRef" + } + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "OnEventHandlerinlinePolicyAddedToExecutionRole28650F749", + "roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1652,7 +1720,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1" }, - "/5d87eb5120979a918240100326d776a84cf6f760c983751bed4dbfd01e0727d7.json" + "/e201ef99a110b36880a917df080ff5e08fe74a3655c9562f5f587fd39a18ef0e.json" ] ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/aws-ecs-integ-alb-idle-timeout.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/aws-ecs-integ-alb-idle-timeout.assets.json index 47a9c594ed263..ebaecf3e7c7e6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/aws-ecs-integ-alb-idle-timeout.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/aws-ecs-integ-alb-idle-timeout.assets.json @@ -1,7 +1,7 @@ { - "version": "32.0.0", + "version": "39.0.0", "files": { - "e998d64c71fcde81ce9134b23f899cc4deb0958c9a214bc510573dea498650ec": { + "4a8b2c235c9a27ab2db5823e04dfe1cbd8c4a8ba404f9e65e0abbd98bf872656": { "source": { "path": "aws-ecs-integ-alb-idle-timeout.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e998d64c71fcde81ce9134b23f899cc4deb0958c9a214bc510573dea498650ec.json", + "objectKey": "4a8b2c235c9a27ab2db5823e04dfe1cbd8c4a8ba404f9e65e0abbd98bf872656.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/aws-ecs-integ-alb-idle-timeout.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/aws-ecs-integ-alb-idle-timeout.template.json index 6b1123cd0cd7a..5849f7815e89e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/aws-ecs-integ-alb-idle-timeout.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/aws-ecs-integ-alb-idle-timeout.template.json @@ -18,9 +18,6 @@ "VpcPublicSubnet1Subnet5C2D37C4": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 0, @@ -44,21 +41,24 @@ "Key": "Name", "Value": "aws-ecs-integ-alb-idle-timeout/Vpc/PublicSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet1RouteTable6C95E38E": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ-alb-idle-timeout/Vpc/PublicSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet1RouteTableAssociation97140677": { @@ -75,12 +75,12 @@ "VpcPublicSubnet1DefaultRoute3DA9E72A": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" } }, "DependsOn": [ @@ -102,15 +102,15 @@ "VpcPublicSubnet1NATGateway4D7517AA": { "Type": "AWS::EC2::NatGateway", "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet1EIPD7E02669", "AllocationId" ] }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, "Tags": [ { "Key": "Name", @@ -126,9 +126,6 @@ "VpcPublicSubnet2Subnet691E08A3": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 1, @@ -152,21 +149,24 @@ "Key": "Name", "Value": "aws-ecs-integ-alb-idle-timeout/Vpc/PublicSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet2RouteTable94F7E489": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ-alb-idle-timeout/Vpc/PublicSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet2RouteTableAssociationDD5762D8": { @@ -183,12 +183,12 @@ "VpcPublicSubnet2DefaultRoute97F91067": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" } }, "DependsOn": [ @@ -210,15 +210,15 @@ "VpcPublicSubnet2NATGateway9182C01D": { "Type": "AWS::EC2::NatGateway", "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet2EIP3C605A87", "AllocationId" ] }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, "Tags": [ { "Key": "Name", @@ -234,9 +234,6 @@ "VpcPrivateSubnet1Subnet536B997A": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 0, @@ -260,21 +257,24 @@ "Key": "Name", "Value": "aws-ecs-integ-alb-idle-timeout/Vpc/PrivateSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet1RouteTableB2C5B500": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ-alb-idle-timeout/Vpc/PrivateSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { @@ -291,21 +291,18 @@ "VpcPrivateSubnet1DefaultRouteBE02A9ED": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" } } }, "VpcPrivateSubnet2Subnet3788AAA1": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 1, @@ -329,21 +326,24 @@ "Key": "Name", "Value": "aws-ecs-integ-alb-idle-timeout/Vpc/PrivateSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet2RouteTableA678073B": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ-alb-idle-timeout/Vpc/PrivateSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { @@ -360,12 +360,12 @@ "VpcPrivateSubnet2DefaultRoute060D2087": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" } } }, @@ -383,11 +383,11 @@ "VpcVPCGWBF912B6E": { "Type": "AWS::EC2::VPCGatewayAttachment", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "InternetGatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "VpcId": { + "Ref": "Vpc8378EB38" } } }, @@ -425,7 +425,6 @@ "ClusterDefaultAutoScalingGroupInstanceSecurityGroupfromawsecsintegalbidletimeoutmyServicelb1SecurityGroup378D68EF32768655356B9A3535": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { - "IpProtocol": "tcp", "Description": "Load balancer to target", "FromPort": 32768, "GroupId": { @@ -434,6 +433,7 @@ "GroupId" ] }, + "IpProtocol": "tcp", "SourceSecurityGroupId": { "Fn::GetAtt": [ "myServicelb1SecurityGroup342C51EA", @@ -446,7 +446,6 @@ "ClusterDefaultAutoScalingGroupInstanceSecurityGroupfromawsecsintegalbidletimeoutmyServicelb2SecurityGroupE659E2B032768655353074D3D1": { "Type": "AWS::EC2::SecurityGroupIngress", "Properties": { - "IpProtocol": "tcp", "Description": "Load balancer to target", "FromPort": 32768, "GroupId": { @@ -455,6 +454,7 @@ "GroupId" ] }, + "IpProtocol": "tcp", "SourceSecurityGroupId": { "Fn::GetAtt": [ "myServicelb2SecurityGroupEB00B5B9", @@ -558,13 +558,13 @@ "ClusterDefaultAutoScalingGroupLaunchConfig81EA5466": { "Type": "AWS::AutoScaling::LaunchConfiguration", "Properties": { + "IamInstanceProfile": { + "Ref": "ClusterDefaultAutoScalingGroupInstanceProfile2BB4FE55" + }, "ImageId": { "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" }, "InstanceType": "t2.micro", - "IamInstanceProfile": { - "Ref": "ClusterDefaultAutoScalingGroupInstanceProfile2BB4FE55" - }, "SecurityGroups": [ { "Fn::GetAtt": [ @@ -596,11 +596,11 @@ "ClusterDefaultAutoScalingGroupASG0F98E147": { "Type": "AWS::AutoScaling::AutoScalingGroup", "Properties": { - "MaxSize": "1", - "MinSize": "1", "LaunchConfigurationName": { "Ref": "ClusterDefaultAutoScalingGroupLaunchConfig81EA5466" }, + "MaxSize": "1", + "MinSize": "1", "Tags": [ { "Key": "Name", @@ -663,7 +663,71 @@ ] } }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E": { + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "ClusterEB0386A7" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + ] + }, + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegalbidletimeoutClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicB6B50466A7AEB964": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" + } + } + }, + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic3B6438EC": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" + } + } + }, + "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole02E489EC0": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -677,7 +741,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole02E489EC0", + "Roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole13AF1063A": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -704,13 +784,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole13AF1063A", + "Roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole2D53500AD": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -724,7 +818,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole2D53500AD", + "Roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole386EBB933": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -742,7 +852,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E", + "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole386EBB933", "Roles": [ { "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" @@ -750,69 +860,38 @@ ] } }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865": { - "Type": "AWS::Lambda::Function", + "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4F316D036": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "ClusterEB0386A7" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } + ], + "Version": "2012-10-17" }, - "Handler": "index.lambda_handler", - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4F316D036", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup" + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E", - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" - ] - }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegalbidletimeoutClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicB6B50466A7AEB964": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" - } - } - }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic3B6438EC": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" - }, - "Endpoint": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865", - "Arn" - ] - } + ] } }, "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB": { @@ -878,9 +957,9 @@ "AutoScalingGroupName": { "Ref": "ClusterDefaultAutoScalingGroupASG0F98E147" }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "DefaultResult": "CONTINUE", "HeartbeatTimeout": 300, + "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "NotificationTargetARN": { "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" }, @@ -899,7 +978,6 @@ "myServicelb1FA8CBE12": { "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", "Properties": { - "Name": "lb1", "LoadBalancerAttributes": [ { "Key": "deletion_protection.enabled", @@ -910,6 +988,7 @@ "Value": "5" } ], + "Name": "lb1", "Scheme": "internet-facing", "SecurityGroups": [ { @@ -957,13 +1036,6 @@ "myServicelb1SecurityGrouptoawsecsintegalbidletimeoutClusterDefaultAutoScalingGroupInstanceSecurityGroup9C8FC9DE327686553594C8842C": { "Type": "AWS::EC2::SecurityGroupEgress", "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "myServicelb1SecurityGroup342C51EA", - "GroupId" - ] - }, - "IpProtocol": "tcp", "Description": "Load balancer to target", "DestinationSecurityGroupId": { "Fn::GetAtt": [ @@ -972,12 +1044,24 @@ ] }, "FromPort": 32768, + "GroupId": { + "Fn::GetAtt": [ + "myServicelb1SecurityGroup342C51EA", + "GroupId" + ] + }, + "IpProtocol": "tcp", "ToPort": 65535 } }, "myServicelb1listener94ADDDDF": { "Type": "AWS::ElasticLoadBalancingV2::Listener", "Properties": { + "Certificates": [ + { + "CertificateArn": "helloworld" + } + ], "DefaultActions": [ { "TargetGroupArn": { @@ -989,11 +1073,6 @@ "LoadBalancerArn": { "Ref": "myServicelb1FA8CBE12" }, - "Certificates": [ - { - "CertificateArn": "helloworld" - } - ], "Port": 443, "Protocol": "HTTPS", "SslPolicy": "ELBSecurityPolicy-TLS-1-2-Ext-2018-06" @@ -1054,17 +1133,15 @@ } } ], - "Priority": 10, "ListenerArn": { "Ref": "myServicelb1listener94ADDDDF" - } + }, + "Priority": 10 } }, "myServiceDNSlb1447CEC86": { "Type": "AWS::Route53::RecordSet", "Properties": { - "Name": "api.example.com.", - "Type": "A", "AliasTarget": { "DNSName": { "Fn::Join": [ @@ -1089,13 +1166,14 @@ }, "HostedZoneId": { "Ref": "HostedZoneDB99F866" - } + }, + "Name": "api.example.com.", + "Type": "A" } }, "myServicelb2C84C7BCB": { "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", "Properties": { - "Name": "lb2", "LoadBalancerAttributes": [ { "Key": "deletion_protection.enabled", @@ -1106,6 +1184,7 @@ "Value": "500" } ], + "Name": "lb2", "Scheme": "internet-facing", "SecurityGroups": [ { @@ -1153,13 +1232,6 @@ "myServicelb2SecurityGrouptoawsecsintegalbidletimeoutClusterDefaultAutoScalingGroupInstanceSecurityGroup9C8FC9DE32768655351C694EBD": { "Type": "AWS::EC2::SecurityGroupEgress", "Properties": { - "GroupId": { - "Fn::GetAtt": [ - "myServicelb2SecurityGroupEB00B5B9", - "GroupId" - ] - }, - "IpProtocol": "tcp", "Description": "Load balancer to target", "DestinationSecurityGroupId": { "Fn::GetAtt": [ @@ -1168,12 +1240,24 @@ ] }, "FromPort": 32768, + "GroupId": { + "Fn::GetAtt": [ + "myServicelb2SecurityGroupEB00B5B9", + "GroupId" + ] + }, + "IpProtocol": "tcp", "ToPort": 65535 } }, "myServicelb2listener2AA6970EB": { "Type": "AWS::ElasticLoadBalancingV2::Listener", "Properties": { + "Certificates": [ + { + "CertificateArn": "helloworld" + } + ], "DefaultActions": [ { "TargetGroupArn": { @@ -1185,11 +1269,6 @@ "LoadBalancerArn": { "Ref": "myServicelb2C84C7BCB" }, - "Certificates": [ - { - "CertificateArn": "helloworld" - } - ], "Port": 443, "Protocol": "HTTPS", "SslPolicy": "ELBSecurityPolicy-TLS-1-2-Ext-2018-06" @@ -1250,17 +1329,15 @@ } } ], - "Priority": 10, "ListenerArn": { "Ref": "myServicelb2listener2AA6970EB" - } + }, + "Priority": 10 } }, "myServiceDNSlb2811DE909": { "Type": "AWS::Route53::RecordSet", "Properties": { - "Name": "frontend.example.com.", - "Type": "A", "AliasTarget": { "DNSName": { "Fn::Join": [ @@ -1285,7 +1362,9 @@ }, "HostedZoneId": { "Ref": "HostedZoneDB99F866" - } + }, + "Name": "frontend.example.com.", + "Type": "A" } }, "myServiceTaskDefTaskRole1C1DE6CC": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/cdk.out index f0b901e7c06e5..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"32.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/integ.json index 882dd9db26912..cbeec97b5dff2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "39.0.0", "testCases": { "multiAlbEcsEc2Test/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/manifest.json index d68689ad7d0af..bd38841888131 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-alb-idle-timeout.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-ecs-integ-alb-idle-timeout.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e998d64c71fcde81ce9134b23f899cc4deb0958c9a214bc510573dea498650ec.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4a8b2c235c9a27ab2db5823e04dfe1cbd8c4a8ba404f9e65e0abbd98bf872656.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -177,6 +178,27 @@ "data": "HostedZoneDB99F866" } ], + "/aws-ecs-integ-alb-idle-timeout/Cluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]", + "trace": [ + "Annotations.addMessage (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:135:29)", + "Annotations.addWarningV2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:66:18)", + "Cluster.handleCanContainersAccessInstanceRoleForAL2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:584:47)", + "Cluster.configureAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:489:26)", + "Cluster.addAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:455:14)", + "Cluster.addCapacity (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:408:14)", + "Object. (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js:25:9)", + "Module._compile (node:internal/modules/cjs/loader:1256:14)", + "Module._extensions..js (node:internal/modules/cjs/loader:1310:10)", + "Module.load (node:internal/modules/cjs/loader:1119:32)", + "Module._load (node:internal/modules/cjs/loader:960:12)", + "Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)", + "node:internal/main/run_main_module:23:47" + ] + } + ], "/aws-ecs-integ-alb-idle-timeout/Cluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -189,7 +211,7 @@ "data": "ClusterDefaultAutoScalingGroupInstanceSecurityGroup1D15236A" } ], - "/aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/InstanceSecurityGroup/from awsecsintegalbidletimeoutmyServicelbSecurityGroupDA02006B:32768-65535": [ + "/aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/InstanceSecurityGroup/from awsecsintegalbidletimeoutmyServicelb1SecurityGroup378D68EF:32768-65535": [ { "type": "aws:cdk:logicalId", "data": "ClusterDefaultAutoScalingGroupInstanceSecurityGroupfromawsecsintegalbidletimeoutmyServicelb1SecurityGroup378D68EF32768655356B9A3535" @@ -237,12 +259,6 @@ "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" } ], - "/aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E" - } - ], "/aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -261,6 +277,36 @@ "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic3B6438EC" } ], + "/aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole02E489EC0" + } + ], + "/aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole13AF1063A" + } + ], + "/aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole2D53500AD" + } + ], + "/aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole386EBB933" + } + ], + "/aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4F316D036" + } + ], "/aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -291,64 +337,64 @@ "data": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" } ], - "/aws-ecs-integ-alb-idle-timeout/myService/lb/Resource": [ + "/aws-ecs-integ-alb-idle-timeout/myService/lb1/Resource": [ { "type": "aws:cdk:logicalId", "data": "myServicelb1FA8CBE12" } ], - "/aws-ecs-integ-alb-idle-timeout/myService/lb/SecurityGroup/Resource": [ + "/aws-ecs-integ-alb-idle-timeout/myService/lb1/SecurityGroup/Resource": [ { "type": "aws:cdk:logicalId", "data": "myServicelb1SecurityGroup342C51EA" } ], - "/aws-ecs-integ-alb-idle-timeout/myService/lb/SecurityGroup/to awsecsintegalbidletimeoutClusterDefaultAutoScalingGroupInstanceSecurityGroup9C8FC9DE:32768-65535": [ + "/aws-ecs-integ-alb-idle-timeout/myService/lb1/SecurityGroup/to awsecsintegalbidletimeoutClusterDefaultAutoScalingGroupInstanceSecurityGroup9C8FC9DE:32768-65535": [ { "type": "aws:cdk:logicalId", "data": "myServicelb1SecurityGrouptoawsecsintegalbidletimeoutClusterDefaultAutoScalingGroupInstanceSecurityGroup9C8FC9DE327686553594C8842C" } ], - "/aws-ecs-integ-alb-idle-timeout/myService/lb/listener/Resource": [ + "/aws-ecs-integ-alb-idle-timeout/myService/lb1/listener/Resource": [ { "type": "aws:cdk:logicalId", "data": "myServicelb1listener94ADDDDF" } ], - "/aws-ecs-integ-alb-idle-timeout/myService/lb/listener/ECSTargetGroupweb80Group/Resource": [ + "/aws-ecs-integ-alb-idle-timeout/myService/lb1/listener/ECSTargetGroupweb80Group/Resource": [ { "type": "aws:cdk:logicalId", "data": "myServicelb1listenerECSTargetGroupweb80Group6EDAD1E5" } ], - "/aws-ecs-integ-alb-idle-timeout/myService/lb/listener/ECSTargetGroupweb90Group/Resource": [ + "/aws-ecs-integ-alb-idle-timeout/myService/lb1/listener/ECSTargetGroupweb90Group/Resource": [ { "type": "aws:cdk:logicalId", "data": "myServicelb1listenerECSTargetGroupweb90Group392113A5" } ], - "/aws-ecs-integ-alb-idle-timeout/myService/lb/listener/ECSTargetGroupweb90Rule/Resource": [ + "/aws-ecs-integ-alb-idle-timeout/myService/lb1/listener/ECSTargetGroupweb90Rule/Resource": [ { "type": "aws:cdk:logicalId", "data": "myServicelb1listenerECSTargetGroupweb90Rule88D36BAE" } ], - "/aws-ecs-integ-alb-idle-timeout/myService/DNSlb/Resource": [ + "/aws-ecs-integ-alb-idle-timeout/myService/DNSlb1/Resource": [ { "type": "aws:cdk:logicalId", "data": "myServiceDNSlb1447CEC86" } ], - "/aws-ecs-integ-alb-idle-timeout/myService/LoadBalancerDNSlb": [ + "/aws-ecs-integ-alb-idle-timeout/myService/LoadBalancerDNSlb1": [ { "type": "aws:cdk:logicalId", - "data": "myServiceLoadBalancerDNSlbDE816AD2" + "data": "myServiceLoadBalancerDNSlb1341EE21A" } ], - "/aws-ecs-integ-alb-idle-timeout/myService/ServiceURLlbhttps": [ + "/aws-ecs-integ-alb-idle-timeout/myService/ServiceURLlb1https": [ { "type": "aws:cdk:logicalId", - "data": "myServiceServiceURLlbhttps4348F098" + "data": "myServiceServiceURLlb1https6C9C5530" } ], "/aws-ecs-integ-alb-idle-timeout/myService/lb2/Resource": [ @@ -447,6 +493,27 @@ "data": "myServiceTaskDefExecutionRoleDefaultPolicyBDAEC571" } ], + "/aws-ecs-integ-alb-idle-timeout/myService/Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]", + "trace": [ + "Annotations.addMessage (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:135:29)", + "Annotations.addWarningV2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:66:18)", + "new BaseService (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/base/base-service.js:270:43)", + "new Ec2Service (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/ec2/ec2-service.js:75:9)", + "ApplicationMultipleTargetGroupsEc2Service.createEc2Service (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs-patterns/lib/ecs/application-multiple-target-groups-ecs-service.js:85:16)", + "new ApplicationMultipleTargetGroupsEc2Service (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs-patterns/lib/ecs/application-multiple-target-groups-ecs-service.js:71:29)", + "Object. (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js:27:1)", + "Module._compile (node:internal/modules/cjs/loader:1256:14)", + "Module._extensions..js (node:internal/modules/cjs/loader:1310:10)", + "Module.load (node:internal/modules/cjs/loader:1119:32)", + "Module._load (node:internal/modules/cjs/loader:960:12)", + "Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)", + "node:internal/main/run_main_module:23:47" + ] + } + ], "/aws-ecs-integ-alb-idle-timeout/myService/Service/Service": [ { "type": "aws:cdk:logicalId", @@ -481,6 +548,7 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "multiAlbEcsEc2TestDefaultTestDeployAssertE5F6E3B0.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/multiAlbEcsEc2TestDefaultTestDeployAssertE5F6E3B0.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/multiAlbEcsEc2TestDefaultTestDeployAssertE5F6E3B0.assets.json index 3e7cf83919285..fa76c89e09687 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/multiAlbEcsEc2TestDefaultTestDeployAssertE5F6E3B0.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/multiAlbEcsEc2TestDefaultTestDeployAssertE5F6E3B0.assets.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/tree.json index 46383ce272fd2..50ec946abdd87 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service-idle-timeout.js.snapshot/tree.json @@ -45,9 +45,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 0, @@ -71,7 +68,10 @@ "key": "Name", "value": "aws-ecs-integ-alb-idle-timeout/Vpc/PublicSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -84,7 +84,8 @@ "path": "aws-ecs-integ-alb-idle-timeout/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -93,15 +94,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ-alb-idle-timeout/Vpc/PublicSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -134,12 +135,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, "destinationCidrBlock": "0.0.0.0/0", "gatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" } } }, @@ -174,15 +175,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { - "subnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, "allocationId": { "Fn::GetAtt": [ "VpcPublicSubnet1EIPD7E02669", "AllocationId" ] }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, "tags": [ { "key": "Name", @@ -199,7 +200,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PublicSubnet2": { @@ -212,9 +214,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 1, @@ -238,7 +237,10 @@ "key": "Name", "value": "aws-ecs-integ-alb-idle-timeout/Vpc/PublicSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -251,7 +253,8 @@ "path": "aws-ecs-integ-alb-idle-timeout/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -260,15 +263,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ-alb-idle-timeout/Vpc/PublicSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -301,12 +304,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, "destinationCidrBlock": "0.0.0.0/0", "gatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" } } }, @@ -341,15 +344,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { - "subnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, "allocationId": { "Fn::GetAtt": [ "VpcPublicSubnet2EIP3C605A87", "AllocationId" ] }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, "tags": [ { "key": "Name", @@ -366,7 +369,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -379,9 +383,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 0, @@ -405,7 +406,10 @@ "key": "Name", "value": "aws-ecs-integ-alb-idle-timeout/Vpc/PrivateSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -418,7 +422,8 @@ "path": "aws-ecs-integ-alb-idle-timeout/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -427,15 +432,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ-alb-idle-timeout/Vpc/PrivateSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -468,12 +473,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, "destinationCidrBlock": "0.0.0.0/0", "natGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" } } }, @@ -485,7 +490,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet2": { @@ -498,9 +504,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 1, @@ -524,7 +527,10 @@ "key": "Name", "value": "aws-ecs-integ-alb-idle-timeout/Vpc/PrivateSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -537,7 +543,8 @@ "path": "aws-ecs-integ-alb-idle-timeout/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -546,15 +553,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ-alb-idle-timeout/Vpc/PrivateSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -587,12 +594,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, "destinationCidrBlock": "0.0.0.0/0", "natGatewayId": { "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" } } }, @@ -604,7 +611,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -632,11 +640,11 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "internetGatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "vpcId": { + "Ref": "Vpc8378EB38" } } }, @@ -648,7 +656,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "HostedZone": { @@ -672,7 +681,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.PublicHostedZone", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cluster": { @@ -729,13 +739,12 @@ "version": "0.0.0" } }, - "from awsecsintegalbidletimeoutmyServicelbSecurityGroupDA02006B:32768-65535": { - "id": "from awsecsintegalbidletimeoutmyServicelbSecurityGroupDA02006B:32768-65535", - "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/InstanceSecurityGroup/from awsecsintegalbidletimeoutmyServicelbSecurityGroupDA02006B:32768-65535", + "from awsecsintegalbidletimeoutmyServicelb1SecurityGroup378D68EF:32768-65535": { + "id": "from awsecsintegalbidletimeoutmyServicelb1SecurityGroup378D68EF:32768-65535", + "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/InstanceSecurityGroup/from awsecsintegalbidletimeoutmyServicelb1SecurityGroup378D68EF:32768-65535", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroupIngress", "aws:cdk:cloudformation:props": { - "ipProtocol": "tcp", "description": "Load balancer to target", "fromPort": 32768, "groupId": { @@ -744,6 +753,7 @@ "GroupId" ] }, + "ipProtocol": "tcp", "sourceSecurityGroupId": { "Fn::GetAtt": [ "myServicelb1SecurityGroup342C51EA", @@ -764,7 +774,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroupIngress", "aws:cdk:cloudformation:props": { - "ipProtocol": "tcp", "description": "Load balancer to target", "fromPort": 32768, "groupId": { @@ -773,6 +782,7 @@ "GroupId" ] }, + "ipProtocol": "tcp", "sourceSecurityGroupId": { "Fn::GetAtt": [ "myServicelb2SecurityGroupEB00B5B9", @@ -790,7 +800,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "InstanceRole": { @@ -802,7 +813,8 @@ "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -909,13 +921,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "InstanceProfile": { @@ -942,13 +956,13 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::AutoScaling::LaunchConfiguration", "aws:cdk:cloudformation:props": { + "iamInstanceProfile": { + "Ref": "ClusterDefaultAutoScalingGroupInstanceProfile2BB4FE55" + }, "imageId": { "Ref": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" }, "instanceType": "t2.micro", - "iamInstanceProfile": { - "Ref": "ClusterDefaultAutoScalingGroupInstanceProfile2BB4FE55" - }, "securityGroups": [ { "Fn::GetAtt": [ @@ -984,11 +998,11 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::AutoScaling::AutoScalingGroup", "aws:cdk:cloudformation:props": { - "maxSize": "1", - "minSize": "1", "launchConfigurationName": { "Ref": "ClusterDefaultAutoScalingGroupLaunchConfig81EA5466" }, + "maxSize": "1", + "minSize": "1", "tags": [ { "key": "Name", @@ -1028,7 +1042,8 @@ "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1075,116 +1090,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ClusterDefaultAutoScalingGroupASG0F98E147" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E", - "roles": [ - { - "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1196,12 +1107,6 @@ "code": { "zipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" }, - "role": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1", - "Arn" - ] - }, "environment": { "variables": { "CLUSTER": { @@ -1210,6 +1115,12 @@ } }, "handler": "index.lambda_handler", + "role": { + "Fn::GetAtt": [ + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1", + "Arn" + ] + }, "runtime": "python3.9", "tags": [ { @@ -1259,15 +1170,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::SNS::Subscription", "aws:cdk:cloudformation:props": { - "protocol": "lambda", - "topicArn": { - "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" - }, "endpoint": { "Fn::GetAtt": [ "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865", "Arn" ] + }, + "protocol": "lambda", + "topicArn": { + "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" } } }, @@ -1279,19 +1190,283 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Subscription", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole02E489EC0", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ClusterDefaultAutoScalingGroupASG0F98E147" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole13AF1063A", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole2D53500AD", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole386EBB933", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4F316D036", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1324,7 +1499,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Role": { @@ -1336,7 +1512,8 @@ "path": "aws-ecs-integ-alb-idle-timeout/Cluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1408,13 +1585,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1426,9 +1605,9 @@ "autoScalingGroupName": { "Ref": "ClusterDefaultAutoScalingGroupASG0F98E147" }, - "lifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "defaultResult": "CONTINUE", "heartbeatTimeout": 300, + "lifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "notificationTargetArn": { "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" }, @@ -1448,19 +1627,22 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { @@ -1476,7 +1658,8 @@ "path": "aws-ecs-integ-alb-idle-timeout/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cert": { @@ -1484,7 +1667,8 @@ "path": "aws-ecs-integ-alb-idle-timeout/Cert", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cert2": { @@ -1492,20 +1676,21 @@ "path": "aws-ecs-integ-alb-idle-timeout/Cert2", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "myService": { "id": "myService", "path": "aws-ecs-integ-alb-idle-timeout/myService", "children": { - "lb": { - "id": "lb", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb", + "lb1": { + "id": "lb1", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb/Resource", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::LoadBalancer", "aws:cdk:cloudformation:props": { @@ -1519,6 +1704,7 @@ "value": "5" } ], + "name": "lb1", "scheme": "internet-facing", "securityGroups": [ { @@ -1546,15 +1732,15 @@ }, "SecurityGroup": { "id": "SecurityGroup", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb/SecurityGroup", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1/SecurityGroup", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb/SecurityGroup/Resource", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1/SecurityGroup/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroup", "aws:cdk:cloudformation:props": { - "groupDescription": "Automatically created Security Group for ELB awsecsintegalbidletimeoutmyServicelb9997A785", + "groupDescription": "Automatically created Security Group for ELB awsecsintegalbidletimeoutmyServicelb1D1305870", "securityGroupIngress": [ { "cidrIp": "0.0.0.0/0", @@ -1576,17 +1762,10 @@ }, "to awsecsintegalbidletimeoutClusterDefaultAutoScalingGroupInstanceSecurityGroup9C8FC9DE:32768-65535": { "id": "to awsecsintegalbidletimeoutClusterDefaultAutoScalingGroupInstanceSecurityGroup9C8FC9DE:32768-65535", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb/SecurityGroup/to awsecsintegalbidletimeoutClusterDefaultAutoScalingGroupInstanceSecurityGroup9C8FC9DE:32768-65535", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1/SecurityGroup/to awsecsintegalbidletimeoutClusterDefaultAutoScalingGroupInstanceSecurityGroup9C8FC9DE:32768-65535", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroupEgress", "aws:cdk:cloudformation:props": { - "groupId": { - "Fn::GetAtt": [ - "myServicelb1SecurityGroup342C51EA", - "GroupId" - ] - }, - "ipProtocol": "tcp", "description": "Load balancer to target", "destinationSecurityGroupId": { "Fn::GetAtt": [ @@ -1595,6 +1774,13 @@ ] }, "fromPort": 32768, + "groupId": { + "Fn::GetAtt": [ + "myServicelb1SecurityGroup342C51EA", + "GroupId" + ] + }, + "ipProtocol": "tcp", "toPort": 65535 } }, @@ -1606,19 +1792,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "listener": { "id": "listener", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb/listener", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1/listener", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb/listener/Resource", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1/listener/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::Listener", "aws:cdk:cloudformation:props": { + "certificates": [ + { + "certificateArn": "helloworld" + } + ], "defaultActions": [ { "type": "forward", @@ -1630,11 +1822,6 @@ "loadBalancerArn": { "Ref": "myServicelb1FA8CBE12" }, - "certificates": [ - { - "certificateArn": "helloworld" - } - ], "port": 443, "protocol": "HTTPS", "sslPolicy": "ELBSecurityPolicy-TLS-1-2-Ext-2018-06" @@ -1647,11 +1834,11 @@ }, "ECSTargetGroupweb80Group": { "id": "ECSTargetGroupweb80Group", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb/listener/ECSTargetGroupweb80Group", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1/listener/ECSTargetGroupweb80Group", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb/listener/ECSTargetGroupweb80Group/Resource", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1/listener/ECSTargetGroupweb80Group/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::TargetGroup", "aws:cdk:cloudformation:props": { @@ -1682,11 +1869,11 @@ }, "ECSTargetGroupweb90Group": { "id": "ECSTargetGroupweb90Group", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb/listener/ECSTargetGroupweb90Group", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1/listener/ECSTargetGroupweb90Group", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb/listener/ECSTargetGroupweb90Group/Resource", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1/listener/ECSTargetGroupweb90Group/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::TargetGroup", "aws:cdk:cloudformation:props": { @@ -1717,11 +1904,11 @@ }, "ECSTargetGroupweb90Rule": { "id": "ECSTargetGroupweb90Rule", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb/listener/ECSTargetGroupweb90Rule", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1/listener/ECSTargetGroupweb90Rule", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-integ-alb-idle-timeout/myService/lb/listener/ECSTargetGroupweb90Rule/Resource", + "path": "aws-ecs-integ-alb-idle-timeout/myService/lb1/listener/ECSTargetGroupweb90Rule/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::ListenerRule", "aws:cdk:cloudformation:props": { @@ -1743,10 +1930,10 @@ } } ], - "priority": 10, "listenerArn": { "Ref": "myServicelb1listener94ADDDDF" - } + }, + "priority": 10 } }, "constructInfo": { @@ -1763,27 +1950,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, - "DNSlb": { - "id": "DNSlb", - "path": "aws-ecs-integ-alb-idle-timeout/myService/DNSlb", + "DNSlb1": { + "id": "DNSlb1", + "path": "aws-ecs-integ-alb-idle-timeout/myService/DNSlb1", "children": { "Resource": { "id": "Resource", - "path": "aws-ecs-integ-alb-idle-timeout/myService/DNSlb/Resource", + "path": "aws-ecs-integ-alb-idle-timeout/myService/DNSlb1/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", "aws:cdk:cloudformation:props": { - "name": "api.example.com.", - "type": "A", "aliasTarget": { "hostedZoneId": { "Fn::GetAtt": [ @@ -1808,7 +1995,9 @@ }, "hostedZoneId": { "Ref": "HostedZoneDB99F866" - } + }, + "name": "api.example.com.", + "type": "A" } }, "constructInfo": { @@ -1819,20 +2008,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.ARecord", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, - "LoadBalancerDNSlb": { - "id": "LoadBalancerDNSlb", - "path": "aws-ecs-integ-alb-idle-timeout/myService/LoadBalancerDNSlb", + "LoadBalancerDNSlb1": { + "id": "LoadBalancerDNSlb1", + "path": "aws-ecs-integ-alb-idle-timeout/myService/LoadBalancerDNSlb1", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", "version": "0.0.0" } }, - "ServiceURLlbhttps": { - "id": "ServiceURLlbhttps", - "path": "aws-ecs-integ-alb-idle-timeout/myService/ServiceURLlbhttps", + "ServiceURLlb1https": { + "id": "ServiceURLlb1https", + "path": "aws-ecs-integ-alb-idle-timeout/myService/ServiceURLlb1https", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", "version": "0.0.0" @@ -1858,6 +2048,7 @@ "value": "500" } ], + "name": "lb2", "scheme": "internet-facing", "securityGroups": [ { @@ -1919,13 +2110,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SecurityGroupEgress", "aws:cdk:cloudformation:props": { - "groupId": { - "Fn::GetAtt": [ - "myServicelb2SecurityGroupEB00B5B9", - "GroupId" - ] - }, - "ipProtocol": "tcp", "description": "Load balancer to target", "destinationSecurityGroupId": { "Fn::GetAtt": [ @@ -1934,6 +2118,13 @@ ] }, "fromPort": 32768, + "groupId": { + "Fn::GetAtt": [ + "myServicelb2SecurityGroupEB00B5B9", + "GroupId" + ] + }, + "ipProtocol": "tcp", "toPort": 65535 } }, @@ -1945,7 +2136,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "listener2": { @@ -1958,6 +2150,11 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::ElasticLoadBalancingV2::Listener", "aws:cdk:cloudformation:props": { + "certificates": [ + { + "certificateArn": "helloworld" + } + ], "defaultActions": [ { "type": "forward", @@ -1969,11 +2166,6 @@ "loadBalancerArn": { "Ref": "myServicelb2C84C7BCB" }, - "certificates": [ - { - "certificateArn": "helloworld" - } - ], "port": 443, "protocol": "HTTPS", "sslPolicy": "ELBSecurityPolicy-TLS-1-2-Ext-2018-06" @@ -2082,10 +2274,10 @@ } } ], - "priority": 10, "listenerArn": { "Ref": "myServicelb2listener2AA6970EB" - } + }, + "priority": 10 } }, "constructInfo": { @@ -2102,13 +2294,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "DNSlb2": { @@ -2121,8 +2315,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::Route53::RecordSet", "aws:cdk:cloudformation:props": { - "name": "frontend.example.com.", - "type": "A", "aliasTarget": { "hostedZoneId": { "Fn::GetAtt": [ @@ -2147,7 +2339,9 @@ }, "hostedZoneId": { "Ref": "HostedZoneDB99F866" - } + }, + "name": "frontend.example.com.", + "type": "A" } }, "constructInfo": { @@ -2158,7 +2352,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.ARecord", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LoadBalancerDNSlb2": { @@ -2190,7 +2385,8 @@ "path": "aws-ecs-integ-alb-idle-timeout/myService/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2263,13 +2459,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2362,7 +2560,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -2380,7 +2579,8 @@ "path": "aws-ecs-integ-alb-idle-timeout/myService/TaskDef/ExecutionRole/ImportExecutionRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2452,19 +2652,22 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Service": { @@ -2537,7 +2740,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -2581,7 +2785,7 @@ "path": "multiAlbEcsEc2Test/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.4.2" } }, "DeployAssert": { @@ -2627,7 +2831,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/applicationMultipleTargetGroupsEc2ServiceTestDefaultTestDeployAssert1194B50F.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/applicationMultipleTargetGroupsEc2ServiceTestDefaultTestDeployAssert1194B50F.assets.json index 910b880ef0d6a..85ff67c52fb6a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/applicationMultipleTargetGroupsEc2ServiceTestDefaultTestDeployAssert1194B50F.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/applicationMultipleTargetGroupsEc2ServiceTestDefaultTestDeployAssert1194B50F.assets.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/aws-ecs-integ-multiple-alb.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/aws-ecs-integ-multiple-alb.assets.json index 99bb346a93a88..04284d3189316 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/aws-ecs-integ-multiple-alb.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/aws-ecs-integ-multiple-alb.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "8b890d97c3cbf756b1557bcbd7797001fd3ce8a3f30d26704ab0cd3f1708bc28": { + "c3c4d7b2a6bc7be9d6b6b28dc1f55eac4feaa8e5950199743a94de6b43021b38": { "source": { "path": "aws-ecs-integ-multiple-alb.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "8b890d97c3cbf756b1557bcbd7797001fd3ce8a3f30d26704ab0cd3f1708bc28.json", + "objectKey": "c3c4d7b2a6bc7be9d6b6b28dc1f55eac4feaa8e5950199743a94de6b43021b38.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/aws-ecs-integ-multiple-alb.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/aws-ecs-integ-multiple-alb.template.json index a9c7521131bb3..9a41626223d9d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/aws-ecs-integ-multiple-alb.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/aws-ecs-integ-multiple-alb.template.json @@ -636,7 +636,71 @@ ] } }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E": { + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "ClusterEB0386A7" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + ] + }, + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegmultiplealbClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic69A3F5ED8878BC87": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" + } + } + }, + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic3B6438EC": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" + } + } + }, + "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole02E489EC0": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -650,7 +714,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole02E489EC0", + "Roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole13AF1063A": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -677,13 +757,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole13AF1063A", + "Roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole2D53500AD": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -697,7 +791,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole2D53500AD", + "Roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole386EBB933": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -715,7 +825,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E", + "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole386EBB933", "Roles": [ { "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" @@ -723,69 +833,38 @@ ] } }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865": { - "Type": "AWS::Lambda::Function", + "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4F316D036": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "ClusterEB0386A7" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4F316D036", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup" + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E", - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" - ] - }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegmultiplealbClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic69A3F5ED8878BC87": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" - } - } - }, - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic3B6438EC": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupDrainECSHookFunctionFE918865", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB" - } + ] } }, "ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicFE5437FB": { @@ -872,13 +951,13 @@ "myServiceLB168895E1": { "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", "Properties": { - "Name": "LB", "LoadBalancerAttributes": [ { "Key": "deletion_protection.enabled", "Value": "false" } ], + "Name": "LB", "Scheme": "internet-facing", "SecurityGroups": [ { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/integ.json index 6ab5ca41a43be..bc04a8be4aa03 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "applicationMultipleTargetGroupsEc2ServiceTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/manifest.json index a577672dc9057..b54131693f754 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-multiple-alb.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8b890d97c3cbf756b1557bcbd7797001fd3ce8a3f30d26704ab0cd3f1708bc28.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c3c4d7b2a6bc7be9d6b6b28dc1f55eac4feaa8e5950199743a94de6b43021b38.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,27 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ-multiple-alb/Cluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]", + "trace": [ + "Annotations.addMessage (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:135:29)", + "Annotations.addWarningV2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:66:18)", + "Cluster.handleCanContainersAccessInstanceRoleForAL2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:584:47)", + "Cluster.configureAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:489:26)", + "Cluster.addAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:455:14)", + "Cluster.addCapacity (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:408:14)", + "Object. (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js:20:9)", + "Module._compile (node:internal/modules/cjs/loader:1256:14)", + "Module._extensions..js (node:internal/modules/cjs/loader:1310:10)", + "Module.load (node:internal/modules/cjs/loader:1119:32)", + "Module._load (node:internal/modules/cjs/loader:960:12)", + "Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)", + "node:internal/main/run_main_module:23:47" + ] + } + ], "/aws-ecs-integ-multiple-alb/Cluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -226,12 +247,6 @@ "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" } ], - "/aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E" - } - ], "/aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -250,6 +265,36 @@ "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic3B6438EC" } ], + "/aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole02E489EC0" + } + ], + "/aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole13AF1063A" + } + ], + "/aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole2D53500AD" + } + ], + "/aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole386EBB933" + } + ], + "/aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4F316D036" + } + ], "/aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -370,6 +415,27 @@ "data": "myServiceTaskDefExecutionRoleDefaultPolicyBDAEC571" } ], + "/aws-ecs-integ-multiple-alb/myService/Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]", + "trace": [ + "Annotations.addMessage (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:135:29)", + "Annotations.addWarningV2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:66:18)", + "new BaseService (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/base/base-service.js:270:43)", + "new Ec2Service (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/ec2/ec2-service.js:75:9)", + "ApplicationMultipleTargetGroupsEc2Service.createEc2Service (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs-patterns/lib/ecs/application-multiple-target-groups-ecs-service.js:85:16)", + "new ApplicationMultipleTargetGroupsEc2Service (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs-patterns/lib/ecs/application-multiple-target-groups-ecs-service.js:71:29)", + "Object. (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js:22:1)", + "Module._compile (node:internal/modules/cjs/loader:1256:14)", + "Module._extensions..js (node:internal/modules/cjs/loader:1310:10)", + "Module.load (node:internal/modules/cjs/loader:1119:32)", + "Module._load (node:internal/modules/cjs/loader:960:12)", + "Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)", + "node:internal/main/run_main_module:23:47" + ] + } + ], "/aws-ecs-integ-multiple-alb/myService/Service/Service": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/tree.json index 7e341f4dee25d..b6c785fa6bb0f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.multiple-application-load-balanced-ecs-service.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,17 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-multiple-alb/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -105,8 +106,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +125,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +145,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +165,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +193,15 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0", + "metadata": [] } }, "PublicSubnet2": { @@ -242,16 +244,17 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-multiple-alb/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -272,8 +275,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +294,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +314,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +334,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +362,15 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -409,16 +413,17 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-multiple-alb/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -439,8 +444,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +463,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +483,15 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet2": { @@ -528,16 +534,17 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-multiple-alb/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -558,8 +565,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +584,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +604,15 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -622,8 +630,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +649,15 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0", + "metadata": [] } }, "Cluster": { @@ -663,8 +672,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -701,8 +710,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } }, "from awsecsintegmultiplealbmyServiceLBSecurityGroupA7380E25:32768-65535": { @@ -730,14 +739,15 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0", + "metadata": [] } }, "InstanceRole": { @@ -748,8 +758,9 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -779,8 +790,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -849,20 +860,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0", + "metadata": [] } }, "InstanceProfile": { @@ -879,8 +892,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "LaunchConfig": { @@ -921,8 +934,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLaunchConfiguration", + "version": "0.0.0" } }, "ASG": { @@ -954,8 +967,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -974,8 +987,9 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1019,119 +1033,15 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ClusterDefaultAutoScalingGroupASG0F98E147" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy221F6E5E", - "roles": [ - { - "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1168,8 +1078,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegmultiplealbClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic69A3F5ED": { @@ -1192,8 +1102,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1219,26 +1129,290 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole02E489EC0", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ClusterDefaultAutoScalingGroupASG0F98E147" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole13AF1063A", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole2D53500AD", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole386EBB933", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4F316D036", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole2AC250B1" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1264,14 +1438,15 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0", + "metadata": [] } }, "Role": { @@ -1282,8 +1457,9 @@ "id": "ImportRole", "path": "aws-ecs-integ-multiple-alb/Cluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1313,8 +1489,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1348,20 +1524,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1388,42 +1566,46 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0", + "metadata": [] } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ-multiple-alb/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ-multiple-alb/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0", + "metadata": [] } }, "myService": { @@ -1446,6 +1628,7 @@ "value": "false" } ], + "name": "LB", "scheme": "internet-facing", "securityGroups": [ { @@ -1467,8 +1650,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", + "version": "0.0.0" } }, "SecurityGroup": { @@ -1497,8 +1680,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } }, "to awsecsintegmultiplealbClusterDefaultAutoScalingGroupInstanceSecurityGroup9E5900FD:32768-65535": { @@ -1526,14 +1709,15 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupEgress", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0", + "metadata": [] } }, "PublicListener": { @@ -1562,8 +1746,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", + "version": "0.0.0" } }, "ECSTargetGroupweb80Group": { @@ -1591,14 +1775,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", + "version": "0.0.0" } }, "ECSTargetGroupweb90Group": { @@ -1626,14 +1810,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", + "version": "0.0.0" } }, "ECSTargetGroupweb90Rule": { @@ -1671,42 +1855,44 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListenerRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListenerRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", + "version": "0.0.0", + "metadata": [] } }, "LoadBalancerDNS": { "id": "LoadBalancerDNS", "path": "aws-ecs-integ-multiple-alb/myService/LoadBalancerDNS", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" } }, "ServiceURL": { "id": "ServiceURL", "path": "aws-ecs-integ-multiple-alb/myService/ServiceURL", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" } }, "TaskDef": { @@ -1721,8 +1907,9 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ-multiple-alb/myService/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1746,8 +1933,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1788,20 +1975,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1862,8 +2051,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "web": { @@ -1882,20 +2071,21 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_logs.LogGroup", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } }, "ExecutionRole": { @@ -1906,8 +2096,9 @@ "id": "ImportExecutionRole", "path": "aws-ecs-integ-multiple-alb/myService/TaskDef/ExecutionRole/ImportExecutionRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1931,8 +2122,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1972,26 +2163,29 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0", + "metadata": [] } }, "Service": { @@ -2038,42 +2232,43 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs_patterns.ApplicationMultipleTargetGroupsEc2Service", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ-multiple-alb/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ-multiple-alb/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "applicationMultipleTargetGroupsEc2ServiceTest": { @@ -2089,7 +2284,7 @@ "path": "applicationMultipleTargetGroupsEc2ServiceTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -2100,22 +2295,22 @@ "id": "BootstrapVersion", "path": "applicationMultipleTargetGroupsEc2ServiceTest/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "applicationMultipleTargetGroupsEc2ServiceTest/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } } }, @@ -2135,13 +2330,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/aws-ecs-integ-ecs.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/aws-ecs-integ-ecs.assets.json index eb3ce1d8fd880..7ed96ab990f3b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/aws-ecs-integ-ecs.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/aws-ecs-integ-ecs.assets.json @@ -1,7 +1,7 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "879d43bd7fa593d0da48ddd22d54a1ec2eab5a43a0ec95fb9933166ec27ea119": { + "f74dbede61f9aab43f32b6b2349cceb9afa914d6687c031a4c26d1882c912feb": { "source": { "path": "aws-ecs-integ-ecs.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "879d43bd7fa593d0da48ddd22d54a1ec2eab5a43a0ec95fb9933166ec27ea119.json", + "objectKey": "f74dbede61f9aab43f32b6b2349cceb9afa914d6687c031a4c26d1882c912feb.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/aws-ecs-integ-ecs.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/aws-ecs-integ-ecs.template.json index 54326dd6e447f..95244e0ca3382 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/aws-ecs-integ-ecs.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/aws-ecs-integ-ecs.template.json @@ -484,7 +484,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -498,7 +562,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -525,13 +605,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -545,7 +639,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -563,7 +673,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -571,69 +681,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/integ.json index ac2fab21b40a0..29c7103513726 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "scheduledEc2TaskTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/manifest.json index 3f73c6c19a314..85058da283f62 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-ecs.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/879d43bd7fa593d0da48ddd22d54a1ec2eab5a43a0ec95fb9933166ec27ea119.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f74dbede61f9aab43f32b6b2349cceb9afa914d6687c031a4c26d1882c912feb.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -112,6 +112,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ-ecs/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ-ecs/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -160,12 +166,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -184,6 +184,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -321,6 +351,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ-ecs" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/scheduledEc2TaskTestDefaultTestDeployAssertF02313CA.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/scheduledEc2TaskTestDefaultTestDeployAssertF02313CA.assets.json index 61bf10763057e..62b1786c05ef8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/scheduledEc2TaskTestDefaultTestDeployAssertF02313CA.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/scheduledEc2TaskTestDefaultTestDeployAssertF02313CA.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/tree.json index d110f83eb9b0a..bb57c1155b22b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.js.snapshot/tree.json @@ -84,7 +84,8 @@ "path": "aws-ecs-integ-ecs/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -199,7 +200,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -251,7 +253,8 @@ "path": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -318,7 +321,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -362,7 +366,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "EcsCluster": { @@ -422,7 +427,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "InstanceRole": { @@ -434,7 +440,8 @@ "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -541,13 +548,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "InstanceProfile": { @@ -573,7 +582,8 @@ "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LaunchTemplate": { @@ -666,7 +676,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ASG": { @@ -724,7 +735,8 @@ "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -771,116 +783,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -975,19 +883,283 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Subscription", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1020,7 +1192,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Role": { @@ -1032,7 +1205,8 @@ "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1104,13 +1278,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1144,19 +1320,22 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { @@ -1172,7 +1351,8 @@ "path": "aws-ecs-integ-ecs/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ScheduledEc2Task": { @@ -1232,7 +1412,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ScheduledTaskDef": { @@ -1248,7 +1429,8 @@ "path": "aws-ecs-integ-ecs/ScheduledEc2Task/ScheduledTaskDef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1279,7 +1461,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1362,7 +1545,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1380,7 +1564,8 @@ "path": "aws-ecs-integ-ecs/ScheduledEc2Task/ScheduledTaskDef/ExecutionRole/ImportExecutionRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1452,13 +1637,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "EventsRole": { @@ -1470,7 +1657,8 @@ "path": "aws-ecs-integ-ecs/ScheduledEc2Task/ScheduledTaskDef/EventsRole/ImportEventsRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1580,19 +1768,22 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1658,7 +1849,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ScheduledTaskDef": { @@ -1674,7 +1866,8 @@ "path": "aws-ecs-integ-ecs/ScheduledEc2Task2/ScheduledTaskDef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1705,7 +1898,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1788,7 +1982,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1806,7 +2001,8 @@ "path": "aws-ecs-integ-ecs/ScheduledEc2Task2/ScheduledTaskDef/ExecutionRole/ImportExecutionRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1878,13 +2074,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "EventsRole": { @@ -1896,7 +2094,8 @@ "path": "aws-ecs-integ-ecs/ScheduledEc2Task2/ScheduledTaskDef/EventsRole/ImportEventsRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2006,19 +2205,22 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -2062,7 +2264,7 @@ "path": "scheduledEc2TaskTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -2108,7 +2310,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/cdk.out index bd5311dc372de..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.5"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/integ.json index 47b8c266de480..b19246c5ba7c9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "testCases": { "networkLoadBalancedEc2ServiceTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/manifest.json index 036691bbe7ca5..f53ce163f6a63 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "artifacts": { "tls-network-load-balanced-ecs-service.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0161bac43ff9cc4f7fc053c5d59ed55fdea47032d666d39f2f545416284dc1d7.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1c1f3d5009f680751e580dbe78d97562e671f0b5f4bce98565a54dacd5a7da72.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -202,6 +202,27 @@ "data": "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E" } ], + "/tls-network-load-balanced-ecs-service/Cluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]", + "trace": [ + "Annotations.addMessage (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:135:29)", + "Annotations.addWarningV2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:66:18)", + "Cluster.handleCanContainersAccessInstanceRoleForAL2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:584:47)", + "Cluster.configureAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:489:26)", + "Cluster.addAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:455:14)", + "Cluster.addCapacity (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:408:14)", + "Object. (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js:24:9)", + "Module._compile (node:internal/modules/cjs/loader:1256:14)", + "Module._extensions..js (node:internal/modules/cjs/loader:1310:10)", + "Module.load (node:internal/modules/cjs/loader:1119:32)", + "Module._load (node:internal/modules/cjs/loader:960:12)", + "Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)", + "node:internal/main/run_main_module:23:47" + ] + } + ], "/tls-network-load-balanced-ecs-service/Cluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -211,7 +232,20 @@ "/tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity": [ { "type": "aws:cdk:warning", - "data": "desiredCapacity has been configured. Be aware this will reset the size of your AutoScalingGroup on every deployment. See https://github.com/aws/aws-cdk/issues/5215 [ack: @aws-cdk/aws-autoscaling:desiredCapacitySet]" + "data": "desiredCapacity has been configured. Be aware this will reset the size of your AutoScalingGroup on every deployment. See https://github.com/aws/aws-cdk/issues/5215 [ack: @aws-cdk/aws-autoscaling:desiredCapacitySet]", + "trace": [ + "Annotations.addMessage (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:135:29)", + "Annotations.addWarningV2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:66:18)", + "new AutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.js:649:43)", + "Cluster.addCapacity (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:402:34)", + "Object. (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js:24:9)", + "Module._compile (node:internal/modules/cjs/loader:1256:14)", + "Module._extensions..js (node:internal/modules/cjs/loader:1310:10)", + "Module.load (node:internal/modules/cjs/loader:1119:32)", + "Module._load (node:internal/modules/cjs/loader:960:12)", + "Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)", + "node:internal/main/run_main_module:23:47" + ] } ], "/tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/InstanceSecurityGroup/Resource": [ @@ -256,12 +290,6 @@ "data": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" } ], - "/tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleDefaultPolicy7671EAB6" - } - ], "/tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -280,6 +308,36 @@ "data": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionTopicC6667F16" } ], + "/tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole03D211CEC" + } + ], + "/tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole1D3180343" + } + ], + "/tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole2565B50C2" + } + ], + "/tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole34274DBB4" + } + ], + "/tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole4598A4B92" + } + ], "/tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -364,6 +422,26 @@ "data": "myServiceWithTlsTaskDefExecutionRoleDefaultPolicyED1CC7D2" } ], + "/tls-network-load-balanced-ecs-service/myServiceWithTls/Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]", + "trace": [ + "Annotations.addMessage (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:135:29)", + "Annotations.addWarningV2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:66:18)", + "new BaseService (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/base/base-service.js:270:43)", + "new Ec2Service (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/ec2/ec2-service.js:75:9)", + "new NetworkLoadBalancedEc2Service (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs-patterns/lib/ecs/network-load-balanced-ecs-service.js:64:24)", + "Object. (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js:30:1)", + "Module._compile (node:internal/modules/cjs/loader:1256:14)", + "Module._extensions..js (node:internal/modules/cjs/loader:1310:10)", + "Module.load (node:internal/modules/cjs/loader:1119:32)", + "Module._load (node:internal/modules/cjs/loader:960:12)", + "Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)", + "node:internal/main/run_main_module:23:47" + ] + } + ], "/tls-network-load-balanced-ecs-service/myServiceWithTls/Service/Service": [ { "type": "aws:cdk:logicalId", @@ -381,15 +459,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "myCert34176BC9": [ - { - "type": "aws:cdk:logicalId", - "data": "myCert34176BC9", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "tls-network-load-balanced-ecs-service" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/networkLoadBalancedEc2ServiceTestDefaultTestDeployAssert34DAD7DE.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/networkLoadBalancedEc2ServiceTestDefaultTestDeployAssert34DAD7DE.assets.json index 6c531f1b6974d..18bbff5145bb7 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/networkLoadBalancedEc2ServiceTestDefaultTestDeployAssert34DAD7DE.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/networkLoadBalancedEc2ServiceTestDefaultTestDeployAssert34DAD7DE.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/tls-network-load-balanced-ecs-service.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/tls-network-load-balanced-ecs-service.assets.json index 5000e645a839a..0de288d0b3578 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/tls-network-load-balanced-ecs-service.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/tls-network-load-balanced-ecs-service.assets.json @@ -1,20 +1,20 @@ { - "version": "36.0.5", + "version": "39.0.0", "files": { - "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1": { + "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c": { "source": { - "path": "asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1", + "path": "asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1.zip", + "objectKey": "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "0161bac43ff9cc4f7fc053c5d59ed55fdea47032d666d39f2f545416284dc1d7": { + "1c1f3d5009f680751e580dbe78d97562e671f0b5f4bce98565a54dacd5a7da72": { "source": { "path": "tls-network-load-balanced-ecs-service.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0161bac43ff9cc4f7fc053c5d59ed55fdea47032d666d39f2f545416284dc1d7.json", + "objectKey": "1c1f3d5009f680751e580dbe78d97562e671f0b5f4bce98565a54dacd5a7da72.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/tls-network-load-balanced-ecs-service.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/tls-network-load-balanced-ecs-service.template.json index 02d509bce88e2..f76f11b23291a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/tls-network-load-balanced-ecs-service.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/tls-network-load-balanced-ecs-service.template.json @@ -489,7 +489,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1.zip" + "S3Key": "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c.zip" }, "Timeout": 900, "MemorySize": 128, @@ -789,7 +789,71 @@ ] } }, - "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleDefaultPolicy7671EAB6": { + "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunction0FED543D": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "ClusterEB0386A7" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" + ] + }, + "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionAllowInvoketlsnetworkloadbalancedecsserviceClusterDefaultAutoScalingGroupCapacityLifecycleHookDrainHookTopic6592E5608F9A40F3": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunction0FED543D", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ClusterDefaultAutoScalingGroupCapacityLifecycleHookDrainHookTopic3C09C53E" + } + } + }, + "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionTopicC6667F16": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunction0FED543D", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ClusterDefaultAutoScalingGroupCapacityLifecycleHookDrainHookTopic3C09C53E" + } + } + }, + "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole03D211CEC": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -803,7 +867,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole03D211CEC", + "Roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" + } + ] + } + }, + "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole1D3180343": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -830,13 +910,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole1D3180343", + "Roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" + } + ] + } + }, + "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole2565B50C2": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -850,7 +944,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole2565B50C2", + "Roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" + } + ] + } + }, + "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole34274DBB4": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -868,7 +978,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleDefaultPolicy7671EAB6", + "PolicyName": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole34274DBB4", "Roles": [ { "Ref": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" @@ -876,69 +986,38 @@ ] } }, - "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunction0FED543D": { - "Type": "AWS::Lambda::Function", + "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole4598A4B92": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "ClusterEB0386A7" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole4598A4B92", + "Roles": [ { - "Key": "Name", - "Value": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity" + "Ref": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleDefaultPolicy7671EAB6", - "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" - ] - }, - "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionAllowInvoketlsnetworkloadbalancedecsserviceClusterDefaultAutoScalingGroupCapacityLifecycleHookDrainHookTopic6592E5608F9A40F3": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunction0FED543D", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ClusterDefaultAutoScalingGroupCapacityLifecycleHookDrainHookTopic3C09C53E" - } - } - }, - "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionTopicC6667F16": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunction0FED543D", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "ClusterDefaultAutoScalingGroupCapacityLifecycleHookDrainHookTopic3C09C53E" - } + ] } }, "ClusterDefaultAutoScalingGroupCapacityLifecycleHookDrainHookTopic3C09C53E": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/tree.json index a0d4fb227a937..baa69d307a1b0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs-patterns/test/ec2/integ.tls-network-load-balanced-ecs-service.js.snapshot/tree.json @@ -84,7 +84,8 @@ "path": "tls-network-load-balanced-ecs-service/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -199,7 +200,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PublicSubnet2": { @@ -251,7 +253,8 @@ "path": "tls-network-load-balanced-ecs-service/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -366,7 +369,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -418,7 +422,8 @@ "path": "tls-network-load-balanced-ecs-service/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -485,7 +490,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet2": { @@ -537,7 +543,8 @@ "path": "tls-network-load-balanced-ecs-service/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -604,7 +611,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -660,13 +668,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LatestNodeRuntimeMap": { @@ -768,7 +778,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "InstanceRole": { @@ -780,7 +791,8 @@ "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/InstanceRole/ImportInstanceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -887,13 +899,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "InstanceProfile": { @@ -919,7 +933,8 @@ "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/ImportedInstanceProfile", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LaunchTemplate": { @@ -1012,7 +1027,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ASG": { @@ -1074,7 +1090,8 @@ "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1121,116 +1138,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ClusterDefaultAutoScalingGroupCapacityASGA16CBFC4" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleDefaultPolicy7671EAB6", - "roles": [ - { - "Ref": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1325,19 +1238,283 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Subscription", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole03D211CEC", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ClusterDefaultAutoScalingGroupCapacityASGA16CBFC4" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole1D3180343", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole2565B50C2", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole34274DBB4", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole4598A4B92", + "roles": [ + { + "Ref": "ClusterDefaultAutoScalingGroupCapacityDrainECSHookFunctionServiceRoleF852A559" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1370,7 +1547,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Role": { @@ -1382,7 +1560,8 @@ "path": "tls-network-load-balanced-ecs-service/Cluster/DefaultAutoScalingGroupCapacity/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1454,13 +1633,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1494,19 +1675,22 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { @@ -1522,7 +1706,8 @@ "path": "tls-network-load-balanced-ecs-service/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "myCert": { @@ -1530,7 +1715,8 @@ "path": "tls-network-load-balanced-ecs-service/myCert", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "myServiceWithTls": { @@ -1637,13 +1823,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.NetworkListener", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.NetworkLoadBalancer", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LoadBalancerDNS": { @@ -1667,7 +1855,8 @@ "path": "tls-network-load-balanced-ecs-service/myServiceWithTls/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1698,7 +1887,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1781,7 +1971,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1799,7 +1990,8 @@ "path": "tls-network-load-balanced-ecs-service/myServiceWithTls/TaskDef/ExecutionRole/ImportExecutionRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1871,19 +2063,22 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Service": { @@ -1929,7 +2124,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1973,7 +2169,7 @@ "path": "networkLoadBalancedEc2ServiceTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -2019,7 +2215,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/aws-ecs-integ-appmesh-proxy.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/aws-ecs-integ-appmesh-proxy.assets.json index bfa252bbed05f..e465abff54cab 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/aws-ecs-integ-appmesh-proxy.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/aws-ecs-integ-appmesh-proxy.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "b8f5ad6cffd747394e512b6f3a65777a3ff3c8e9882a276fe1c1974881bd8f15": { + "02a513dca7dc9c83b30b0cf81c1a94b635c4d61a4f9d1eada8d5d36b630ee05d": { "source": { "path": "aws-ecs-integ-appmesh-proxy.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b8f5ad6cffd747394e512b6f3a65777a3ff3c8e9882a276fe1c1974881bd8f15.json", + "objectKey": "02a513dca7dc9c83b30b0cf81c1a94b635c4d61a4f9d1eada8d5d36b630ee05d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/aws-ecs-integ-appmesh-proxy.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/aws-ecs-integ-appmesh-proxy.template.json index eb07fa70ab2fd..c0d99ece99ad2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/aws-ecs-integ-appmesh-proxy.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/aws-ecs-integ-appmesh-proxy.template.json @@ -664,7 +664,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegappmeshproxyEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic6486DB9E6F5E487C": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -751,69 +861,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegappmeshproxyEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic6486DB9E6F5E487C": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/integ.json index b7689cb1e53b8..245702a5161b5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "integ.app-mesh-proxy-config": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/manifest.json index 706000ca50267..65feb34539942 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-appmesh-proxy.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b8f5ad6cffd747394e512b6f3a65777a3ff3c8e9882a276fe1c1974881bd8f15.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/02a513dca7dc9c83b30b0cf81c1a94b635c4d61a4f9d1eada8d5d36b630ee05d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ-appmesh-proxy/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ-appmesh-proxy/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -220,12 +226,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -244,6 +244,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -286,6 +316,12 @@ "data": "TaskDef54694570" } ], + "/aws-ecs-integ-appmesh-proxy/Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ-appmesh-proxy/Service/Service": [ { "type": "aws:cdk:logicalId", @@ -309,6 +345,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ-appmesh-proxy" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/tree.json index dba798c224b58..09b3d4f93e19b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.app-mesh-proxy-config.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-appmesh-proxy/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-appmesh-proxy/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-appmesh-proxy/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-appmesh-proxy/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EcsCluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -701,14 +701,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -719,8 +719,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -750,8 +750,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -820,20 +820,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -850,16 +850,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -945,14 +945,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -992,8 +992,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1012,8 +1012,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1057,119 +1057,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1206,8 +1101,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegappmeshproxyEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic6486DB9E": { @@ -1230,8 +1125,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1257,26 +1152,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1302,14 +1454,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1320,8 +1472,8 @@ "id": "ImportRole", "path": "aws-ecs-integ-appmesh-proxy/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1351,8 +1503,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1386,20 +1538,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1426,42 +1578,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ-appmesh-proxy/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ-appmesh-proxy/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "TaskDef": { @@ -1476,8 +1628,8 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ-appmesh-proxy/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1501,14 +1653,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1522,13 +1674,29 @@ "essential": true, "image": "amazon/amazon-ecs-sample", "memory": 256, - "name": "web" + "name": "web", + "environment": [ + { + "name": "AWS_REGION", + "value": { + "Ref": "AWS::Region" + } + } + ] }, { "essential": true, "image": "envoyproxy/envoy:v1.16.2", "memory": 256, - "name": "envoy" + "name": "envoy", + "environment": [ + { + "name": "AWS_REGION", + "value": { + "Ref": "AWS::Region" + } + } + ] } ], "family": "awsecsintegappmeshproxyTaskDef1D8BFD08", @@ -1573,30 +1741,30 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "web": { "id": "web", "path": "aws-ecs-integ-appmesh-proxy/TaskDef/web", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } }, "envoy": { "id": "envoy", "path": "aws-ecs-integ-appmesh-proxy/TaskDef/envoy", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "Service": { @@ -1646,8 +1814,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } }, "SecurityGroup": { @@ -1674,42 +1842,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ-appmesh-proxy/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ-appmesh-proxy/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -1717,13 +1885,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/aws-ecs-integ-bottlerocket.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/aws-ecs-integ-bottlerocket.assets.json index f4e0a0acd0558..b679ba3ae7c13 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/aws-ecs-integ-bottlerocket.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/aws-ecs-integ-bottlerocket.assets.json @@ -1,7 +1,7 @@ { - "version": "32.0.0", + "version": "39.0.0", "files": { - "23efb012af109a2b701accba88ab31415b5012b2ff3ce7c0de38ee461130c4a3": { + "4ba9cdc6b1b2f647cabd19eb62d6a0ac2545434b18fe1e9d203ecf591b9ffe28": { "source": { "path": "aws-ecs-integ-bottlerocket.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "23efb012af109a2b701accba88ab31415b5012b2ff3ce7c0de38ee461130c4a3.json", + "objectKey": "4ba9cdc6b1b2f647cabd19eb62d6a0ac2545434b18fe1e9d203ecf591b9ffe28.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/aws-ecs-integ-bottlerocket.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/aws-ecs-integ-bottlerocket.template.json index d01c94ae611e3..9836bb1ffab36 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/aws-ecs-integ-bottlerocket.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/aws-ecs-integ-bottlerocket.template.json @@ -18,9 +18,6 @@ "VpcPublicSubnet1Subnet5C2D37C4": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 0, @@ -44,21 +41,24 @@ "Key": "Name", "Value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet1RouteTable6C95E38E": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet1RouteTableAssociation97140677": { @@ -75,12 +75,12 @@ "VpcPublicSubnet1DefaultRoute3DA9E72A": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" } }, "DependsOn": [ @@ -102,15 +102,15 @@ "VpcPublicSubnet1NATGateway4D7517AA": { "Type": "AWS::EC2::NatGateway", "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet1EIPD7E02669", "AllocationId" ] }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, "Tags": [ { "Key": "Name", @@ -126,9 +126,6 @@ "VpcPublicSubnet2Subnet691E08A3": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 1, @@ -152,21 +149,24 @@ "Key": "Name", "Value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet2RouteTable94F7E489": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet2RouteTableAssociationDD5762D8": { @@ -183,12 +183,12 @@ "VpcPublicSubnet2DefaultRoute97F91067": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" } }, "DependsOn": [ @@ -198,9 +198,6 @@ "VpcPrivateSubnet1Subnet536B997A": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 0, @@ -224,21 +221,24 @@ "Key": "Name", "Value": "aws-ecs-integ-bottlerocket/Vpc/PrivateSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet1RouteTableB2C5B500": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ-bottlerocket/Vpc/PrivateSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { @@ -255,21 +255,18 @@ "VpcPrivateSubnet1DefaultRouteBE02A9ED": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" } } }, "VpcPrivateSubnet2Subnet3788AAA1": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 1, @@ -293,21 +290,24 @@ "Key": "Name", "Value": "aws-ecs-integ-bottlerocket/Vpc/PrivateSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet2RouteTableA678073B": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ-bottlerocket/Vpc/PrivateSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { @@ -324,12 +324,12 @@ "VpcPrivateSubnet2DefaultRoute060D2087": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" } } }, @@ -347,11 +347,11 @@ "VpcVPCGWBF912B6E": { "Type": "AWS::EC2::VPCGatewayAttachment", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "InternetGatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "VpcId": { + "Ref": "Vpc8378EB38" } } }, @@ -579,8 +579,6 @@ "EcsClusterbottlerocketasgASGCB222A6E": { "Type": "AWS::AutoScaling::AutoScalingGroup", "Properties": { - "MaxSize": "2", - "MinSize": "2", "LaunchTemplate": { "LaunchTemplateId": { "Ref": "EcsClusterbottlerocketasgLaunchTemplateE141ADC4" @@ -592,6 +590,8 @@ ] } }, + "MaxSize": "2", + "MinSize": "2", "Tags": [ { "Key": "Name", @@ -654,7 +654,71 @@ ] } }, - "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyD5FBB46E": { + "EcsClusterbottlerocketasgDrainECSHookFunction7A8CD0E4": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" + ] + }, + "EcsClusterbottlerocketasgDrainECSHookFunctionAllowInvokeawsecsintegbottlerocketEcsClusterbottlerocketasgLifecycleHookDrainHookTopicD05837A873EBB93D": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterbottlerocketasgDrainECSHookFunction7A8CD0E4", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74" + } + } + }, + "EcsClusterbottlerocketasgDrainECSHookFunctionTopic1953D6F0": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterbottlerocketasgDrainECSHookFunction7A8CD0E4", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74" + } + } + }, + "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole07C0DC0DA": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -668,7 +732,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole07C0DC0DA", + "Roles": [ + { + "Ref": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" + } + ] + } + }, + "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole10E3DC628": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -695,13 +775,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole10E3DC628", + "Roles": [ + { + "Ref": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" + } + ] + } + }, + "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole2C85CCD01": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -715,7 +809,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole2C85CCD01", + "Roles": [ + { + "Ref": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" + } + ] + } + }, + "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole367C81881": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -733,7 +843,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyD5FBB46E", + "PolicyName": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole367C81881", "Roles": [ { "Ref": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" @@ -741,69 +851,38 @@ ] } }, - "EcsClusterbottlerocketasgDrainECSHookFunction7A8CD0E4": { - "Type": "AWS::Lambda::Function", + "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole43085D216": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } + ], + "Version": "2012-10-17" }, - "Handler": "index.lambda_handler", - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole43085D216", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg" + "Ref": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyD5FBB46E", - "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" - ] - }, - "EcsClusterbottlerocketasgDrainECSHookFunctionAllowInvokeawsecsintegbottlerocketEcsClusterbottlerocketasgLifecycleHookDrainHookTopicD05837A873EBB93D": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterbottlerocketasgDrainECSHookFunction7A8CD0E4", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74" - } - } - }, - "EcsClusterbottlerocketasgDrainECSHookFunctionTopic1953D6F0": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterbottlerocketasgDrainECSHookFunction7A8CD0E4", - "Arn" - ] - } + ] } }, "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74": { @@ -869,9 +948,9 @@ "AutoScalingGroupName": { "Ref": "EcsClusterbottlerocketasgASGCB222A6E" }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "DefaultResult": "CONTINUE", "HeartbeatTimeout": 300, + "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "NotificationTargetARN": { "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74" }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/cdk.out index f0b901e7c06e5..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"32.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/integ.json index b22af7950be85..545cf90f0db8a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "39.0.0", "testCases": { "integ.bottlerocket": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/manifest.json index 55d74778bdfca..effe2e06c4cac 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-bottlerocket.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-ecs-integ-bottlerocket.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/23efb012af109a2b701accba88ab31415b5012b2ff3ce7c0de38ee461130c4a3.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4ba9cdc6b1b2f647cabd19eb62d6a0ac2545434b18fe1e9d203ecf591b9ffe28.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -207,12 +208,6 @@ "data": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" } ], - "/aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyD5FBB46E" - } - ], "/aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -231,6 +226,36 @@ "data": "EcsClusterbottlerocketasgDrainECSHookFunctionTopic1953D6F0" } ], + "/aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole07C0DC0DA" + } + ], + "/aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole10E3DC628" + } + ], + "/aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole2C85CCD01" + } + ], + "/aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole367C81881" + } + ], + "/aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole43085D216" + } + ], "/aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -273,10 +298,10 @@ "data": "CheckBootstrapVersion" } ], - "EcsClusterbottlerocketasgLaunchTemplateProfileF6362A11": [ + "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyD5FBB46E": [ { "type": "aws:cdk:logicalId", - "data": "EcsClusterbottlerocketasgLaunchTemplateProfileF6362A11", + "data": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyD5FBB46E", "trace": [ "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" ] diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/tree.json index 0f99812c1ab0d..cb385569c483c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.bottlerocket.js.snapshot/tree.json @@ -45,9 +45,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 0, @@ -71,7 +68,10 @@ "key": "Name", "value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -93,15 +93,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -134,12 +134,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, "destinationCidrBlock": "0.0.0.0/0", "gatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" } } }, @@ -174,15 +174,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { - "subnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, "allocationId": { "Fn::GetAtt": [ "VpcPublicSubnet1EIPD7E02669", "AllocationId" ] }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, "tags": [ { "key": "Name", @@ -212,9 +212,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 1, @@ -238,7 +235,10 @@ "key": "Name", "value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -260,15 +260,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ-bottlerocket/Vpc/PublicSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -301,12 +301,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, "destinationCidrBlock": "0.0.0.0/0", "gatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" } } }, @@ -331,9 +331,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 0, @@ -357,7 +354,10 @@ "key": "Name", "value": "aws-ecs-integ-bottlerocket/Vpc/PrivateSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -379,15 +379,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ-bottlerocket/Vpc/PrivateSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -420,12 +420,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, "destinationCidrBlock": "0.0.0.0/0", "natGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" } } }, @@ -450,9 +450,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 1, @@ -476,7 +473,10 @@ "key": "Name", "value": "aws-ecs-integ-bottlerocket/Vpc/PrivateSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -498,15 +498,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ-bottlerocket/Vpc/PrivateSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -539,12 +539,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, "destinationCidrBlock": "0.0.0.0/0", "natGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" } } }, @@ -584,11 +584,11 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "internetGatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "vpcId": { + "Ref": "Vpc8378EB38" } } }, @@ -832,6 +832,14 @@ "version": "0.0.0" } }, + "ImportedInstanceProfile": { + "id": "ImportedInstanceProfile", + "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/ImportedInstanceProfile", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, "LaunchTemplate": { "id": "LaunchTemplate", "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/LaunchTemplate", @@ -931,8 +939,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::AutoScaling::AutoScalingGroup", "aws:cdk:cloudformation:props": { - "maxSize": "2", - "minSize": "2", "launchTemplate": { "launchTemplateId": { "Ref": "EcsClusterbottlerocketasgLaunchTemplateE141ADC4" @@ -944,6 +950,8 @@ ] } }, + "maxSize": "2", + "minSize": "2", "tags": [ { "key": "Name", @@ -1030,111 +1038,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterbottlerocketasgASGCB222A6E" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyD5FBB46E", - "roles": [ - { - "Ref": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1151,12 +1054,6 @@ "code": { "zipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" }, - "role": { - "Fn::GetAtt": [ - "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB", - "Arn" - ] - }, "environment": { "variables": { "CLUSTER": { @@ -1165,6 +1062,12 @@ } }, "handler": "index.lambda_handler", + "role": { + "Fn::GetAtt": [ + "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB", + "Arn" + ] + }, "runtime": "python3.9", "tags": [ { @@ -1214,15 +1117,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::SNS::Subscription", "aws:cdk:cloudformation:props": { - "protocol": "lambda", - "topicArn": { - "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74" - }, "endpoint": { "Fn::GetAtt": [ "EcsClusterbottlerocketasgDrainECSHookFunction7A8CD0E4", "Arn" ] + }, + "protocol": "lambda", + "topicArn": { + "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74" } } }, @@ -1236,6 +1139,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole07C0DC0DA", + "roles": [ + { + "Ref": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterbottlerocketasgASGCB222A6E" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole10E3DC628", + "roles": [ + { + "Ref": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole2C85CCD01", + "roles": [ + { + "Ref": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole367C81881", + "roles": [ + { + "Ref": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket/EcsCluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole43085D216", + "roles": [ + { + "Ref": "EcsClusterbottlerocketasgDrainECSHookFunctionServiceRole2F16AFAB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1246,7 +1406,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1381,9 +1541,9 @@ "autoScalingGroupName": { "Ref": "EcsClusterbottlerocketasgASGCB222A6E" }, - "lifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "defaultResult": "CONTINUE", "heartbeatTimeout": 300, + "lifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "notificationTargetArn": { "Ref": "EcsClusterbottlerocketasgLifecycleHookDrainHookTopic64509A74" }, @@ -1461,7 +1621,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/integ-ec2-capacity-provider.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/integ-ec2-capacity-provider.assets.json index bdc2cb8c10a5c..0280e108f1d0b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/integ-ec2-capacity-provider.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/integ-ec2-capacity-provider.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "2ed9dff548ce8e8080a12fc15c933f25b7e4ac0eba3771b02e9f07fb943c7146": { + "949da95a73773928fb9e6004383da04f3fb8c73be2289beae03406f2d1266ff0": { "source": { "path": "integ-ec2-capacity-provider.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2ed9dff548ce8e8080a12fc15c933f25b7e4ac0eba3771b02e9f07fb943c7146.json", + "objectKey": "949da95a73773928fb9e6004383da04f3fb8c73be2289beae03406f2d1266ff0.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/integ-ec2-capacity-provider.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/integ-ec2-capacity-provider.template.json index e4b275b7c227d..1cd8a4afe12e4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/integ-ec2-capacity-provider.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/integ-ec2-capacity-provider.template.json @@ -718,7 +718,71 @@ ] } }, - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": { + "ASGDrainECSHookFunction5F24CF4D": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EC2CPClusterD5F0FD32" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "integ-ec2-capacity-provider/ASG" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB" + ] + }, + "ASGDrainECSHookFunctionAllowInvokeintegec2capacityproviderASGLifecycleHookDrainHookTopic4714B3C1EB63E78F": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctionTopicD6FC59F7": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -732,7 +796,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -759,13 +839,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -779,7 +873,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -797,7 +907,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", "Roles": [ { "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" @@ -805,69 +915,38 @@ ] } }, - "ASGDrainECSHookFunction5F24CF4D": { - "Type": "AWS::Lambda::Function", + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EC2CPClusterD5F0FD32" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunctionServiceRoleC12963BB", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "Roles": [ { - "Key": "Name", - "Value": "integ-ec2-capacity-provider/ASG" + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "ASGDrainECSHookFunctionServiceRoleC12963BB" - ] - }, - "ASGDrainECSHookFunctionAllowInvokeintegec2capacityproviderASGLifecycleHookDrainHookTopic4714B3C1EB63E78F": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } - } - }, - "ASGDrainECSHookFunctionTopicD6FC59F7": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } + ] } }, "ASGLifecycleHookDrainHookTopicA8AD4ACB": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/integ.json index ef375425e1eb0..f8e6df41afd4d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "integ.capacity-provider": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/manifest.json index 3025e8efbe4e2..e4a673b1b24d0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "integ-ec2-capacity-provider.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2ed9dff548ce8e8080a12fc15c933f25b7e4ac0eba3771b02e9f07fb943c7146.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/949da95a73773928fb9e6004383da04f3fb8c73be2289beae03406f2d1266ff0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/integ-ec2-capacity-provider/EC2CPCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/integ-ec2-capacity-provider/EC2CPCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -238,12 +244,6 @@ "data": "ASGDrainECSHookFunctionServiceRoleC12963BB" } ], - "/integ-ec2-capacity-provider/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27" - } - ], "/integ-ec2-capacity-provider/ASG/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -262,6 +262,36 @@ "data": "ASGDrainECSHookFunctionTopicD6FC59F7" } ], + "/integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3" + } + ], + "/integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01" + } + ], + "/integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2" + } + ], + "/integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B" + } + ], + "/integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B" + } + ], "/integ-ec2-capacity-provider/ASG/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -298,6 +328,12 @@ "data": "EC2CapacityProvider5A2E35CD" } ], + "/integ-ec2-capacity-provider/EC2Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/integ-ec2-capacity-provider/EC2Service/Service": [ { "type": "aws:cdk:logicalId", @@ -315,6 +351,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "integ-ec2-capacity-provider" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/tree.json index 15339be2951d1..2b6aed0dfda30 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.capacity-provider.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "integ-ec2-capacity-provider/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "integ-ec2-capacity-provider/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "integ-ec2-capacity-provider/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "integ-ec2-capacity-provider/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EC2CPCluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "EC2CPCluster": { @@ -687,14 +687,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnClusterCapacityProviderAssociations", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "TaskDef": { @@ -709,8 +709,8 @@ "id": "ImportTaskRole", "path": "integ-ec2-capacity-provider/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -734,14 +734,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -772,22 +772,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "web": { "id": "web", "path": "integ-ec2-capacity-provider/TaskDef/web", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "ASG": { @@ -824,14 +824,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -842,8 +842,8 @@ "id": "ImportInstanceRole", "path": "integ-ec2-capacity-provider/ASG/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -873,8 +873,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -943,20 +943,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -973,16 +973,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "integ-ec2-capacity-provider/ASG/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -1068,14 +1068,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -1115,8 +1115,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1135,8 +1135,8 @@ "id": "ImportServiceRole", "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1180,119 +1180,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ASG46ED3070" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EC2CPClusterD5F0FD32", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EC2CPClusterD5F0FD32", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "roles": [ - { - "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1329,8 +1224,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:integec2capacityproviderASGLifecycleHookDrainHookTopic4714B3C1": { @@ -1353,8 +1248,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1380,26 +1275,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ASG46ED3070" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ec2-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1425,14 +1577,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1443,8 +1595,8 @@ "id": "ImportRole", "path": "integ-ec2-capacity-provider/ASG/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1474,8 +1626,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1509,20 +1661,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1549,36 +1701,36 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "integ-ec2-capacity-provider/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "integ-ec2-capacity-provider/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "EC2CapacityProvider": { @@ -1604,14 +1756,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCapacityProvider", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.AsgCapacityProvider", + "version": "0.0.0" } }, "EC2Service": { @@ -1647,36 +1799,36 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "integ-ec2-capacity-provider/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "integ-ec2-capacity-provider/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -1684,13 +1836,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/aws-ecs-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/aws-ecs-integ.assets.json index 04a0ae2dc8319..6a090b745cc0d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/aws-ecs-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/aws-ecs-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "0ee50cd8a32cb3f8ec177822ba936107df21a5e6e88e281e0d6020d8c18ade02": { + "e069d1b463de79ace4ace4c6fb887fc4861e475f7673355a3a02764718afc7f6": { "source": { "path": "aws-ecs-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0ee50cd8a32cb3f8ec177822ba936107df21a5e6e88e281e0d6020d8c18ade02.json", + "objectKey": "e069d1b463de79ace4ace4c6fb887fc4861e475f7673355a3a02764718afc7f6.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/aws-ecs-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/aws-ecs-integ.template.json index 7f4936fb6c4f2..0132ee4c689c2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/aws-ecs-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/aws-ecs-integ.template.json @@ -685,7 +685,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -699,7 +763,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -726,13 +806,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -746,7 +840,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -764,7 +874,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -772,69 +882,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/integ.json index d8f804051c902..d810dfab43cc0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "integ.clb-host-nw": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/manifest.json index d4150aa36fdcc..1a48caf5a7996 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0ee50cd8a32cb3f8ec177822ba936107df21a5e6e88e281e0d6020d8c18ade02.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e069d1b463de79ace4ace4c6fb887fc4861e475f7673355a3a02764718afc7f6.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -226,12 +232,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -250,6 +250,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -292,6 +322,12 @@ "data": "TaskDef54694570" } ], + "/aws-ecs-integ/Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ/Service/Service": [ { "type": "aws:cdk:logicalId", @@ -333,6 +369,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/tree.json index 22fe6ddfd3a2b..34051ed1c44a8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.clb-host-nw.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EcsCluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -701,8 +701,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } }, "from awsecsintegLBSecurityGroupC30F5EB4:80": { @@ -730,14 +730,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -748,8 +748,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -779,8 +779,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -849,20 +849,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -879,16 +879,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -974,14 +974,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -1021,8 +1021,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1041,8 +1041,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1086,119 +1086,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1235,8 +1130,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925A": { @@ -1259,8 +1154,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1286,26 +1181,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1331,14 +1483,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1349,8 +1501,8 @@ "id": "ImportRole", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1380,8 +1532,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1415,20 +1567,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1455,42 +1607,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "TaskDef": { @@ -1505,8 +1657,8 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1530,14 +1682,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1576,22 +1728,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "web": { "id": "web", "path": "aws-ecs-integ/TaskDef/web", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "Service": { @@ -1630,14 +1782,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "LB": { @@ -1670,8 +1822,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } }, "to awsecsintegEcsClusterDefaultAutoScalingGroupInstanceSecurityGroupF03D2457:80": { @@ -1699,14 +1851,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupEgress", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "Resource": { @@ -1744,44 +1896,44 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancing.CfnLoadBalancer", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancing.LoadBalancer", + "version": "0.0.0" } }, "LoadBalancerDNS": { "id": "LoadBalancerDNS", "path": "aws-ecs-integ/LoadBalancerDNS", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -1789,13 +1941,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/aws-ecs-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/aws-ecs-integ.assets.json index 57d40533c9914..ae76d721edc10 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/aws-ecs-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/aws-ecs-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "a2e4257665d19056143c4db55344ad90c00f21a27d79890e20bf9e89bbdcb527": { + "54942f1d89bbbc3da1297a13717a7e94ce0cdfa51f89fb304d87d5177b3a1a41": { "source": { "path": "aws-ecs-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a2e4257665d19056143c4db55344ad90c00f21a27d79890e20bf9e89bbdcb527.json", + "objectKey": "54942f1d89bbbc3da1297a13717a7e94ce0cdfa51f89fb304d87d5177b3a1a41.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/aws-ecs-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/aws-ecs-integ.template.json index ab27de3317ecc..6f52780d254fa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/aws-ecs-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/aws-ecs-integ.template.json @@ -464,7 +464,71 @@ ] } }, - "FargateClustercapacityDrainECSHookFunctionServiceRoleDefaultPolicy53CD1145": { + "FargateClustercapacityDrainECSHookFunction3E60E6D0": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "FargateCluster7CCD5F93" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/FargateCluster/capacity" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" + ] + }, + "FargateClustercapacityDrainECSHookFunctionAllowInvokeawsecsintegFargateClustercapacityLifecycleHookDrainHookTopic07C1229F3B6FF246": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "FargateClustercapacityDrainECSHookFunction3E60E6D0", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "FargateClustercapacityLifecycleHookDrainHookTopic390A0E34" + } + } + }, + "FargateClustercapacityDrainECSHookFunctionTopic7D6C4884": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "FargateClustercapacityDrainECSHookFunction3E60E6D0", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "FargateClustercapacityLifecycleHookDrainHookTopic390A0E34" + } + } + }, + "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole0987FAD33": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -478,7 +542,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole0987FAD33", + "Roles": [ + { + "Ref": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" + } + ] + } + }, + "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole14C257275": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -505,13 +585,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole14C257275", + "Roles": [ + { + "Ref": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" + } + ] + } + }, + "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole2A1F0C369": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -525,7 +619,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole2A1F0C369", + "Roles": [ + { + "Ref": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" + } + ] + } + }, + "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole3A85241C9": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -543,7 +653,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "FargateClustercapacityDrainECSHookFunctionServiceRoleDefaultPolicy53CD1145", + "PolicyName": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole3A85241C9", "Roles": [ { "Ref": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" @@ -551,69 +661,38 @@ ] } }, - "FargateClustercapacityDrainECSHookFunction3E60E6D0": { - "Type": "AWS::Lambda::Function", + "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole4DA338734": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "FargateCluster7CCD5F93" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "FargateCluster7CCD5F93", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole4DA338734", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ/FargateCluster/capacity" + "Ref": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "FargateClustercapacityDrainECSHookFunctionServiceRoleDefaultPolicy53CD1145", - "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" - ] - }, - "FargateClustercapacityDrainECSHookFunctionAllowInvokeawsecsintegFargateClustercapacityLifecycleHookDrainHookTopic07C1229F3B6FF246": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "FargateClustercapacityDrainECSHookFunction3E60E6D0", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "FargateClustercapacityLifecycleHookDrainHookTopic390A0E34" - } - } - }, - "FargateClustercapacityDrainECSHookFunctionTopic7D6C4884": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "FargateClustercapacityDrainECSHookFunction3E60E6D0", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "FargateClustercapacityLifecycleHookDrainHookTopic390A0E34" - } + ] } }, "FargateClustercapacityLifecycleHookDrainHookTopic390A0E34": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/integ.json index daa015188fa03..89cad6a47a0c0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "integ.cloudmap-container-port": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/manifest.json index 50182952ac8cb..7245d429dbfde 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a2e4257665d19056143c4db55344ad90c00f21a27d79890e20bf9e89bbdcb527.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/54942f1d89bbbc3da1297a13717a7e94ce0cdfa51f89fb304d87d5177b3a1a41.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ/FargateCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ/FargateCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -154,12 +160,6 @@ "data": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" } ], - "/aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "FargateClustercapacityDrainECSHookFunctionServiceRoleDefaultPolicy53CD1145" - } - ], "/aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -178,6 +178,36 @@ "data": "FargateClustercapacityDrainECSHookFunctionTopic7D6C4884" } ], + "/aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole0987FAD33" + } + ], + "/aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole14C257275" + } + ], + "/aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole2A1F0C369" + } + ], + "/aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole3A85241C9" + } + ], + "/aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole4DA338734" + } + ], "/aws-ecs-integ/FargateCluster/capacity/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -226,6 +256,12 @@ "data": "TaskDef54694570" } ], + "/aws-ecs-integ/Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ/Service/Service": [ { "type": "aws:cdk:logicalId", @@ -249,6 +285,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "FargateClustercapacityDrainECSHookFunctionServiceRoleDefaultPolicy53CD1145": [ + { + "type": "aws:cdk:logicalId", + "data": "FargateClustercapacityDrainECSHookFunctionServiceRoleDefaultPolicy53CD1145", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/tree.json index 4f407c7f03023..d7288ce963251 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.cloudmap-container-port.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "pubSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/pubSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,14 +144,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "pubSubnet2": { @@ -194,16 +194,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/pubSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -224,8 +224,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -243,8 +243,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -263,14 +263,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "IGW": { @@ -288,8 +288,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -307,14 +307,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "FargateCluster": { @@ -329,8 +329,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "capacity": { @@ -376,14 +376,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -394,8 +394,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ/FargateCluster/capacity/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -425,8 +425,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -495,20 +495,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -525,16 +525,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ/FargateCluster/capacity/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -620,14 +620,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -668,8 +668,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -688,8 +688,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -733,119 +733,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "FargateClustercapacityASGE4034F96" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "FargateClustercapacityDrainECSHookFunctionServiceRoleDefaultPolicy53CD1145", - "roles": [ - { - "Ref": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -882,8 +777,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegFargateClustercapacityLifecycleHookDrainHookTopic07C1229F": { @@ -906,8 +801,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -933,26 +828,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole0987FAD33", + "roles": [ + { + "Ref": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "FargateClustercapacityASGE4034F96" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole14C257275", + "roles": [ + { + "Ref": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "FargateCluster7CCD5F93", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole2A1F0C369", + "roles": [ + { + "Ref": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "FargateCluster7CCD5F93", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole3A85241C9", + "roles": [ + { + "Ref": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/FargateCluster/capacity/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "FargateCluster7CCD5F93", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "FargateClustercapacityDrainECSHookFunctioninlinePolicyAddedToExecutionRole4DA338734", + "roles": [ + { + "Ref": "FargateClustercapacityDrainECSHookFunctionServiceRoleA28505D9" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -978,14 +1130,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -996,8 +1148,8 @@ "id": "ImportRole", "path": "aws-ecs-integ/FargateCluster/capacity/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1027,8 +1179,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1062,20 +1214,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1102,20 +1254,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "DefaultServiceDiscoveryNamespace": { @@ -1135,36 +1287,36 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_servicediscovery.CfnPrivateDnsNamespace", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_servicediscovery.PrivateDnsNamespace", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "TaskDef": { @@ -1179,8 +1331,8 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1204,14 +1356,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1270,30 +1422,30 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "nginx": { "id": "nginx", "path": "aws-ecs-integ/TaskDef/nginx", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } }, "name": { "id": "name", "path": "aws-ecs-integ/TaskDef/name", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "Service": { @@ -1335,8 +1487,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } }, "CloudmapService": { @@ -1376,42 +1528,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_servicediscovery.CfnService", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_servicediscovery.Service", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -1419,13 +1571,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/CapacityProvidersDefaultTestDeployAssert30F9785A.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/CapacityProvidersDefaultTestDeployAssert30F9785A.assets.json index 9a3582ae0d441..7abc5c03c44c4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/CapacityProvidersDefaultTestDeployAssert30F9785A.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/CapacityProvidersDefaultTestDeployAssert30F9785A.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/cdk.out index bd5311dc372de..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.5"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/integ-default-capacity-provider.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/integ-default-capacity-provider.assets.json index 4152490ea2e40..ebae55b04336d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/integ-default-capacity-provider.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/integ-default-capacity-provider.assets.json @@ -1,7 +1,7 @@ { - "version": "36.0.5", + "version": "39.0.0", "files": { - "ee35684709b3783622c3c6dfcded3016089092f84844d8ee5adf9138d9a8fa8b": { + "9645cd1dec28ff9b8f447bb1b3df4989c8ff43e893201fc990b039fa70836e8c": { "source": { "path": "integ-default-capacity-provider.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ee35684709b3783622c3c6dfcded3016089092f84844d8ee5adf9138d9a8fa8b.json", + "objectKey": "9645cd1dec28ff9b8f447bb1b3df4989c8ff43e893201fc990b039fa70836e8c.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/integ-default-capacity-provider.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/integ-default-capacity-provider.template.json index 0c154d458d63f..ed9cafc0f77a4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/integ-default-capacity-provider.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/integ-default-capacity-provider.template.json @@ -699,7 +699,71 @@ ] } }, - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": { + "ASGDrainECSHookFunction5F24CF4D": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EC2CPClusterD5F0FD32" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "integ-default-capacity-provider/ASG" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB" + ] + }, + "ASGDrainECSHookFunctionAllowInvokeintegdefaultcapacityproviderASGLifecycleHookDrainHookTopicB8CF8925702E570F": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctionTopicD6FC59F7": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -713,7 +777,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -740,13 +820,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -760,7 +854,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -778,7 +888,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", "Roles": [ { "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" @@ -786,69 +896,38 @@ ] } }, - "ASGDrainECSHookFunction5F24CF4D": { - "Type": "AWS::Lambda::Function", + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EC2CPClusterD5F0FD32" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunctionServiceRoleC12963BB", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "Roles": [ { - "Key": "Name", - "Value": "integ-default-capacity-provider/ASG" + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "ASGDrainECSHookFunctionServiceRoleC12963BB" - ] - }, - "ASGDrainECSHookFunctionAllowInvokeintegdefaultcapacityproviderASGLifecycleHookDrainHookTopicB8CF8925702E570F": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } - } - }, - "ASGDrainECSHookFunctionTopicD6FC59F7": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } + ] } }, "ASGLifecycleHookDrainHookTopicA8AD4ACB": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/integ.json index 435b470f10873..e65290dcef3ef 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "testCases": { "CapacityProviders/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/manifest.json index 505b5f62b749c..7085dc1a06e0c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "artifacts": { "integ-default-capacity-provider.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ee35684709b3783622c3c6dfcded3016089092f84844d8ee5adf9138d9a8fa8b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9645cd1dec28ff9b8f447bb1b3df4989c8ff43e893201fc990b039fa70836e8c.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -226,12 +226,6 @@ "data": "ASGDrainECSHookFunctionServiceRoleC12963BB" } ], - "/integ-default-capacity-provider/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27" - } - ], "/integ-default-capacity-provider/ASG/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -250,6 +244,36 @@ "data": "ASGDrainECSHookFunctionTopicD6FC59F7" } ], + "/integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3" + } + ], + "/integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01" + } + ], + "/integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2" + } + ], + "/integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B" + } + ], + "/integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B" + } + ], "/integ-default-capacity-provider/ASG/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -286,6 +310,12 @@ "data": "EC2CapacityProvider5A2E35CD" } ], + "/integ-default-capacity-provider/EC2CPCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/integ-default-capacity-provider/EC2CPCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -298,6 +328,12 @@ "data": "EC2CPCluster4CFED4DD" } ], + "/integ-default-capacity-provider/EC2Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/integ-default-capacity-provider/EC2Service/Service": [ { "type": "aws:cdk:logicalId", @@ -315,6 +351,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "integ-default-capacity-provider" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/tree.json index da2265aea8e93..d530db4fd9b5e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.default-capacity-provider.js.snapshot/tree.json @@ -1137,111 +1137,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "integ-default-capacity-provider/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "integ-default-capacity-provider/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ASG46ED3070" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EC2CPClusterD5F0FD32", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EC2CPClusterD5F0FD32", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "roles": [ - { - "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1343,6 +1238,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ASG46ED3070" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-default-capacity-provider/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1353,7 +1505,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1696,7 +1848,7 @@ "path": "CapacityProviders/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1742,7 +1894,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/DeploymentAlarmsDefaultTestDeployAssertAFB973D1.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/DeploymentAlarmsDefaultTestDeployAssertAFB973D1.assets.json index d7a0ed3eb9b99..04dba93718466 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/DeploymentAlarmsDefaultTestDeployAssertAFB973D1.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/DeploymentAlarmsDefaultTestDeployAssertAFB973D1.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/__entrypoint__.js similarity index 98% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/__entrypoint__.js index 02033f55cf612..ff3a517fba12d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/__entrypoint__.js @@ -1,6 +1,8 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.withRetries = exports.handler = exports.external = void 0; +exports.external = void 0; +exports.handler = handler; +exports.withRetries = withRetries; const https = require("https"); const url = require("url"); // for unit tests @@ -60,7 +62,6 @@ async function handler(event, context) { await submitResponse('FAILED', resp); } } -exports.handler = handler; function renderResponse(cfnRequest, handlerResponse = {}) { // if physical ID is not returned, we have some defaults for you based // on the request type. @@ -149,7 +150,6 @@ function withRetries(options, fn) { } }; } -exports.withRetries = withRetries; async function sleep(ms) { return new Promise((ok) => setTimeout(ok, ms)); } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/index.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/index.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/integ-deployment-alarms.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/integ-deployment-alarms.assets.json index b324846d7dc02..28cfda966ad10 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/integ-deployment-alarms.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/integ-deployment-alarms.assets.json @@ -1,20 +1,20 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1": { + "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c": { "source": { - "path": "asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1", + "path": "asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1.zip", + "objectKey": "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "94b57f48c4ad1e5e41a4073ffc4e4a63a940dbf53ba5cb4c795ec90b42a48547": { + "03f20d7f3bc29dccf2d40e009230b06dd07046b4d983e070005d56e182aa0cd3": { "source": { "path": "integ-deployment-alarms.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "94b57f48c4ad1e5e41a4073ffc4e4a63a940dbf53ba5cb4c795ec90b42a48547.json", + "objectKey": "03f20d7f3bc29dccf2d40e009230b06dd07046b4d983e070005d56e182aa0cd3.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/integ-deployment-alarms.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/integ-deployment-alarms.template.json index b3773df801b8f..f55d88a07cc67 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/integ-deployment-alarms.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/integ-deployment-alarms.template.json @@ -489,7 +489,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1.zip" + "S3Key": "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c.zip" }, "Timeout": 900, "MemorySize": 128, @@ -830,7 +830,71 @@ ] } }, - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": { + "ASGDrainECSHookFunction5F24CF4D": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EC2CPClusterD5F0FD32" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "integ-deployment-alarms/ASG" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB" + ] + }, + "ASGDrainECSHookFunctionAllowInvokeintegdeploymentalarmsASGLifecycleHookDrainHookTopic48A952B0CEFB05B2": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctionTopicD6FC59F7": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -844,7 +908,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -871,13 +951,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -891,7 +985,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -909,7 +1019,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", "Roles": [ { "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" @@ -917,69 +1027,38 @@ ] } }, - "ASGDrainECSHookFunction5F24CF4D": { - "Type": "AWS::Lambda::Function", + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EC2CPClusterD5F0FD32" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunctionServiceRoleC12963BB", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "Roles": [ { - "Key": "Name", - "Value": "integ-deployment-alarms/ASG" + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "ASGDrainECSHookFunctionServiceRoleC12963BB" - ] - }, - "ASGDrainECSHookFunctionAllowInvokeintegdeploymentalarmsASGLifecycleHookDrainHookTopic48A952B0CEFB05B2": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } - } - }, - "ASGDrainECSHookFunctionTopicD6FC59F7": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } + ] } }, "ASGLifecycleHookDrainHookTopicA8AD4ACB": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/integ.json index 33e8fdc13a284..2bffbb247d7c7 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "DeploymentAlarms/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/manifest.json index 3ccafa74cb966..ab1bc66018cb4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "integ-deployment-alarms.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/94b57f48c4ad1e5e41a4073ffc4e4a63a940dbf53ba5cb4c795ec90b42a48547.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/03f20d7f3bc29dccf2d40e009230b06dd07046b4d983e070005d56e182aa0cd3.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -184,6 +184,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/integ-deployment-alarms/Custom::VpcRestrictDefaultSGCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/integ-deployment-alarms/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -250,12 +256,6 @@ "data": "ASGDrainECSHookFunctionServiceRoleC12963BB" } ], - "/integ-deployment-alarms/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27" - } - ], "/integ-deployment-alarms/ASG/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -274,6 +274,36 @@ "data": "ASGDrainECSHookFunctionTopicD6FC59F7" } ], + "/integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3" + } + ], + "/integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01" + } + ], + "/integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2" + } + ], + "/integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B" + } + ], + "/integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B" + } + ], "/integ-deployment-alarms/ASG/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -310,6 +340,12 @@ "data": "EC2CapacityProvider5A2E35CD" } ], + "/integ-deployment-alarms/EC2CPCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/integ-deployment-alarms/EC2CPCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -322,6 +358,12 @@ "data": "EC2CPCluster4CFED4DD" } ], + "/integ-deployment-alarms/EC2Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/integ-deployment-alarms/EC2Service/Service": [ { "type": "aws:cdk:logicalId", @@ -345,6 +387,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "integ-deployment-alarms" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/tree.json index 6b222b44af902..22f398c8c0da1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.deployment-alarms.js.snapshot/tree.json @@ -1204,111 +1204,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "integ-deployment-alarms/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "integ-deployment-alarms/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ASG46ED3070" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EC2CPClusterD5F0FD32", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EC2CPClusterD5F0FD32", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "roles": [ - { - "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1410,6 +1305,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ASG46ED3070" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-deployment-alarms/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1420,7 +1572,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1806,7 +1958,7 @@ "path": "DeploymentAlarms/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1852,7 +2004,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/__entrypoint__.js similarity index 98% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/__entrypoint__.js index 02033f55cf612..ff3a517fba12d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/__entrypoint__.js @@ -1,6 +1,8 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.withRetries = exports.handler = exports.external = void 0; +exports.external = void 0; +exports.handler = handler; +exports.withRetries = withRetries; const https = require("https"); const url = require("url"); // for unit tests @@ -60,7 +62,6 @@ async function handler(event, context) { await submitResponse('FAILED', resp); } } -exports.handler = handler; function renderResponse(cfnRequest, handlerResponse = {}) { // if physical ID is not returned, we have some defaults for you based // on the request type. @@ -149,7 +150,6 @@ function withRetries(options, fn) { } }; } -exports.withRetries = withRetries; async function sleep(ms) { return new Promise((ok) => setTimeout(ok, ms)); } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/index.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/index.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/aws-ecs-integ-enable-execute-command.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/aws-ecs-integ-enable-execute-command.assets.json index 635a5063c2ce0..7229be5a04dc2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/aws-ecs-integ-enable-execute-command.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/aws-ecs-integ-enable-execute-command.assets.json @@ -1,20 +1,20 @@ { - "version": "36.0.24", + "version": "39.0.0", "files": { - "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1": { + "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c": { "source": { - "path": "asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1", + "path": "asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1.zip", + "objectKey": "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "9a76fcba4ced44546bf4b1f9cf657a8c109221e81feca9c7f01c078c620b4b8e": { + "a32b630d70de4be9529aa5756f85f53a75809c378797c4cb6bb29e28ffec5711": { "source": { "path": "aws-ecs-integ-enable-execute-command.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9a76fcba4ced44546bf4b1f9cf657a8c109221e81feca9c7f01c078c620b4b8e.json", + "objectKey": "a32b630d70de4be9529aa5756f85f53a75809c378797c4cb6bb29e28ffec5711.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/aws-ecs-integ-enable-execute-command.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/aws-ecs-integ-enable-execute-command.template.json index af77c2aeadc58..ee314d9e6f6e6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/aws-ecs-integ-enable-execute-command.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/aws-ecs-integ-enable-execute-command.template.json @@ -489,7 +489,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1.zip" + "S3Key": "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c.zip" }, "Timeout": 900, "MemorySize": 128, @@ -901,7 +901,71 @@ ] } }, - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": { + "ASGDrainECSHookFunction5F24CF4D": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EC2CPClusterD5F0FD32" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-enable-execute-command/ASG" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB" + ] + }, + "ASGDrainECSHookFunctionAllowInvokeawsecsintegenableexecutecommandASGLifecycleHookDrainHookTopic82F943978D25E256": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctionTopicD6FC59F7": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -915,7 +979,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -942,13 +1022,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -962,7 +1056,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -980,7 +1090,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", "Roles": [ { "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" @@ -988,69 +1098,38 @@ ] } }, - "ASGDrainECSHookFunction5F24CF4D": { - "Type": "AWS::Lambda::Function", + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EC2CPClusterD5F0FD32" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunctionServiceRoleC12963BB", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-enable-execute-command/ASG" + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "ASGDrainECSHookFunctionServiceRoleC12963BB" - ] - }, - "ASGDrainECSHookFunctionAllowInvokeawsecsintegenableexecutecommandASGLifecycleHookDrainHookTopic82F943978D25E256": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } - } - }, - "ASGDrainECSHookFunctionTopicD6FC59F7": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } + ] } }, "ASGLifecycleHookDrainHookTopicA8AD4ACB": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/cdk.out index 4efaa16f29af9..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.24"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/enableexecutecommandtestDefaultTestDeployAssertDF06DF37.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/enableexecutecommandtestDefaultTestDeployAssertDF06DF37.assets.json index 7f0719e1c6254..d79a8d099b2c9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/enableexecutecommandtestDefaultTestDeployAssertDF06DF37.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/enableexecutecommandtestDefaultTestDeployAssertDF06DF37.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.24", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/integ.json index 65492a8c788d0..4eba91ed83a53 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.24", + "version": "39.0.0", "testCases": { "enable-execute-command-test/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/manifest.json index f3a1b3fc0b580..8acd3bbb57ea4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.24", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-enable-execute-command.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9a76fcba4ced44546bf4b1f9cf657a8c109221e81feca9c7f01c078c620b4b8e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a32b630d70de4be9529aa5756f85f53a75809c378797c4cb6bb29e28ffec5711.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -268,12 +268,6 @@ "data": "ASGDrainECSHookFunctionServiceRoleC12963BB" } ], - "/aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27" - } - ], "/aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -292,6 +286,36 @@ "data": "ASGDrainECSHookFunctionTopicD6FC59F7" } ], + "/aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3" + } + ], + "/aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01" + } + ], + "/aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2" + } + ], + "/aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B" + } + ], + "/aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B" + } + ], "/aws-ecs-integ-enable-execute-command/ASG/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -328,6 +352,12 @@ "data": "EC2CapacityProvider5A2E35CD" } ], + "/aws-ecs-integ-enable-execute-command/EC2CPCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ-enable-execute-command/EC2CPCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -340,6 +370,12 @@ "data": "EC2CPCluster4CFED4DD" } ], + "/aws-ecs-integ-enable-execute-command/EC2Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ-enable-execute-command/EC2Service/Service": [ { "type": "aws:cdk:logicalId", @@ -357,6 +393,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ-enable-execute-command" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/tree.json index 70839e030a68d..29dc5d50d30bc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.enable-execute-command.js.snapshot/tree.json @@ -1310,111 +1310,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ASG46ED3070" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EC2CPClusterD5F0FD32", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EC2CPClusterD5F0FD32", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "roles": [ - { - "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1516,6 +1411,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ASG46ED3070" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-enable-execute-command/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EC2CPClusterD5F0FD32", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1526,7 +1678,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1871,7 +2023,7 @@ "path": "enable-execute-command-test/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1917,7 +2069,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/aws-ecs-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/aws-ecs-integ.assets.json index be79048bbce0f..ddb4942d7e417 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/aws-ecs-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/aws-ecs-integ.assets.json @@ -66,7 +66,7 @@ } } }, - "bbf8c3ce184754bc4a3f1e8f142022ff07458dbfdab67a66046747a712322950": { + "d5b89e9950bede54c513114734ffe13cf6fc3043bed72d2d0b06c26d1ebdedff": { "source": { "path": "aws-ecs-integ.template.json", "packaging": "file" @@ -74,7 +74,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bbf8c3ce184754bc4a3f1e8f142022ff07458dbfdab67a66046747a712322950.json", + "objectKey": "d5b89e9950bede54c513114734ffe13cf6fc3043bed72d2d0b06c26d1ebdedff.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/aws-ecs-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/aws-ecs-integ.template.json index ede1eae2706cb..1dfaad709b72a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/aws-ecs-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/aws-ecs-integ.template.json @@ -824,7 +824,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -838,7 +902,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -865,13 +945,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -885,7 +979,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -903,7 +1013,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -911,69 +1021,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/manifest.json index 0ec0d54930890..d0eef8f6a0321 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bbf8c3ce184754bc4a3f1e8f142022ff07458dbfdab67a66046747a712322950.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d5b89e9950bede54c513114734ffe13cf6fc3043bed72d2d0b06c26d1ebdedff.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -268,12 +268,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -292,6 +286,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -343,10 +367,7 @@ "/aws-ecs-integ/EnvFileDeployment/AwsCliLayer/Resource": [ { "type": "aws:cdk:logicalId", - "data": "EnvFileDeploymentAwsCliLayerA8FC897D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" - ] + "data": "EnvFileDeploymentAwsCliLayerA8FC897D" } ], "/aws-ecs-integ/EnvFileDeployment/CustomResource/Default": [ @@ -412,6 +433,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/tree.json index 9a2abb346e1ef..6e90a8921ac32 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.environment-file.js.snapshot/tree.json @@ -108,7 +108,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "AutoDeleteObjectsCustomResource": { @@ -126,13 +127,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LatestNodeRuntimeMap": { @@ -253,7 +256,8 @@ "path": "aws-ecs-integ/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -368,7 +372,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PublicSubnet2": { @@ -420,7 +425,8 @@ "path": "aws-ecs-integ/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -535,7 +541,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -587,7 +594,8 @@ "path": "aws-ecs-integ/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -654,7 +662,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet2": { @@ -706,7 +715,8 @@ "path": "aws-ecs-integ/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -773,7 +783,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -817,7 +828,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "EcsCluster": { @@ -877,7 +889,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "InstanceRole": { @@ -889,7 +902,8 @@ "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -996,13 +1010,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "InstanceProfile": { @@ -1028,7 +1044,8 @@ "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LaunchTemplate": { @@ -1121,7 +1138,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ASG": { @@ -1182,7 +1200,8 @@ "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1229,116 +1248,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1433,13 +1348,277 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Subscription", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1478,7 +1657,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Role": { @@ -1490,7 +1670,8 @@ "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1562,13 +1743,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1602,19 +1785,22 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { @@ -1630,7 +1816,8 @@ "path": "aws-ecs-integ/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ExecutionRole": { @@ -1642,7 +1829,8 @@ "path": "aws-ecs-integ/ExecutionRole/ImportExecutionRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1691,7 +1879,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "TaskDefinition": { @@ -1707,7 +1896,8 @@ "path": "aws-ecs-integ/TaskDefinition/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1738,7 +1928,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1822,7 +2013,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "EnvFileDeployment": { @@ -1850,7 +2042,8 @@ "path": "aws-ecs-integ/EnvFileDeployment/AwsCliLayer/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1882,7 +2075,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.lambda_layer_awscli.AwsCliLayer", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "CustomResourceHandler": { @@ -1890,7 +2084,8 @@ "path": "aws-ecs-integ/EnvFileDeployment/CustomResourceHandler", "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Asset1": { @@ -1910,7 +2105,8 @@ "path": "aws-ecs-integ/EnvFileDeployment/Asset1/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1934,7 +2130,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1956,7 +2153,8 @@ "path": "aws-ecs-integ/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2107,13 +2305,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -2133,7 +2333,8 @@ "path": "aws-ecs-integ/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -2183,7 +2384,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Container": { @@ -2207,7 +2409,8 @@ "path": "aws-ecs-integ/Container/EnvironmentFile/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -2304,13 +2507,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "BootstrapVersion": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.assets.json index 7934ea6aee6a3..0a0791b055ef5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "9b91986d8e19cea21ab8affdab660a99f2852c849fddc68040ac403e9988efda": { + "4989d57e2488458ab5d2a84b3e342d6a4a44b9adc297745c50b1c034d40816ea": { "source": { "path": "aws-ecs-integ-exec-command.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9b91986d8e19cea21ab8affdab660a99f2852c849fddc68040ac403e9988efda.json", + "objectKey": "4989d57e2488458ab5d2a84b3e342d6a4a44b9adc297745c50b1c034d40816ea.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.template.json index c6eb78da6bb52..137b6dea4fa71 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/aws-ecs-integ-exec-command.template.json @@ -808,7 +808,71 @@ ] } }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33": { + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "Ec2ClusterEE43E89D" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + ] + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegexeccommandEc2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic05F8C92983E1AD32": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" + } + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic4795E0F6": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" + } + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole0C4190B7C": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -822,7 +886,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole0C4190B7C", + "Roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole18817D25E": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -849,13 +929,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole18817D25E", + "Roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole274ABEFAA": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -869,7 +963,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole274ABEFAA", + "Roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole35049FE26": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -887,7 +997,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole35049FE26", "Roles": [ { "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" @@ -895,69 +1005,38 @@ ] } }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31": { - "Type": "AWS::Lambda::Function", + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole46BD5E1C5": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "Ec2ClusterEE43E89D" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "Ec2ClusterEE43E89D", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole46BD5E1C5", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup" + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" - ] - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegexeccommandEc2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic05F8C92983E1AD32": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic4795E0F6": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - } + ] } }, "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/integ.json index 030a180b1064d..cac960ba641aa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "integ.exec-command": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/manifest.json index 7d668392cf98d..198f393d39af6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-exec-command.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9b91986d8e19cea21ab8affdab660a99f2852c849fddc68040ac403e9988efda.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4989d57e2488458ab5d2a84b3e342d6a4a44b9adc297745c50b1c034d40816ea.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -190,6 +190,12 @@ "data": "EcsExecBucket4F468651" } ], + "/aws-ecs-integ-exec-command/Ec2Cluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ-exec-command/Ec2Cluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -238,12 +244,6 @@ "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" } ], - "/aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33" - } - ], "/aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -262,6 +262,36 @@ "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic4795E0F6" } ], + "/aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole0C4190B7C" + } + ], + "/aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole18817D25E" + } + ], + "/aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole274ABEFAA" + } + ], + "/aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole35049FE26" + } + ], + "/aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole46BD5E1C5" + } + ], "/aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -310,6 +340,12 @@ "data": "TaskDef54694570" } ], + "/aws-ecs-integ-exec-command/Ec2Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ-exec-command/Ec2Service/Service": [ { "type": "aws:cdk:logicalId", @@ -327,6 +363,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ-exec-command" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/tree.json index 2a6328b072475..6261189c4fb99 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.exec-command.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-exec-command/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-exec-command/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-exec-command/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-exec-command/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "KmsKey": { @@ -741,14 +741,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_kms.CfnKey", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_kms.Key", + "version": "0.0.0" } }, "LogGroup": { @@ -771,14 +771,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_logs.LogGroup", + "version": "0.0.0" } }, "EcsExecBucket": { @@ -809,14 +809,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_s3.CfnBucket", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_s3.Bucket", + "version": "0.0.0" } }, "Ec2Cluster": { @@ -854,8 +854,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -892,14 +892,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -910,8 +910,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -941,8 +941,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1011,20 +1011,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -1041,16 +1041,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -1136,14 +1136,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -1183,8 +1183,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1203,8 +1203,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1248,119 +1248,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupASGC5A6D4C0" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", - "roles": [ - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1397,8 +1292,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegexeccommandEc2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic05F8C929": { @@ -1421,8 +1316,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1448,26 +1343,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole0C4190B7C", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupASGC5A6D4C0" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole18817D25E", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "Ec2ClusterEE43E89D", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole274ABEFAA", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "Ec2ClusterEE43E89D", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole35049FE26", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "Ec2ClusterEE43E89D", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole46BD5E1C5", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1493,14 +1645,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1511,8 +1663,8 @@ "id": "ImportRole", "path": "aws-ecs-integ-exec-command/Ec2Cluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1542,8 +1694,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1577,20 +1729,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1617,42 +1769,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ-exec-command/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ-exec-command/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "TaskDef": { @@ -1667,8 +1819,8 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ-exec-command/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1692,8 +1844,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1816,20 +1968,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1860,22 +2012,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "web": { "id": "web", "path": "aws-ecs-integ-exec-command/TaskDef/web", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "Ec2Service": { @@ -1905,36 +2057,36 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ-exec-command/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ-exec-command/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -1942,13 +2094,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/aws-ecs-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/aws-ecs-integ.assets.json index 4639a5ef4db77..cd09c72fb9a99 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/aws-ecs-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/aws-ecs-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { "2ca891b3a73a4a36630bba20580e3390a104d2ac9ff1f22a6bcadf575f8a5a61": { "source": { @@ -14,7 +14,7 @@ } } }, - "ab1a907dc1b3277adc06b1b2e5d38f53cfd3115ee88d9319993ebff4bd685b82": { + "852774facd2f29081fb405118d443500e17f369c71a353f83862463e4a124007": { "source": { "path": "aws-ecs-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ab1a907dc1b3277adc06b1b2e5d38f53cfd3115ee88d9319993ebff4bd685b82.json", + "objectKey": "852774facd2f29081fb405118d443500e17f369c71a353f83862463e4a124007.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/aws-ecs-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/aws-ecs-integ.template.json index 066d3d7e02580..dff6c1b008388 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/aws-ecs-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/aws-ecs-integ.template.json @@ -664,7 +664,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -751,69 +861,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/integ.json index 9d4bfa1843c00..db8b0b7e8f897 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "integ.firelens-s3-config": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/manifest.json index 96907d2771fd1..41a95224a55c0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ab1a907dc1b3277adc06b1b2e5d38f53cfd3115ee88d9319993ebff4bd685b82.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/852774facd2f29081fb405118d443500e17f369c71a353f83862463e4a124007.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -220,12 +226,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -244,6 +244,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -316,6 +346,12 @@ "data": "websvcsgA808F313" } ], + "/aws-ecs-integ/Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ/Service/Service": [ { "type": "aws:cdk:logicalId", @@ -333,6 +369,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/tree.json index 3744aa1f0b5b8..3114e20604a2f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.firelens-s3-config.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EcsCluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -701,14 +701,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -719,8 +719,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -750,8 +750,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -820,20 +820,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -850,16 +850,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -945,14 +945,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -992,8 +992,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1012,8 +1012,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1057,119 +1057,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1206,8 +1101,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925A": { @@ -1230,8 +1125,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1257,26 +1152,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1302,14 +1454,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1320,8 +1472,8 @@ "id": "ImportRole", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1351,8 +1503,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1386,20 +1538,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1426,42 +1578,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "TaskDef": { @@ -1476,8 +1628,8 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1501,14 +1653,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1585,7 +1737,15 @@ "auto_create_group": "true", "log_stream_prefix": "nginx" } - } + }, + "environment": [ + { + "name": "AWS_REGION", + "value": { + "Ref": "AWS::Region" + } + } + ] } ], "executionRoleArn": { @@ -1608,8 +1768,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "ExecutionRole": { @@ -1620,8 +1780,8 @@ "id": "ImportExecutionRole", "path": "aws-ecs-integ/TaskDef/ExecutionRole/ImportExecutionRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1645,8 +1805,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1735,20 +1895,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "log_router": { @@ -1767,34 +1927,34 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_logs.LogGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.FirelensLogRouter", + "version": "0.0.0" } }, "nginx": { "id": "nginx", "path": "aws-ecs-integ/TaskDef/nginx", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "SampleAsset": { @@ -1805,38 +1965,38 @@ "id": "Stage", "path": "aws-ecs-integ/SampleAsset/Stage", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" } }, "AssetBucket": { "id": "AssetBucket", "path": "aws-ecs-integ/SampleAsset/AssetBucket", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_s3.BucketBase", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_s3_assets.Asset", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--aws-for-fluent-bit--2.1.0:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--aws-for-fluent-bit--2.1.0:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ/SsmParameterValue:--aws--service--aws-for-fluent-bit--2.1.0:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--aws-for-fluent-bit--2.1.0:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--aws-for-fluent-bit--2.1.0:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ/SsmParameterValue:--aws--service--aws-for-fluent-bit--2.1.0:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "websvc-sg": { @@ -1872,14 +2032,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "Service": { @@ -1929,36 +2089,36 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -1966,13 +2126,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/aws-ecs-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/aws-ecs-integ.assets.json index 3b6232b3cbef8..1584b6fe0e643 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/aws-ecs-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/aws-ecs-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "32.0.0", + "version": "39.0.0", "files": { - "97a9d0120f4d0bcb2ae91e291dd39328d03094fdf919b9e7c397167ee480167c": { + "e4e78c266f92092f60b7ac8859b5ab9d6ef161e6c236a546d65426866b7172e2": { "source": { "path": "aws-ecs-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "97a9d0120f4d0bcb2ae91e291dd39328d03094fdf919b9e7c397167ee480167c.json", + "objectKey": "e4e78c266f92092f60b7ac8859b5ab9d6ef161e6c236a546d65426866b7172e2.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/aws-ecs-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/aws-ecs-integ.template.json index b13e0caba5355..7bd6187110b31 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/aws-ecs-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/aws-ecs-integ.template.json @@ -18,9 +18,6 @@ "VpcPublicSubnet1Subnet5C2D37C4": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 0, @@ -44,21 +41,24 @@ "Key": "Name", "Value": "aws-ecs-integ/Vpc/PublicSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet1RouteTable6C95E38E": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ/Vpc/PublicSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet1RouteTableAssociation97140677": { @@ -75,12 +75,12 @@ "VpcPublicSubnet1DefaultRoute3DA9E72A": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" } }, "DependsOn": [ @@ -102,15 +102,15 @@ "VpcPublicSubnet1NATGateway4D7517AA": { "Type": "AWS::EC2::NatGateway", "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet1EIPD7E02669", "AllocationId" ] }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, "Tags": [ { "Key": "Name", @@ -126,9 +126,6 @@ "VpcPublicSubnet2Subnet691E08A3": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 1, @@ -152,21 +149,24 @@ "Key": "Name", "Value": "aws-ecs-integ/Vpc/PublicSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet2RouteTable94F7E489": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ/Vpc/PublicSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet2RouteTableAssociationDD5762D8": { @@ -183,12 +183,12 @@ "VpcPublicSubnet2DefaultRoute97F91067": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" } }, "DependsOn": [ @@ -210,15 +210,15 @@ "VpcPublicSubnet2NATGateway9182C01D": { "Type": "AWS::EC2::NatGateway", "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet2EIP3C605A87", "AllocationId" ] }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, "Tags": [ { "Key": "Name", @@ -234,9 +234,6 @@ "VpcPrivateSubnet1Subnet536B997A": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 0, @@ -260,21 +257,24 @@ "Key": "Name", "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet1RouteTableB2C5B500": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { @@ -291,21 +291,18 @@ "VpcPrivateSubnet1DefaultRouteBE02A9ED": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" } } }, "VpcPrivateSubnet2Subnet3788AAA1": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 1, @@ -329,21 +326,24 @@ "Key": "Name", "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet2RouteTableA678073B": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { @@ -360,12 +360,12 @@ "VpcPrivateSubnet2DefaultRoute060D2087": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" } } }, @@ -383,11 +383,11 @@ "VpcVPCGWBF912B6E": { "Type": "AWS::EC2::VPCGatewayAttachment", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "InternetGatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "VpcId": { + "Ref": "Vpc8378EB38" } } }, @@ -615,8 +615,6 @@ "EcsClustergravitonclusterASG869F3168": { "Type": "AWS::AutoScaling::AutoScalingGroup", "Properties": { - "MaxSize": "2", - "MinSize": "2", "LaunchTemplate": { "LaunchTemplateId": { "Ref": "EcsClustergravitonclusterLaunchTemplate46854EA7" @@ -628,6 +626,8 @@ ] } }, + "MaxSize": "2", + "MinSize": "2", "Tags": [ { "Key": "Name", @@ -690,7 +690,71 @@ ] } }, - "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B": { + "EcsClustergravitonclusterDrainECSHookFunctionB606E681": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + ] + }, + "EcsClustergravitonclusterDrainECSHookFunctionAllowInvokeawsecsintegEcsClustergravitonclusterLifecycleHookDrainHookTopicF44E68AA50D91BA3": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClustergravitonclusterDrainECSHookFunctionB606E681", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" + } + } + }, + "EcsClustergravitonclusterDrainECSHookFunctionTopic65B3FD43": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClustergravitonclusterDrainECSHookFunctionB606E681", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" + } + } + }, + "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole00BEEF075": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -704,7 +768,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole00BEEF075", + "Roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole1E7E6BDCA": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -731,13 +811,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole1E7E6BDCA", + "Roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole2F61512F4": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -751,7 +845,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole2F61512F4", + "Roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole395D5864D": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -769,7 +879,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B", + "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole395D5864D", "Roles": [ { "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" @@ -777,69 +887,38 @@ ] } }, - "EcsClustergravitonclusterDrainECSHookFunctionB606E681": { - "Type": "AWS::Lambda::Function", + "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole4A01E14CA": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } + ], + "Version": "2012-10-17" }, - "Handler": "index.lambda_handler", - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole4A01E14CA", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B", - "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" - ] - }, - "EcsClustergravitonclusterDrainECSHookFunctionAllowInvokeawsecsintegEcsClustergravitonclusterLifecycleHookDrainHookTopicF44E68AA50D91BA3": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionB606E681", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - } - } - }, - "EcsClustergravitonclusterDrainECSHookFunctionTopic65B3FD43": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionB606E681", - "Arn" - ] - } + ] } }, "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC": { @@ -905,9 +984,9 @@ "AutoScalingGroupName": { "Ref": "EcsClustergravitonclusterASG869F3168" }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "DefaultResult": "CONTINUE", "HeartbeatTimeout": 300, + "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "NotificationTargetARN": { "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/cdk.out index f0b901e7c06e5..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"32.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/integ.json index 5b121da2aedeb..b28722eafdb9d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "39.0.0", "testCases": { "integ.graviton-bottlerocket": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/manifest.json index 9002072247f33..8db9ce93ee601 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-ecs-integ.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/97a9d0120f4d0bcb2ae91e291dd39328d03094fdf919b9e7c397167ee480167c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e4e78c266f92092f60b7ac8859b5ab9d6ef161e6c236a546d65426866b7172e2.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -219,12 +220,6 @@ "data": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" } ], - "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B" - } - ], "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -243,6 +238,36 @@ "data": "EcsClustergravitonclusterDrainECSHookFunctionTopic65B3FD43" } ], + "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole00BEEF075" + } + ], + "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole1E7E6BDCA" + } + ], + "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole2F61512F4" + } + ], + "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole395D5864D" + } + ], + "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole4A01E14CA" + } + ], "/aws-ecs-integ/EcsCluster/graviton-cluster/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -285,10 +310,10 @@ "data": "CheckBootstrapVersion" } ], - "EcsClustergravitonclusterLaunchTemplateProfile185F7FB0": [ + "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B": [ { "type": "aws:cdk:logicalId", - "data": "EcsClustergravitonclusterLaunchTemplateProfile185F7FB0", + "data": "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B", "trace": [ "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" ] diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/tree.json index d50b2b4b37b70..0c7a8a320729c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton-bottlerocket.js.snapshot/tree.json @@ -45,9 +45,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 0, @@ -71,7 +68,10 @@ "key": "Name", "value": "aws-ecs-integ/Vpc/PublicSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -93,15 +93,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ/Vpc/PublicSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -134,12 +134,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, "destinationCidrBlock": "0.0.0.0/0", "gatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" } } }, @@ -174,15 +174,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { - "subnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, "allocationId": { "Fn::GetAtt": [ "VpcPublicSubnet1EIPD7E02669", "AllocationId" ] }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, "tags": [ { "key": "Name", @@ -212,9 +212,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 1, @@ -238,7 +235,10 @@ "key": "Name", "value": "aws-ecs-integ/Vpc/PublicSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -260,15 +260,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ/Vpc/PublicSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -301,12 +301,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, "destinationCidrBlock": "0.0.0.0/0", "gatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" } } }, @@ -341,15 +341,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { - "subnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, "allocationId": { "Fn::GetAtt": [ "VpcPublicSubnet2EIP3C605A87", "AllocationId" ] }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, "tags": [ { "key": "Name", @@ -379,9 +379,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 0, @@ -405,7 +402,10 @@ "key": "Name", "value": "aws-ecs-integ/Vpc/PrivateSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -427,15 +427,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ/Vpc/PrivateSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -468,12 +468,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, "destinationCidrBlock": "0.0.0.0/0", "natGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" } } }, @@ -498,9 +498,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 1, @@ -524,7 +521,10 @@ "key": "Name", "value": "aws-ecs-integ/Vpc/PrivateSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -546,15 +546,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ/Vpc/PrivateSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -587,12 +587,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, "destinationCidrBlock": "0.0.0.0/0", "natGatewayId": { "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" } } }, @@ -632,11 +632,11 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "internetGatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "vpcId": { + "Ref": "Vpc8378EB38" } } }, @@ -880,6 +880,14 @@ "version": "0.0.0" } }, + "ImportedInstanceProfile": { + "id": "ImportedInstanceProfile", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/ImportedInstanceProfile", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, "LaunchTemplate": { "id": "LaunchTemplate", "path": "aws-ecs-integ/EcsCluster/graviton-cluster/LaunchTemplate", @@ -979,8 +987,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::AutoScaling::AutoScalingGroup", "aws:cdk:cloudformation:props": { - "maxSize": "2", - "minSize": "2", "launchTemplate": { "launchTemplateId": { "Ref": "EcsClustergravitonclusterLaunchTemplate46854EA7" @@ -992,6 +998,8 @@ ] } }, + "maxSize": "2", + "minSize": "2", "tags": [ { "key": "Name", @@ -1078,111 +1086,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClustergravitonclusterASG869F3168" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B", - "roles": [ - { - "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1199,12 +1102,6 @@ "code": { "zipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" }, - "role": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764", - "Arn" - ] - }, "environment": { "variables": { "CLUSTER": { @@ -1213,6 +1110,12 @@ } }, "handler": "index.lambda_handler", + "role": { + "Fn::GetAtt": [ + "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764", + "Arn" + ] + }, "runtime": "python3.9", "tags": [ { @@ -1262,15 +1165,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::SNS::Subscription", "aws:cdk:cloudformation:props": { - "protocol": "lambda", - "topicArn": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - }, "endpoint": { "Fn::GetAtt": [ "EcsClustergravitonclusterDrainECSHookFunctionB606E681", "Arn" ] + }, + "protocol": "lambda", + "topicArn": { + "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" } } }, @@ -1284,6 +1187,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole00BEEF075", + "roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClustergravitonclusterASG869F3168" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole1E7E6BDCA", + "roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole2F61512F4", + "roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole395D5864D", + "roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole4A01E14CA", + "roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1294,7 +1454,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1429,9 +1589,9 @@ "autoScalingGroupName": { "Ref": "EcsClustergravitonclusterASG869F3168" }, - "lifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "defaultResult": "CONTINUE", "heartbeatTimeout": 300, + "lifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "notificationTargetArn": { "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" }, @@ -1509,7 +1669,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/aws-ecs-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/aws-ecs-integ.assets.json index 0796766d3f311..c54c69b4eeb42 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/aws-ecs-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/aws-ecs-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "32.0.0", + "version": "39.0.0", "files": { - "6156adc5e94052a67460bd0e7561176c2091a0c1e48d3cc5d4198fad8289578a": { + "4538c5fc0d16f10eaa595ea326c538b0520b2768f8083ad4433a6fb01dba2b81": { "source": { "path": "aws-ecs-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6156adc5e94052a67460bd0e7561176c2091a0c1e48d3cc5d4198fad8289578a.json", + "objectKey": "4538c5fc0d16f10eaa595ea326c538b0520b2768f8083ad4433a6fb01dba2b81.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/aws-ecs-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/aws-ecs-integ.template.json index 5ab59606da8e5..aa01ad604b63b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/aws-ecs-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/aws-ecs-integ.template.json @@ -18,9 +18,6 @@ "VpcPublicSubnet1Subnet5C2D37C4": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 0, @@ -44,21 +41,24 @@ "Key": "Name", "Value": "aws-ecs-integ/Vpc/PublicSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet1RouteTable6C95E38E": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ/Vpc/PublicSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet1RouteTableAssociation97140677": { @@ -75,12 +75,12 @@ "VpcPublicSubnet1DefaultRoute3DA9E72A": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" } }, "DependsOn": [ @@ -102,15 +102,15 @@ "VpcPublicSubnet1NATGateway4D7517AA": { "Type": "AWS::EC2::NatGateway", "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet1EIPD7E02669", "AllocationId" ] }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, "Tags": [ { "Key": "Name", @@ -126,9 +126,6 @@ "VpcPublicSubnet2Subnet691E08A3": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 1, @@ -152,21 +149,24 @@ "Key": "Name", "Value": "aws-ecs-integ/Vpc/PublicSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet2RouteTable94F7E489": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ/Vpc/PublicSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPublicSubnet2RouteTableAssociationDD5762D8": { @@ -183,12 +183,12 @@ "VpcPublicSubnet2DefaultRoute97F91067": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, "DestinationCidrBlock": "0.0.0.0/0", "GatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" } }, "DependsOn": [ @@ -210,15 +210,15 @@ "VpcPublicSubnet2NATGateway9182C01D": { "Type": "AWS::EC2::NatGateway", "Properties": { - "SubnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, "AllocationId": { "Fn::GetAtt": [ "VpcPublicSubnet2EIP3C605A87", "AllocationId" ] }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, "Tags": [ { "Key": "Name", @@ -234,9 +234,6 @@ "VpcPrivateSubnet1Subnet536B997A": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 0, @@ -260,21 +257,24 @@ "Key": "Name", "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet1RouteTableB2C5B500": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ/Vpc/PrivateSubnet1" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet1RouteTableAssociation70C59FA6": { @@ -291,21 +291,18 @@ "VpcPrivateSubnet1DefaultRouteBE02A9ED": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" } } }, "VpcPrivateSubnet2Subnet3788AAA1": { "Type": "AWS::EC2::Subnet", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "AvailabilityZone": { "Fn::Select": [ 1, @@ -329,21 +326,24 @@ "Key": "Name", "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet2RouteTableA678073B": { "Type": "AWS::EC2::RouteTable", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "Tags": [ { "Key": "Name", "Value": "aws-ecs-integ/Vpc/PrivateSubnet2" } - ] + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } } }, "VpcPrivateSubnet2RouteTableAssociationA89CAD56": { @@ -360,12 +360,12 @@ "VpcPrivateSubnet2DefaultRoute060D2087": { "Type": "AWS::EC2::Route", "Properties": { - "RouteTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, "DestinationCidrBlock": "0.0.0.0/0", "NatGatewayId": { "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "RouteTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" } } }, @@ -383,11 +383,11 @@ "VpcVPCGWBF912B6E": { "Type": "AWS::EC2::VPCGatewayAttachment", "Properties": { - "VpcId": { - "Ref": "Vpc8378EB38" - }, "InternetGatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "VpcId": { + "Ref": "Vpc8378EB38" } } }, @@ -589,8 +589,6 @@ "EcsClustergravitonclusterASG869F3168": { "Type": "AWS::AutoScaling::AutoScalingGroup", "Properties": { - "MaxSize": "2", - "MinSize": "2", "LaunchTemplate": { "LaunchTemplateId": { "Ref": "EcsClustergravitonclusterLaunchTemplate46854EA7" @@ -602,6 +600,8 @@ ] } }, + "MaxSize": "2", + "MinSize": "2", "Tags": [ { "Key": "Name", @@ -664,7 +664,71 @@ ] } }, - "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B": { + "EcsClustergravitonclusterDrainECSHookFunctionB606E681": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + ] + }, + "EcsClustergravitonclusterDrainECSHookFunctionAllowInvokeawsecsintegEcsClustergravitonclusterLifecycleHookDrainHookTopicF44E68AA50D91BA3": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClustergravitonclusterDrainECSHookFunctionB606E681", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" + } + } + }, + "EcsClustergravitonclusterDrainECSHookFunctionTopic65B3FD43": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClustergravitonclusterDrainECSHookFunctionB606E681", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" + } + } + }, + "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole00BEEF075": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole00BEEF075", + "Roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole1E7E6BDCA": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole1E7E6BDCA", + "Roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole2F61512F4": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole2F61512F4", + "Roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole395D5864D": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B", + "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole395D5864D", "Roles": [ { "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" @@ -751,69 +861,38 @@ ] } }, - "EcsClustergravitonclusterDrainECSHookFunctionB606E681": { - "Type": "AWS::Lambda::Function", + "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole4A01E14CA": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Role": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764", - "Arn" - ] - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } + ], + "Version": "2012-10-17" }, - "Handler": "index.lambda_handler", - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole4A01E14CA", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/graviton-cluster" + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B", - "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" - ] - }, - "EcsClustergravitonclusterDrainECSHookFunctionAllowInvokeawsecsintegEcsClustergravitonclusterLifecycleHookDrainHookTopicF44E68AA50D91BA3": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionB606E681", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - } - } - }, - "EcsClustergravitonclusterDrainECSHookFunctionTopic65B3FD43": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - }, - "Endpoint": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionB606E681", - "Arn" - ] - } + ] } }, "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC": { @@ -879,9 +958,9 @@ "AutoScalingGroupName": { "Ref": "EcsClustergravitonclusterASG869F3168" }, - "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "DefaultResult": "CONTINUE", "HeartbeatTimeout": 300, + "LifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "NotificationTargetARN": { "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/cdk.out index f0b901e7c06e5..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"32.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/integ.json index 4832c36b741e0..5648724a9dbf0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "39.0.0", "testCases": { "integ.graviton": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/manifest.json index eabe048922a12..105f1e9f3eddc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-ecs-integ.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6156adc5e94052a67460bd0e7561176c2091a0c1e48d3cc5d4198fad8289578a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4538c5fc0d16f10eaa595ea326c538b0520b2768f8083ad4433a6fb01dba2b81.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -171,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -219,12 +226,6 @@ "data": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" } ], - "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B" - } - ], "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -243,6 +244,36 @@ "data": "EcsClustergravitonclusterDrainECSHookFunctionTopic65B3FD43" } ], + "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole00BEEF075" + } + ], + "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole1E7E6BDCA" + } + ], + "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole2F61512F4" + } + ], + "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole395D5864D" + } + ], + "/aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole4A01E14CA" + } + ], "/aws-ecs-integ/EcsCluster/graviton-cluster/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -285,10 +316,10 @@ "data": "CheckBootstrapVersion" } ], - "EcsClustergravitonclusterLaunchTemplateProfile185F7FB0": [ + "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B": [ { "type": "aws:cdk:logicalId", - "data": "EcsClustergravitonclusterLaunchTemplateProfile185F7FB0", + "data": "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B", "trace": [ "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" ] diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/tree.json index 2b448c85225a7..e23369744a112 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.graviton.js.snapshot/tree.json @@ -45,9 +45,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 0, @@ -71,7 +68,10 @@ "key": "Name", "value": "aws-ecs-integ/Vpc/PublicSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -93,15 +93,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ/Vpc/PublicSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -134,12 +134,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPublicSubnet1RouteTable6C95E38E" - }, "destinationCidrBlock": "0.0.0.0/0", "gatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" } } }, @@ -174,15 +174,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { - "subnetId": { - "Ref": "VpcPublicSubnet1Subnet5C2D37C4" - }, "allocationId": { "Fn::GetAtt": [ "VpcPublicSubnet1EIPD7E02669", "AllocationId" ] }, + "subnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + }, "tags": [ { "key": "Name", @@ -212,9 +212,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 1, @@ -238,7 +235,10 @@ "key": "Name", "value": "aws-ecs-integ/Vpc/PublicSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -260,15 +260,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ/Vpc/PublicSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -301,12 +301,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPublicSubnet2RouteTable94F7E489" - }, "destinationCidrBlock": "0.0.0.0/0", "gatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "routeTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" } } }, @@ -341,15 +341,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { - "subnetId": { - "Ref": "VpcPublicSubnet2Subnet691E08A3" - }, "allocationId": { "Fn::GetAtt": [ "VpcPublicSubnet2EIP3C605A87", "AllocationId" ] }, + "subnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + }, "tags": [ { "key": "Name", @@ -379,9 +379,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 0, @@ -405,7 +402,10 @@ "key": "Name", "value": "aws-ecs-integ/Vpc/PrivateSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -427,15 +427,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ/Vpc/PrivateSubnet1" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -468,12 +468,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" - }, "destinationCidrBlock": "0.0.0.0/0", "natGatewayId": { "Ref": "VpcPublicSubnet1NATGateway4D7517AA" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet1RouteTableB2C5B500" } } }, @@ -498,9 +498,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "availabilityZone": { "Fn::Select": [ 1, @@ -524,7 +521,10 @@ "key": "Name", "value": "aws-ecs-integ/Vpc/PrivateSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -546,15 +546,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "tags": [ { "key": "Name", "value": "aws-ecs-integ/Vpc/PrivateSubnet2" } - ] + ], + "vpcId": { + "Ref": "Vpc8378EB38" + } } }, "constructInfo": { @@ -587,12 +587,12 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { - "routeTableId": { - "Ref": "VpcPrivateSubnet2RouteTableA678073B" - }, "destinationCidrBlock": "0.0.0.0/0", "natGatewayId": { "Ref": "VpcPublicSubnet2NATGateway9182C01D" + }, + "routeTableId": { + "Ref": "VpcPrivateSubnet2RouteTableA678073B" } } }, @@ -632,11 +632,11 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", "aws:cdk:cloudformation:props": { - "vpcId": { - "Ref": "Vpc8378EB38" - }, "internetGatewayId": { "Ref": "VpcIGWD7BA715C" + }, + "vpcId": { + "Ref": "Vpc8378EB38" } } }, @@ -854,6 +854,14 @@ "version": "0.0.0" } }, + "ImportedInstanceProfile": { + "id": "ImportedInstanceProfile", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/ImportedInstanceProfile", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, "LaunchTemplate": { "id": "LaunchTemplate", "path": "aws-ecs-integ/EcsCluster/graviton-cluster/LaunchTemplate", @@ -953,8 +961,6 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::AutoScaling::AutoScalingGroup", "aws:cdk:cloudformation:props": { - "maxSize": "2", - "minSize": "2", "launchTemplate": { "launchTemplateId": { "Ref": "EcsClustergravitonclusterLaunchTemplate46854EA7" @@ -966,6 +972,8 @@ ] } }, + "maxSize": "2", + "minSize": "2", "tags": [ { "key": "Name", @@ -1052,111 +1060,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClustergravitonclusterASG869F3168" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClustergravitonclusterDrainECSHookFunctionServiceRoleDefaultPolicy1563DC6B", - "roles": [ - { - "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1173,12 +1076,6 @@ "code": { "zipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" }, - "role": { - "Fn::GetAtt": [ - "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764", - "Arn" - ] - }, "environment": { "variables": { "CLUSTER": { @@ -1187,6 +1084,12 @@ } }, "handler": "index.lambda_handler", + "role": { + "Fn::GetAtt": [ + "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764", + "Arn" + ] + }, "runtime": "python3.9", "tags": [ { @@ -1236,15 +1139,15 @@ "attributes": { "aws:cdk:cloudformation:type": "AWS::SNS::Subscription", "aws:cdk:cloudformation:props": { - "protocol": "lambda", - "topicArn": { - "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" - }, "endpoint": { "Fn::GetAtt": [ "EcsClustergravitonclusterDrainECSHookFunctionB606E681", "Arn" ] + }, + "protocol": "lambda", + "topicArn": { + "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" } } }, @@ -1258,6 +1161,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole00BEEF075", + "roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClustergravitonclusterASG869F3168" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole1E7E6BDCA", + "roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole2F61512F4", + "roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole395D5864D", + "roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/graviton-cluster/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClustergravitonclusterDrainECSHookFunctioninlinePolicyAddedToExecutionRole4A01E14CA", + "roles": [ + { + "Ref": "EcsClustergravitonclusterDrainECSHookFunctionServiceRole26D97764" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1268,7 +1428,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1403,9 +1563,9 @@ "autoScalingGroupName": { "Ref": "EcsClustergravitonclusterASG869F3168" }, - "lifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "defaultResult": "CONTINUE", "heartbeatTimeout": 300, + "lifecycleTransition": "autoscaling:EC2_INSTANCE_TERMINATING", "notificationTargetArn": { "Ref": "EcsClustergravitonclusterLifecycleHookDrainHookTopic0A778AAC" }, @@ -1483,7 +1643,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.55" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/aws-ecs-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/aws-ecs-integ.assets.json index 4d79a01d6743f..be10d9a4e387b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/aws-ecs-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/aws-ecs-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "962093345002e28cad33974068ebaf8dd7738dcebd7572ace95937261d6e1fcf": { + "9f33d414b4d8b79732cf31a9de519bc7680ac17546c29359ec36fade4ef443dd": { "source": { "path": "aws-ecs-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "962093345002e28cad33974068ebaf8dd7738dcebd7572ace95937261d6e1fcf.json", + "objectKey": "9f33d414b4d8b79732cf31a9de519bc7680ac17546c29359ec36fade4ef443dd.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/aws-ecs-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/aws-ecs-integ.template.json index 783278a721bc9..b3d3adf03c739 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/aws-ecs-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/aws-ecs-integ.template.json @@ -664,7 +664,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -751,69 +861,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { @@ -925,12 +1004,12 @@ "Value": "value" }, { - "Name": "AWS_REGION", - "Value": { - "Ref": "AWS::Region" - } + "Name": "AWS_REGION", + "Value": { + "Ref": "AWS::Region" + } } - ], + ], "Essential": true, "Image": "amazon/amazon-ecs-sample", "Memory": 256, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/integ.json index bc008c5679dd5..51782a9de06be 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "integ.lb-awsvpc-nw": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/manifest.json index b5ef8443430d4..164b8fc9ff6ca 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/962093345002e28cad33974068ebaf8dd7738dcebd7572ace95937261d6e1fcf.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9f33d414b4d8b79732cf31a9de519bc7680ac17546c29359ec36fade4ef443dd.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -220,12 +226,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -244,6 +244,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -286,6 +316,12 @@ "data": "TaskDef54694570" } ], + "/aws-ecs-integ/Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ/Service/Service": [ { "type": "aws:cdk:logicalId", @@ -351,6 +387,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/tree.json index aa8799fca62a0..9ee055a57dfcf 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-awsvpc-nw.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EcsCluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -701,14 +701,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -719,8 +719,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -750,8 +750,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -820,20 +820,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -850,16 +850,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -945,14 +945,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -992,8 +992,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1012,8 +1012,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1057,119 +1057,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1206,8 +1101,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925A": { @@ -1230,8 +1125,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1257,26 +1152,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1302,14 +1454,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1320,8 +1472,8 @@ "id": "ImportRole", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1351,8 +1503,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1386,20 +1538,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1426,42 +1578,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "TaskDef": { @@ -1476,8 +1628,8 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1501,14 +1653,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1528,6 +1680,18 @@ "containerPort": 80, "protocol": "tcp" } + ], + "environment": [ + { + "name": "SOME_VARIABLE", + "value": "value" + }, + { + "name": "AWS_REGION", + "value": { + "Ref": "AWS::Region" + } + } ] } ], @@ -1545,22 +1709,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "web": { "id": "web", "path": "aws-ecs-integ/TaskDef/web", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "Service": { @@ -1620,8 +1784,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } }, "SecurityGroup": { @@ -1648,8 +1812,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } }, "from awsecsintegLBSecurityGroupC30F5EB4:80": { @@ -1677,20 +1841,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "LB": { @@ -1730,8 +1894,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", + "version": "0.0.0" } }, "SecurityGroup": { @@ -1760,8 +1924,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } }, "to awsecsintegServiceSecurityGroup48EE4368:80": { @@ -1789,14 +1953,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupEgress", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "PublicListener": { @@ -1825,8 +1989,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", + "version": "0.0.0" } }, "ECSGroup": { @@ -1854,56 +2018,56 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", + "version": "0.0.0" } }, "LoadBalancerDNS": { "id": "LoadBalancerDNS", "path": "aws-ecs-integ/LoadBalancerDNS", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -1911,13 +2075,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/aws-ecs-integ-ecs.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/aws-ecs-integ-ecs.assets.json index 471c817bffa66..ec9eeebf67fb6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/aws-ecs-integ-ecs.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/aws-ecs-integ-ecs.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "f578fe236ba81abe39b7df438987885e989c4ef010c56f44601592788b07df23": { + "995bca1f52f70456cbf3adfef674235735f20302219cb36f345ffe30437b534b": { "source": { "path": "aws-ecs-integ-ecs.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f578fe236ba81abe39b7df438987885e989c4ef010c56f44601592788b07df23.json", + "objectKey": "995bca1f52f70456cbf3adfef674235735f20302219cb36f345ffe30437b534b.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/aws-ecs-integ-ecs.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/aws-ecs-integ-ecs.template.json index fac4ce6464d7b..f5fab5ca7f644 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/aws-ecs-integ-ecs.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/aws-ecs-integ-ecs.template.json @@ -685,7 +685,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -699,7 +763,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -726,13 +806,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -746,7 +840,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -764,7 +874,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -772,69 +882,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/integ.json index ae8bcc91bc92d..2288070765769 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "integ.lb-bridge-nw": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/manifest.json index 37c71828e908a..869c55a64e031 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-ecs.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f578fe236ba81abe39b7df438987885e989c4ef010c56f44601592788b07df23.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/995bca1f52f70456cbf3adfef674235735f20302219cb36f345ffe30437b534b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ-ecs/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ-ecs/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -226,12 +232,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -250,6 +250,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -292,6 +322,12 @@ "data": "TaskDef54694570" } ], + "/aws-ecs-integ-ecs/Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ-ecs/Service/Service": [ { "type": "aws:cdk:logicalId", @@ -345,6 +381,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ-ecs" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/tree.json index 67995d83d5109..b11021d87bd35 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.lb-bridge-nw.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-ecs/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-ecs/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-ecs/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EcsCluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -701,8 +701,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } }, "from awsecsintegecsLBSecurityGroup7DA90129:8080": { @@ -730,14 +730,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -748,8 +748,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -779,8 +779,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -849,20 +849,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -879,16 +879,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -974,14 +974,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -1021,8 +1021,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1041,8 +1041,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1086,119 +1086,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1235,8 +1130,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AF": { @@ -1259,8 +1154,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1286,26 +1181,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1331,14 +1483,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1349,8 +1501,8 @@ "id": "ImportRole", "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1380,8 +1532,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1415,20 +1567,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1455,42 +1607,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ-ecs/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ-ecs/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "TaskDef": { @@ -1505,8 +1657,8 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ-ecs/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1530,14 +1682,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1575,22 +1727,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "web": { "id": "web", "path": "aws-ecs-integ-ecs/TaskDef/web", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "Service": { @@ -1629,14 +1781,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "LB": { @@ -1676,8 +1828,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", + "version": "0.0.0" } }, "SecurityGroup": { @@ -1706,8 +1858,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } }, "to awsecsintegecsEcsClusterDefaultAutoScalingGroupInstanceSecurityGroupE3116410:8080": { @@ -1735,14 +1887,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupEgress", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "PublicListener": { @@ -1771,8 +1923,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", + "version": "0.0.0" } }, "ECSGroup": { @@ -1800,56 +1952,56 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", + "version": "0.0.0" } }, "LoadBalancerDNS": { "id": "LoadBalancerDNS", "path": "aws-ecs-integ-ecs/LoadBalancerDNS", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ-ecs/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ-ecs/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -1857,13 +2009,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json index 2af610f0d4a39..9c02a36fd8387 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack.assets.json index 4b9f8c5c41ab3..a60fb92575ad9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack.assets.json @@ -1,7 +1,7 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "7e266e55d90d8a167dc9b1545687d2ec9103fc0e7fe4fa3c31d030f07ef554c7": { + "c05c54043fe81adaf5a7868c3b3294a2b2a5019fc8d2a985118d8c3d84336351": { "source": { "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7e266e55d90d8a167dc9b1545687d2ec9103fc0e7fe4fa3c31d030f07ef554c7.json", + "objectKey": "c05c54043fe81adaf5a7868c3b3294a2b2a5019fc8d2a985118d8c3d84336351.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack.template.json index 8add7ae0bef23..edd1444e666dc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack.template.json @@ -664,7 +664,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawscdkecsintegtestwithemptyplacementconstraintstackEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic9E22C7D930C32786": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -751,69 +861,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawscdkecsintegtestwithemptyplacementconstraintstackEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic9E22C7D930C32786": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/integ.json index 7b47c4ec44dc5..3fd90cb6fcb8c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "Integ/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/manifest.json index 6320e27294f2a..3b36ff2031e6b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7e266e55d90d8a167dc9b1545687d2ec9103fc0e7fe4fa3c31d030f07ef554c7.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c05c54043fe81adaf5a7868c3b3294a2b2a5019fc8d2a985118d8c3d84336351.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VPCVPCGW99B986DC" } ], + "/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -220,12 +226,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -244,6 +244,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -286,6 +316,12 @@ "data": "TaskDef54694570" } ], + "/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/Test_Stack": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/Test_Stack/Service": [ { "type": "aws:cdk:logicalId", @@ -303,6 +339,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/tree.json index 9735f74c862a7..7f27561295aab 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-constraint-default-empty.js.snapshot/tree.json @@ -1060,111 +1060,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1266,6 +1161,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integ-test-with-empty-placement-constraint-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1276,7 +1428,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1629,7 +1781,7 @@ "path": "Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1675,7 +1827,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/aws-cdk-ecs-integration-test-stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/aws-cdk-ecs-integration-test-stack.assets.json index d604cd66a5f54..057a3faf2ad0b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/aws-cdk-ecs-integration-test-stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/aws-cdk-ecs-integration-test-stack.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "aea815695deca6fe52208952a0a9deab404ed3d60917de00180b2395c60013f8": { + "f4bd05e7bcde756aadce667e45dfd92294121dcaeb3dcc19149756ef7764c598": { "source": { "path": "aws-cdk-ecs-integration-test-stack.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "aea815695deca6fe52208952a0a9deab404ed3d60917de00180b2395c60013f8.json", + "objectKey": "f4bd05e7bcde756aadce667e45dfd92294121dcaeb3dcc19149756ef7764c598.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/aws-cdk-ecs-integration-test-stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/aws-cdk-ecs-integration-test-stack.template.json index b93132a659692..cba8d88c6da11 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/aws-cdk-ecs-integration-test-stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/aws-cdk-ecs-integration-test-stack.template.json @@ -664,7 +664,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawscdkecsintegrationteststackEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicD01B2572F6CCD921": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -751,69 +861,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawscdkecsintegrationteststackEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicD01B2572F6CCD921": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/integ.json index 8c02b2e1319d9..4cb8e75c5c417 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "integ.placement-strategies": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/manifest.json index e43ac3692be9a..7190237809ed4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-cdk-ecs-integration-test-stack.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/aea815695deca6fe52208952a0a9deab404ed3d60917de00180b2395c60013f8.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4bd05e7bcde756aadce667e45dfd92294121dcaeb3dcc19149756ef7764c598.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VPCVPCGW99B986DC" } ], + "/aws-cdk-ecs-integration-test-stack/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-cdk-ecs-integration-test-stack/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -220,12 +226,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -244,6 +244,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -286,6 +316,12 @@ "data": "TaskDef54694570" } ], + "/aws-cdk-ecs-integration-test-stack/Test_Stack": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-cdk-ecs-integration-test-stack/Test_Stack/Service": [ { "type": "aws:cdk:logicalId", @@ -303,6 +339,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-cdk-ecs-integration-test-stack" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/tree.json index 8ee67b425c833..000f09ef9c940 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.placement-strategies.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-cdk-ecs-integration-test-stack/VPC/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-cdk-ecs-integration-test-stack/VPC/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-cdk-ecs-integration-test-stack/VPC/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-cdk-ecs-integration-test-stack/VPC/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EcsCluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -701,14 +701,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -719,8 +719,8 @@ "id": "ImportInstanceRole", "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -750,8 +750,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -820,20 +820,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -850,16 +850,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -945,14 +945,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -992,8 +992,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1012,8 +1012,8 @@ "id": "ImportServiceRole", "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1057,119 +1057,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1206,8 +1101,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awscdkecsintegrationteststackEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicD01B2572": { @@ -1230,8 +1125,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1257,26 +1152,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1302,14 +1454,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1320,8 +1472,8 @@ "id": "ImportRole", "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1351,8 +1503,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1386,20 +1538,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1426,42 +1578,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-cdk-ecs-integration-test-stack/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-cdk-ecs-integration-test-stack/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "TaskDef": { @@ -1476,8 +1628,8 @@ "id": "ImportTaskRole", "path": "aws-cdk-ecs-integration-test-stack/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1501,14 +1653,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1539,22 +1691,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "web": { "id": "web", "path": "aws-cdk-ecs-integration-test-stack/TaskDef/web", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "Test_Stack": { @@ -1593,36 +1745,36 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-cdk-ecs-integration-test-stack/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-cdk-ecs-integration-test-stack/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -1630,13 +1782,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/PseudoTerminalDefaultTestDeployAssert1B88B826.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/PseudoTerminalDefaultTestDeployAssert1B88B826.assets.json index 660a1fafdef1e..d3deab3846f96 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/PseudoTerminalDefaultTestDeployAssert1B88B826.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/PseudoTerminalDefaultTestDeployAssert1B88B826.assets.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/aws-ecs-integ-pseudo-terminal.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/aws-ecs-integ-pseudo-terminal.assets.json index 9dfedda5e6ea2..71438240b049b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/aws-ecs-integ-pseudo-terminal.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/aws-ecs-integ-pseudo-terminal.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "73eb4eb0781dbbfcd6929aa5b2d69c7ecd47ba87d617806b3fcc5312cb8716ee": { + "ef6f986d893a2354741572ccb6e5fca6211c91930cc63ea09d6df1cc1f9f153e": { "source": { "path": "aws-ecs-integ-pseudo-terminal.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "73eb4eb0781dbbfcd6929aa5b2d69c7ecd47ba87d617806b3fcc5312cb8716ee.json", + "objectKey": "ef6f986d893a2354741572ccb6e5fca6211c91930cc63ea09d6df1cc1f9f153e.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/aws-ecs-integ-pseudo-terminal.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/aws-ecs-integ-pseudo-terminal.template.json index 61e0cf4782f5e..473ed25c99a5a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/aws-ecs-integ-pseudo-terminal.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/aws-ecs-integ-pseudo-terminal.template.json @@ -664,7 +664,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegpseudoterminalEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic8C590529A250292C": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -751,69 +861,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegpseudoterminalEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic8C590529A250292C": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/integ.json index 10b2939d9a51b..a4dca987e218d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "PseudoTerminal/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/manifest.json index db0040ba7b270..8a439a2860bc9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-pseudo-terminal.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/73eb4eb0781dbbfcd6929aa5b2d69c7ecd47ba87d617806b3fcc5312cb8716ee.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ef6f986d893a2354741572ccb6e5fca6211c91930cc63ea09d6df1cc1f9f153e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ-pseudo-terminal/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ-pseudo-terminal/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -220,12 +226,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -244,6 +244,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -286,6 +316,12 @@ "data": "TaskDef54694570" } ], + "/aws-ecs-integ-pseudo-terminal/Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ-pseudo-terminal/Service/Service": [ { "type": "aws:cdk:logicalId", @@ -309,6 +345,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ-pseudo-terminal" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/tree.json index d724c4afbb49b..3a286bb415d0a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.pseudo-terminal.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-pseudo-terminal/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-pseudo-terminal/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-pseudo-terminal/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-pseudo-terminal/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EcsCluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -701,14 +701,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -719,8 +719,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -750,8 +750,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -820,20 +820,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -850,16 +850,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -945,14 +945,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -992,8 +992,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1012,8 +1012,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1057,119 +1057,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1206,8 +1101,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegpseudoterminalEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic8C590529": { @@ -1230,8 +1125,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1257,26 +1152,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1302,14 +1454,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1320,8 +1472,8 @@ "id": "ImportRole", "path": "aws-ecs-integ-pseudo-terminal/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1351,8 +1503,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1386,20 +1538,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1426,42 +1578,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ-pseudo-terminal/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ-pseudo-terminal/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "TaskDef": { @@ -1476,8 +1628,8 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ-pseudo-terminal/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1501,14 +1653,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1523,7 +1675,15 @@ "image": "amazon/amazon-ecs-sample", "memory": 256, "name": "web", - "pseudoTerminal": true + "pseudoTerminal": true, + "environment": [ + { + "name": "AWS_REGION", + "value": { + "Ref": "AWS::Region" + } + } + ] } ], "family": "awsecsintegpseudoterminalTaskDefA7C50734", @@ -1540,22 +1700,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "web": { "id": "web", "path": "aws-ecs-integ-pseudo-terminal/TaskDef/web", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "Service": { @@ -1605,8 +1765,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } }, "SecurityGroup": { @@ -1633,42 +1793,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ-pseudo-terminal/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ-pseudo-terminal/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "PseudoTerminal": { @@ -1684,7 +1844,7 @@ "path": "PseudoTerminal/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1695,22 +1855,22 @@ "id": "BootstrapVersion", "path": "PseudoTerminal/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "PseudoTerminal/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } } }, @@ -1730,13 +1890,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/aws-ecs-integ-ecs.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/aws-ecs-integ-ecs.assets.json index 538782abc05de..dab90c79d12ec 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/aws-ecs-integ-ecs.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/aws-ecs-integ-ecs.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "b4a2ffa0868e8b3dc17da415efbf8354499a7f5390232f14e1e9240e5b5701dc": { + "1feb4c949a4342951b35c94547ea582529d1dbc1c62e8b7bfdda96a704184b0d": { "source": { "path": "aws-ecs-integ-ecs.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b4a2ffa0868e8b3dc17da415efbf8354499a7f5390232f14e1e9240e5b5701dc.json", + "objectKey": "1feb4c949a4342951b35c94547ea582529d1dbc1c62e8b7bfdda96a704184b0d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/aws-ecs-integ-ecs.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/aws-ecs-integ-ecs.template.json index db23ae8ea4d16..66826b849087c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/aws-ecs-integ-ecs.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/aws-ecs-integ-ecs.template.json @@ -664,7 +664,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -751,69 +861,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/integ.json index 8dd5839e9a474..c67e49b8c887a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "integ.sd-awsvpc-nw": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/manifest.json index 9190db0e5931b..b647c5323df8d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-ecs.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b4a2ffa0868e8b3dc17da415efbf8354499a7f5390232f14e1e9240e5b5701dc.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1feb4c949a4342951b35c94547ea582529d1dbc1c62e8b7bfdda96a704184b0d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ-ecs/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ-ecs/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -220,12 +226,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -244,6 +244,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -292,6 +322,12 @@ "data": "TaskDef54694570" } ], + "/aws-ecs-integ-ecs/FrontendService": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ-ecs/FrontendService/Service": [ { "type": "aws:cdk:logicalId", @@ -321,6 +357,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ-ecs" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/tree.json index 5c3eec67c9e5a..45e5e3c216045 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-awsvpc-nw.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-ecs/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-ecs/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-ecs/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EcsCluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -701,14 +701,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -719,8 +719,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -750,8 +750,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -820,20 +820,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -850,16 +850,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -945,14 +945,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -992,8 +992,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1012,8 +1012,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1057,119 +1057,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1206,8 +1101,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AF": { @@ -1230,8 +1125,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1257,26 +1152,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1302,14 +1454,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1320,8 +1472,8 @@ "id": "ImportRole", "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1351,8 +1503,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1386,20 +1538,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1426,20 +1578,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "DefaultServiceDiscoveryNamespace": { @@ -1459,36 +1611,36 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_servicediscovery.CfnPrivateDnsNamespace", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_servicediscovery.PrivateDnsNamespace", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ-ecs/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ-ecs/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "TaskDef": { @@ -1503,8 +1655,8 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ-ecs/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1528,14 +1680,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1556,6 +1708,14 @@ "hostPort": 80, "protocol": "tcp" } + ], + "environment": [ + { + "name": "AWS_REGION", + "value": { + "Ref": "AWS::Region" + } + } ] } ], @@ -1573,22 +1733,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "frontend": { "id": "frontend", "path": "aws-ecs-integ-ecs/TaskDef/frontend", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "FrontendService": { @@ -1648,8 +1808,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } }, "CloudmapService": { @@ -1690,14 +1850,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_servicediscovery.CfnService", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_servicediscovery.Service", + "version": "0.0.0" } }, "SecurityGroup": { @@ -1724,42 +1884,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ-ecs/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ-ecs/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -1767,13 +1927,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/aws-ecs-integ-ecs.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/aws-ecs-integ-ecs.assets.json index 7486e891a711a..308739bc6448b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/aws-ecs-integ-ecs.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/aws-ecs-integ-ecs.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "c637188683f8bd089a43b0b4406ca59b0982c8d14c7d87168acace16362f9019": { + "2fe0ebf2e1b8aba6694af95859eb874ca311917c187b63c328e3e492365062c6": { "source": { "path": "aws-ecs-integ-ecs.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c637188683f8bd089a43b0b4406ca59b0982c8d14c7d87168acace16362f9019.json", + "objectKey": "2fe0ebf2e1b8aba6694af95859eb874ca311917c187b63c328e3e492365062c6.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/aws-ecs-integ-ecs.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/aws-ecs-integ-ecs.template.json index 5919e3af8945b..1dc99dbd0b369 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/aws-ecs-integ-ecs.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/aws-ecs-integ-ecs.template.json @@ -664,7 +664,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -751,69 +861,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/integ.json index 3e907200e6f79..48082e4959a21 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "integ.sd-bridge-nw": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/manifest.json index 83e09a030decf..7a802bc554ce2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-ecs.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c637188683f8bd089a43b0b4406ca59b0982c8d14c7d87168acace16362f9019.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2fe0ebf2e1b8aba6694af95859eb874ca311917c187b63c328e3e492365062c6.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ-ecs/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ-ecs/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -220,12 +226,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -244,6 +244,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -292,6 +322,12 @@ "data": "frontendTDB289C8FA" } ], + "/aws-ecs-integ-ecs/FrontendService": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ-ecs/FrontendService/Service": [ { "type": "aws:cdk:logicalId", @@ -315,6 +351,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ-ecs" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/tree.json index c68fd6081edc4..46e13fbabcdea 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.sd-bridge-nw.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-ecs/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-ecs/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-ecs/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-ecs/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EcsCluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -701,14 +701,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -719,8 +719,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -750,8 +750,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -820,20 +820,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -850,16 +850,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -945,14 +945,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -992,8 +992,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1012,8 +1012,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1057,119 +1057,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1206,8 +1101,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AF": { @@ -1230,8 +1125,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1257,26 +1152,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1302,14 +1454,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1320,8 +1472,8 @@ "id": "ImportRole", "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1351,8 +1503,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1386,20 +1538,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1426,20 +1578,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "DefaultServiceDiscoveryNamespace": { @@ -1459,36 +1611,36 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_servicediscovery.CfnPrivateDnsNamespace", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_servicediscovery.PrivateDnsNamespace", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ-ecs/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ-ecs/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "frontendTD": { @@ -1503,8 +1655,8 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ-ecs/frontendTD/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1528,14 +1680,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1573,22 +1725,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "frontend": { "id": "frontend", "path": "aws-ecs-integ-ecs/frontendTD/frontend", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "FrontendService": { @@ -1629,8 +1781,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } }, "CloudmapService": { @@ -1671,42 +1823,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_servicediscovery.CfnService", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_servicediscovery.Service", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ-ecs/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ-ecs/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -1714,13 +1866,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/aws-ecs-integ-spot.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/aws-ecs-integ-spot.assets.json index ec18866be581b..04ae66d8e89b6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/aws-ecs-integ-spot.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/aws-ecs-integ-spot.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "cf00b8198a39732704b1095530660c98a6d05146b8860ce8d8630847e4c16d70": { + "62682e2c70d94947dd2e07fd836ef45b728d6f6226a68465b4e9607dc4936e0d": { "source": { "path": "aws-ecs-integ-spot.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "cf00b8198a39732704b1095530660c98a6d05146b8860ce8d8630847e4c16d70.json", + "objectKey": "62682e2c70d94947dd2e07fd836ef45b728d6f6226a68465b4e9607dc4936e0d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/aws-ecs-integ-spot.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/aws-ecs-integ-spot.template.json index d40df2075c422..05257dc6ffd3d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/aws-ecs-integ-spot.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/aws-ecs-integ-spot.template.json @@ -671,7 +671,71 @@ ] } }, - "EcsClusterasgSpotDrainECSHookFunctionServiceRoleDefaultPolicy96377D7C": { + "EcsClusterasgSpotDrainECSHookFunction969F1553": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-spot/EcsCluster/asgSpot" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" + ] + }, + "EcsClusterasgSpotDrainECSHookFunctionAllowInvokeawsecsintegspotEcsClusterasgSpotLifecycleHookDrainHookTopic92E2845E8BD3FE4E": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterasgSpotDrainECSHookFunction969F1553", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterasgSpotLifecycleHookDrainHookTopic6212EC83" + } + } + }, + "EcsClusterasgSpotDrainECSHookFunctionTopic9648CAD4": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterasgSpotDrainECSHookFunction969F1553", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterasgSpotLifecycleHookDrainHookTopic6212EC83" + } + } + }, + "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole09C74CDAF": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -685,7 +749,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole09C74CDAF", + "Roles": [ + { + "Ref": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" + } + ] + } + }, + "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole18626061D": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -712,13 +792,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole18626061D", + "Roles": [ + { + "Ref": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" + } + ] + } + }, + "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole2225E6E90": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -732,7 +826,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole2225E6E90", + "Roles": [ + { + "Ref": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" + } + ] + } + }, + "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole35C617151": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -750,7 +860,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterasgSpotDrainECSHookFunctionServiceRoleDefaultPolicy96377D7C", + "PolicyName": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole35C617151", "Roles": [ { "Ref": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" @@ -758,69 +868,38 @@ ] } }, - "EcsClusterasgSpotDrainECSHookFunction969F1553": { - "Type": "AWS::Lambda::Function", + "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole43F8D9D49": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole43F8D9D49", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgSpot" + "Ref": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterasgSpotDrainECSHookFunctionServiceRoleDefaultPolicy96377D7C", - "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" - ] - }, - "EcsClusterasgSpotDrainECSHookFunctionAllowInvokeawsecsintegspotEcsClusterasgSpotLifecycleHookDrainHookTopic92E2845E8BD3FE4E": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterasgSpotDrainECSHookFunction969F1553", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterasgSpotLifecycleHookDrainHookTopic6212EC83" - } - } - }, - "EcsClusterasgSpotDrainECSHookFunctionTopic9648CAD4": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterasgSpotDrainECSHookFunction969F1553", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterasgSpotLifecycleHookDrainHookTopic6212EC83" - } + ] } }, "EcsClusterasgSpotLifecycleHookDrainHookTopic6212EC83": { @@ -1175,7 +1254,71 @@ ] } }, - "EcsClusterasgOdDrainECSHookFunctionServiceRoleDefaultPolicyE54F1794": { + "EcsClusterasgOdDrainECSHookFunction962490E0": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-spot/EcsCluster/asgOd" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" + ] + }, + "EcsClusterasgOdDrainECSHookFunctionAllowInvokeawsecsintegspotEcsClusterasgOdLifecycleHookDrainHookTopicB293D7D8B41B2D12": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterasgOdDrainECSHookFunction962490E0", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterasgOdLifecycleHookDrainHookTopic673CE202" + } + } + }, + "EcsClusterasgOdDrainECSHookFunctionTopicE6BE4000": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterasgOdDrainECSHookFunction962490E0", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterasgOdLifecycleHookDrainHookTopic673CE202" + } + } + }, + "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole094FADA95": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -1189,7 +1332,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole094FADA95", + "Roles": [ + { + "Ref": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" + } + ] + } + }, + "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole14F1028A8": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -1216,13 +1375,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole14F1028A8", + "Roles": [ + { + "Ref": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" + } + ] + } + }, + "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole2274F3C3D": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -1236,7 +1409,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole2274F3C3D", + "Roles": [ + { + "Ref": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" + } + ] + } + }, + "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole35969A0F5": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -1254,7 +1443,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterasgOdDrainECSHookFunctionServiceRoleDefaultPolicyE54F1794", + "PolicyName": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole35969A0F5", "Roles": [ { "Ref": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" @@ -1262,69 +1451,38 @@ ] } }, - "EcsClusterasgOdDrainECSHookFunction962490E0": { - "Type": "AWS::Lambda::Function", + "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole48C7C27F2": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole48C7C27F2", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-spot/EcsCluster/asgOd" + "Ref": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterasgOdDrainECSHookFunctionServiceRoleDefaultPolicyE54F1794", - "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" - ] - }, - "EcsClusterasgOdDrainECSHookFunctionAllowInvokeawsecsintegspotEcsClusterasgOdLifecycleHookDrainHookTopicB293D7D8B41B2D12": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterasgOdDrainECSHookFunction962490E0", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterasgOdLifecycleHookDrainHookTopic673CE202" - } - } - }, - "EcsClusterasgOdDrainECSHookFunctionTopicE6BE4000": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterasgOdDrainECSHookFunction962490E0", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterasgOdLifecycleHookDrainHookTopic673CE202" - } + ] } }, "EcsClusterasgOdLifecycleHookDrainHookTopic673CE202": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/integ.json index 47a9f892298e6..cc1ada5914a88 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "integ.spot-drain": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/manifest.json index cefa68b791a54..1edc5e5b52d0f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-spot.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cf00b8198a39732704b1095530660c98a6d05146b8860ce8d8630847e4c16d70.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/62682e2c70d94947dd2e07fd836ef45b728d6f6226a68465b4e9607dc4936e0d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ-spot/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ-spot/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -226,12 +232,6 @@ "data": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" } ], - "/aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterasgSpotDrainECSHookFunctionServiceRoleDefaultPolicy96377D7C" - } - ], "/aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -250,6 +250,36 @@ "data": "EcsClusterasgSpotDrainECSHookFunctionTopic9648CAD4" } ], + "/aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole09C74CDAF" + } + ], + "/aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole18626061D" + } + ], + "/aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole2225E6E90" + } + ], + "/aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole35C617151" + } + ], + "/aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole43F8D9D49" + } + ], "/aws-ecs-integ-spot/EcsCluster/asgSpot/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -322,12 +352,6 @@ "data": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" } ], - "/aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterasgOdDrainECSHookFunctionServiceRoleDefaultPolicyE54F1794" - } - ], "/aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -346,6 +370,36 @@ "data": "EcsClusterasgOdDrainECSHookFunctionTopicE6BE4000" } ], + "/aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole094FADA95" + } + ], + "/aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole14F1028A8" + } + ], + "/aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole2274F3C3D" + } + ], + "/aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole35969A0F5" + } + ], + "/aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole48C7C27F2" + } + ], "/aws-ecs-integ-spot/EcsCluster/asgOd/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -388,6 +442,12 @@ "data": "Task79114B6B" } ], + "/aws-ecs-integ-spot/Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ-spot/Service/Service": [ { "type": "aws:cdk:logicalId", @@ -405,6 +465,24 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterasgSpotDrainECSHookFunctionServiceRoleDefaultPolicy96377D7C": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterasgSpotDrainECSHookFunctionServiceRoleDefaultPolicy96377D7C", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "EcsClusterasgOdDrainECSHookFunctionServiceRoleDefaultPolicyE54F1794": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterasgOdDrainECSHookFunctionServiceRoleDefaultPolicyE54F1794", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ-spot" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/tree.json index d0d8116b8e05c..e81c21fed7738 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.spot-drain.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-spot/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-spot/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-spot/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ-spot/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EcsCluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "asgSpot": { @@ -701,14 +701,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -719,8 +719,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -750,8 +750,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -820,20 +820,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -850,16 +850,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -951,14 +951,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -999,8 +999,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1019,8 +1019,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1064,119 +1064,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterasgSpotASG0D77F041" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterasgSpotDrainECSHookFunctionServiceRoleDefaultPolicy96377D7C", - "roles": [ - { - "Ref": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1213,8 +1108,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegspotEcsClusterasgSpotLifecycleHookDrainHookTopic92E2845E": { @@ -1237,8 +1132,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1264,26 +1159,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole09C74CDAF", + "roles": [ + { + "Ref": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterasgSpotASG0D77F041" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole18626061D", + "roles": [ + { + "Ref": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole2225E6E90", + "roles": [ + { + "Ref": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole35C617151", + "roles": [ + { + "Ref": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterasgSpotDrainECSHookFunctioninlinePolicyAddedToExecutionRole43F8D9D49", + "roles": [ + { + "Ref": "EcsClusterasgSpotDrainECSHookFunctionServiceRole8EEDDFE0" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1309,14 +1461,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1327,8 +1479,8 @@ "id": "ImportRole", "path": "aws-ecs-integ-spot/EcsCluster/asgSpot/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1358,8 +1510,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1393,20 +1545,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1433,20 +1585,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "asgOd": { @@ -1483,14 +1635,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -1501,8 +1653,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ-spot/EcsCluster/asgOd/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1532,8 +1684,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1602,20 +1754,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -1632,16 +1784,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ-spot/EcsCluster/asgOd/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -1727,14 +1879,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -1775,8 +1927,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1795,8 +1947,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1840,119 +1992,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterasgOdASG0E5C30EC" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterasgOdDrainECSHookFunctionServiceRoleDefaultPolicyE54F1794", - "roles": [ - { - "Ref": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1989,8 +2036,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegspotEcsClusterasgOdLifecycleHookDrainHookTopicB293D7D8": { @@ -2013,8 +2060,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -2040,26 +2087,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole094FADA95", + "roles": [ + { + "Ref": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterasgOdASG0E5C30EC" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole14F1028A8", + "roles": [ + { + "Ref": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole2274F3C3D", + "roles": [ + { + "Ref": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole35969A0F5", + "roles": [ + { + "Ref": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-spot/EcsCluster/asgOd/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterasgOdDrainECSHookFunctioninlinePolicyAddedToExecutionRole48C7C27F2", + "roles": [ + { + "Ref": "EcsClusterasgOdDrainECSHookFunctionServiceRoleFC088D55" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -2085,14 +2389,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -2103,8 +2407,8 @@ "id": "ImportRole", "path": "aws-ecs-integ-spot/EcsCluster/asgOd/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -2134,8 +2438,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -2169,20 +2473,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -2209,42 +2513,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ-spot/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ-spot/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Task": { @@ -2259,8 +2563,8 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ-spot/Task/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -2284,14 +2588,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -2329,22 +2633,22 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "PHP": { "id": "PHP", "path": "aws-ecs-integ-spot/Task/PHP", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.TaskDefinition", + "version": "0.0.0" } }, "Service": { @@ -2373,36 +2677,36 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ-spot/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ-spot/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "Tree": { @@ -2410,13 +2714,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/SwapParametersTestDefaultTestDeployAssert4CDF4940.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/SwapParametersTestDefaultTestDeployAssert4CDF4940.assets.json index e5328344ae4be..d8521eb48ed3e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/SwapParametersTestDefaultTestDeployAssert4CDF4940.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/SwapParametersTestDefaultTestDeployAssert4CDF4940.assets.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/aws-ecs-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/aws-ecs-integ.assets.json index ca0142da7428b..47f1ef6ba6eba 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/aws-ecs-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/aws-ecs-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "35.0.0", + "version": "39.0.0", "files": { - "c54ac818a1c0e71694d27eb067f6ad7bd948b07e39bf64d44ab2d73a3d41adc2": { + "84a341d6aa354ace07a67bd5150fe3190348a9bf747dc15a0ab6385ba6e5bac3": { "source": { "path": "aws-ecs-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c54ac818a1c0e71694d27eb067f6ad7bd948b07e39bf64d44ab2d73a3d41adc2.json", + "objectKey": "84a341d6aa354ace07a67bd5150fe3190348a9bf747dc15a0ab6385ba6e5bac3.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/aws-ecs-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/aws-ecs-integ.template.json index 40ac35b87f959..025cd4d157e49 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/aws-ecs-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/aws-ecs-integ.template.json @@ -664,7 +664,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -751,69 +861,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925AFDCBEE50": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/cdk.out index c5cb2e5de6344..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"35.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/integ.json index 3a336966b2cfb..79e8e45aa28dc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "testCases": { "SwapParametersTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/manifest.json index 5cfdbf9327767..6f773d7601a25 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "35.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c54ac818a1c0e71694d27eb067f6ad7bd948b07e39bf64d44ab2d73a3d41adc2.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/84a341d6aa354ace07a67bd5150fe3190348a9bf747dc15a0ab6385ba6e5bac3.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-ecs-integ/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -220,12 +226,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -244,6 +244,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -286,6 +316,12 @@ "data": "TaskDefinitionB36D86D9" } ], + "/aws-ecs-integ/Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-ecs-integ/Service/Service": [ { "type": "aws:cdk:logicalId", @@ -309,6 +345,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/tree.json index b7352ee411eb8..cf3664de208d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.swap-parameters.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-ecs-integ/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "EcsCluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -701,14 +701,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -719,8 +719,8 @@ "id": "ImportInstanceRole", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -750,8 +750,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -820,20 +820,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -850,16 +850,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -945,14 +945,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -992,8 +992,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1012,8 +1012,8 @@ "id": "ImportServiceRole", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1057,119 +1057,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1206,8 +1101,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awsecsintegEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic7A89925A": { @@ -1230,8 +1125,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1257,26 +1152,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1302,14 +1454,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1320,8 +1472,8 @@ "id": "ImportRole", "path": "aws-ecs-integ/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1351,8 +1503,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1386,20 +1538,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1426,42 +1578,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-ecs-integ/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-ecs-integ/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "TaskDefinition": { @@ -1476,8 +1628,8 @@ "id": "ImportTaskRole", "path": "aws-ecs-integ/TaskDefinition/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1501,14 +1653,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1544,30 +1696,30 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "LinuxParameters": { "id": "LinuxParameters", "path": "aws-ecs-integ/LinuxParameters", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.LinuxParameters", + "version": "0.0.0" } }, "Container": { "id": "Container", "path": "aws-ecs-integ/Container", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } }, "Service": { @@ -1617,8 +1769,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnService", + "version": "0.0.0" } }, "SecurityGroup": { @@ -1645,42 +1797,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2Service", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-ecs-integ/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-ecs-integ/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "SwapParametersTest": { @@ -1696,7 +1848,7 @@ "path": "SwapParametersTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1707,22 +1859,22 @@ "id": "BootstrapVersion", "path": "SwapParametersTest/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "SwapParametersTest/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } } }, @@ -1742,13 +1894,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/__entrypoint__.js similarity index 98% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/__entrypoint__.js index 02033f55cf612..ff3a517fba12d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/__entrypoint__.js @@ -1,6 +1,8 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.withRetries = exports.handler = exports.external = void 0; +exports.external = void 0; +exports.handler = handler; +exports.withRetries = withRetries; const https = require("https"); const url = require("url"); // for unit tests @@ -60,7 +62,6 @@ async function handler(event, context) { await submitResponse('FAILED', resp); } } -exports.handler = handler; function renderResponse(cfnRequest, handlerResponse = {}) { // if physical ID is not returned, we have some defaults for you based // on the request type. @@ -149,7 +150,6 @@ function withRetries(options, fn) { } }; } -exports.withRetries = withRetries; async function sleep(ms) { return new Promise((ok) => setTimeout(ok, ms)); } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/index.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/index.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/aws-cdk-ecs-integration-test-stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/aws-cdk-ecs-integration-test-stack.assets.json index 6c8fd4fafeff9..a1bb1c8e07421 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/aws-cdk-ecs-integration-test-stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/aws-cdk-ecs-integration-test-stack.assets.json @@ -1,20 +1,20 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1": { + "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c": { "source": { - "path": "asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1", + "path": "asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1.zip", + "objectKey": "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "f7093e3c87d25ed7998e36d009c2d16e373a8ed830a77f0983fb54169ff83143": { + "4177614780542e5be4eb5b29ae5a2d897598dc5aa99bb07e6d94405c48cfd839": { "source": { "path": "aws-cdk-ecs-integration-test-stack.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f7093e3c87d25ed7998e36d009c2d16e373a8ed830a77f0983fb54169ff83143.json", + "objectKey": "4177614780542e5be4eb5b29ae5a2d897598dc5aa99bb07e6d94405c48cfd839.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/aws-cdk-ecs-integration-test-stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/aws-cdk-ecs-integration-test-stack.template.json index 4db42cb7557b7..d9885d6cffdbe 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/aws-cdk-ecs-integration-test-stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/aws-cdk-ecs-integration-test-stack.template.json @@ -489,7 +489,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1.zip" + "S3Key": "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c.zip" }, "Timeout": 900, "MemorySize": 128, @@ -788,7 +788,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawscdkecsintegrationteststackEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicD01B2572F6CCD921": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -802,7 +866,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -829,13 +909,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -849,7 +943,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -867,7 +977,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -875,69 +985,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawscdkecsintegrationteststackEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicD01B2572F6CCD921": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/awscdkecsintegrationteststackTaskDefinitionPlacementConstraintsDefaultTestDeployAssert906A0CF3.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/awscdkecsintegrationteststackTaskDefinitionPlacementConstraintsDefaultTestDeployAssert906A0CF3.assets.json index 40bed7791ce92..b7b4160299092 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/awscdkecsintegrationteststackTaskDefinitionPlacementConstraintsDefaultTestDeployAssert906A0CF3.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/awscdkecsintegrationteststackTaskDefinitionPlacementConstraintsDefaultTestDeployAssert906A0CF3.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/integ.json index 6302b513128b5..7ea660031d400 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "aws-cdk-ecs-integration-test-stack/TaskDefinitionPlacementConstraints/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/manifest.json index 41a32e905a4eb..82dd4ce76b779 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "awscdkecsintegrationteststackTaskDefinitionPlacementConstraintsDefaultTestDeployAssert906A0CF3.assets": { "type": "cdk:asset-manifest", @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f7093e3c87d25ed7998e36d009c2d16e373a8ed830a77f0983fb54169ff83143.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4177614780542e5be4eb5b29ae5a2d897598dc5aa99bb07e6d94405c48cfd839.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -232,6 +232,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/aws-cdk-ecs-integration-test-stack/Custom::VpcRestrictDefaultSGCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/aws-cdk-ecs-integration-test-stack/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -244,6 +250,12 @@ "data": "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E" } ], + "/aws-cdk-ecs-integration-test-stack/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/aws-cdk-ecs-integration-test-stack/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -292,12 +304,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -316,6 +322,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -358,6 +394,12 @@ "data": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter" } ], + "/aws-cdk-ecs-integration-test-stack/Ec2Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/aws-cdk-ecs-integration-test-stack/Ec2Service/Service": [ { "type": "aws:cdk:logicalId", @@ -375,6 +417,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-cdk-ecs-integration-test-stack" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/tree.json index 1964706e06499..f889b3cc02d4c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/ec2/integ.task-definition-placement-constraints.js.snapshot/tree.json @@ -1120,111 +1120,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1326,6 +1221,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-ecs-integration-test-stack/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1336,7 +1488,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1672,7 +1824,7 @@ "path": "aws-cdk-ecs-integration-test-stack/TaskDefinitionPlacementConstraints/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1740,7 +1892,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/ClusterNeuronAmiDefaultTestDeployAssert0A9C16F8.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/ClusterNeuronAmiDefaultTestDeployAssert0A9C16F8.assets.json index 70159af069343..da113eb403cd8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/ClusterNeuronAmiDefaultTestDeployAssert0A9C16F8.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/ClusterNeuronAmiDefaultTestDeployAssert0A9C16F8.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/integ-ecs-neuron-ami.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/integ-ecs-neuron-ami.assets.json index ac090feb99171..bd6ef5fa5dfc4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/integ-ecs-neuron-ami.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/integ-ecs-neuron-ami.assets.json @@ -1,7 +1,7 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "758add4abf782a712eea18984d2d3f66778882c56d0e19e18a2eb0a1c296430a": { + "ada3fb12583f98c77b90ef375638e77d94220241eee73fb022fd986ab285df00": { "source": { "path": "integ-ecs-neuron-ami.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "758add4abf782a712eea18984d2d3f66778882c56d0e19e18a2eb0a1c296430a.json", + "objectKey": "ada3fb12583f98c77b90ef375638e77d94220241eee73fb022fd986ab285df00.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/integ-ecs-neuron-ami.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/integ-ecs-neuron-ami.template.json index 72346678779af..8e2ea95ae81fb 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/integ-ecs-neuron-ami.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/integ-ecs-neuron-ami.template.json @@ -675,7 +675,71 @@ ] } }, - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": { + "ASGDrainECSHookFunction5F24CF4D": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "ClusterEB0386A7" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "integ-ecs-neuron-ami/ASG" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB" + ] + }, + "ASGDrainECSHookFunctionAllowInvokeintegecsneuronamiASGLifecycleHookDrainHookTopic1002D76741A20C61": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctionTopicD6FC59F7": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -689,7 +753,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -716,13 +796,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -736,7 +830,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -754,7 +864,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", "Roles": [ { "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" @@ -762,69 +872,38 @@ ] } }, - "ASGDrainECSHookFunction5F24CF4D": { - "Type": "AWS::Lambda::Function", + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "ClusterEB0386A7" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunctionServiceRoleC12963BB", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "Roles": [ { - "Key": "Name", - "Value": "integ-ecs-neuron-ami/ASG" + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "ASGDrainECSHookFunctionServiceRoleC12963BB" - ] - }, - "ASGDrainECSHookFunctionAllowInvokeintegecsneuronamiASGLifecycleHookDrainHookTopic1002D76741A20C61": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } - } - }, - "ASGDrainECSHookFunctionTopicD6FC59F7": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } + ] } }, "ASGLifecycleHookDrainHookTopicA8AD4ACB": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/integ.json index 85652ad95a5cb..259b38d98f50f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "ClusterNeuronAmi/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/manifest.json index b9e92d6e50311..95edb3d47b525 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "integ-ecs-neuron-ami.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/758add4abf782a712eea18984d2d3f66778882c56d0e19e18a2eb0a1c296430a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ada3fb12583f98c77b90ef375638e77d94220241eee73fb022fd986ab285df00.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/integ-ecs-neuron-ami/Cluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/integ-ecs-neuron-ami/Cluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -226,12 +232,6 @@ "data": "ASGDrainECSHookFunctionServiceRoleC12963BB" } ], - "/integ-ecs-neuron-ami/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27" - } - ], "/integ-ecs-neuron-ami/ASG/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -250,6 +250,36 @@ "data": "ASGDrainECSHookFunctionTopicD6FC59F7" } ], + "/integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3" + } + ], + "/integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01" + } + ], + "/integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2" + } + ], + "/integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B" + } + ], + "/integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B" + } + ], "/integ-ecs-neuron-ami/ASG/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -297,6 +327,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "integ-ecs-neuron-ami" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/tree.json index c83586da093a0..7238b49b6e4a5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-amazonlinux2-neuron-ami.js.snapshot/tree.json @@ -1088,111 +1088,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "integ-ecs-neuron-ami/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "integ-ecs-neuron-ami/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ASG46ED3070" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "roles": [ - { - "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1294,6 +1189,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ASG46ED3070" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-neuron-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1304,7 +1456,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1554,7 +1706,7 @@ "path": "ClusterNeuronAmi/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1600,7 +1752,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.assets.json index 1ada4a62eae05..63acc06154889 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.assets.json @@ -1,7 +1,7 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "25ecc9ee1f79cd8a912202279ab524c1d49216ee0be93a5179ef19f50cd1b1ba": { + "5db38c6b12b833d10c5cd43feb6894f1b0cbabb0f2bf2e05eb8d8e8374f6c835": { "source": { "path": "aws-ecs-integ-bottlerocket-nvidia-ami.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "25ecc9ee1f79cd8a912202279ab524c1d49216ee0be93a5179ef19f50cd1b1ba.json", + "objectKey": "5db38c6b12b833d10c5cd43feb6894f1b0cbabb0f2bf2e05eb8d8e8374f6c835.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.template.json index b393e63b3fec4..8dfd871ffea08 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/aws-ecs-integ-bottlerocket-nvidia-ami.template.json @@ -690,7 +690,71 @@ ] } }, - "ClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyBD9C646C": { + "ClusterbottlerocketasgDrainECSHookFunctionFEA27227": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "ClusterEB0386A7" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + ] + }, + "ClusterbottlerocketasgDrainECSHookFunctionAllowInvokeawsecsintegbottlerocketnvidiaamiClusterbottlerocketasgLifecycleHookDrainHookTopic46897984C264A0A5": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgDrainECSHookFunctionFEA27227", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" + } + } + }, + "ClusterbottlerocketasgDrainECSHookFunctionTopicC875173C": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ClusterbottlerocketasgDrainECSHookFunctionFEA27227", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" + } + } + }, + "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole05DFD3C41": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -704,7 +768,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole05DFD3C41", + "Roles": [ + { + "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + } + ] + } + }, + "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole1874CBCD0": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -731,13 +811,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole1874CBCD0", + "Roles": [ + { + "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + } + ] + } + }, + "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole26FBFE002": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -751,7 +845,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole26FBFE002", + "Roles": [ + { + "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + } + ] + } + }, + "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole3746338DC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -769,7 +879,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyBD9C646C", + "PolicyName": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole3746338DC", "Roles": [ { "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" @@ -777,69 +887,38 @@ ] } }, - "ClusterbottlerocketasgDrainECSHookFunctionFEA27227": { - "Type": "AWS::Lambda::Function", + "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole49EA5332E": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "ClusterEB0386A7" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole49EA5332E", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg" + "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyBD9C646C", - "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" - ] - }, - "ClusterbottlerocketasgDrainECSHookFunctionAllowInvokeawsecsintegbottlerocketnvidiaamiClusterbottlerocketasgLifecycleHookDrainHookTopic46897984C264A0A5": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ClusterbottlerocketasgDrainECSHookFunctionFEA27227", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" - } - } - }, - "ClusterbottlerocketasgDrainECSHookFunctionTopicC875173C": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "ClusterbottlerocketasgDrainECSHookFunctionFEA27227", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02" - } + ] } }, "ClusterbottlerocketasgLifecycleHookDrainHookTopic34DF3A02": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.assets.json index 6a67204f0bdff..d8523554d3fbc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/awsecsbottlerocketnvidiaamiDefaultTestDeployAssert682D6B79.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/integ.json index a6bfe4d8bc3ff..59e519682d0f9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "aws-ecs-bottlerocket-nvidia-ami/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/manifest.json index 28658ca520aa3..693f57404f294 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-bottlerocket-nvidia-ami.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/25ecc9ee1f79cd8a912202279ab524c1d49216ee0be93a5179ef19f50cd1b1ba.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5db38c6b12b833d10c5cd43feb6894f1b0cbabb0f2bf2e05eb8d8e8374f6c835.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -220,12 +220,6 @@ "data": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" } ], - "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyBD9C646C" - } - ], "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -244,6 +238,36 @@ "data": "ClusterbottlerocketasgDrainECSHookFunctionTopicC875173C" } ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole05DFD3C41" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole1874CBCD0" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole26FBFE002" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole3746338DC" + } + ], + "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole49EA5332E" + } + ], "/aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -285,6 +309,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "ClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyBD9C646C": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyBD9C646C", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-ecs-integ-bottlerocket-nvidia-ami" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/tree.json index 0f1c006667121..0dce8579c16b3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-bottlerocket-nvidia-ami.js.snapshot/tree.json @@ -1086,111 +1086,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ClusterbottlerocketasgASG5424825A" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "ClusterbottlerocketasgDrainECSHookFunctionServiceRoleDefaultPolicyBD9C646C", - "roles": [ - { - "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1292,6 +1187,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole05DFD3C41", + "roles": [ + { + "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ClusterbottlerocketasgASG5424825A" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole1874CBCD0", + "roles": [ + { + "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole26FBFE002", + "roles": [ + { + "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole3746338DC", + "roles": [ + { + "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-bottlerocket-nvidia-ami/Cluster/bottlerocket-asg/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterbottlerocketasgDrainECSHookFunctioninlinePolicyAddedToExecutionRole49EA5332E", + "roles": [ + { + "Ref": "ClusterbottlerocketasgDrainECSHookFunctionServiceRole91B0C3B3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1302,7 +1454,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1525,7 +1677,7 @@ "path": "aws-ecs-bottlerocket-nvidia-ami/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1571,7 +1723,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/ClusterImportedDefaultTestDeployAssert8B67C7A2.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/ClusterImportedDefaultTestDeployAssert8B67C7A2.assets.json index 8fe55b44f1cc2..58d1a0b58ba48 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/ClusterImportedDefaultTestDeployAssert8B67C7A2.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/ClusterImportedDefaultTestDeployAssert8B67C7A2.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/integ-ecs-imported-cluster.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/integ-ecs-imported-cluster.assets.json index 404971fd86604..8c26e36b73922 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/integ-ecs-imported-cluster.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/integ-ecs-imported-cluster.assets.json @@ -1,7 +1,7 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "e56132cf60edf65ae2879e26d8df65912906d3df363d16fc86d4a530d83a07df": { + "af532a887990b7f72c6eddf499cdad1a04e45b6a02659c3e9be876fc89cf2809": { "source": { "path": "integ-ecs-imported-cluster.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e56132cf60edf65ae2879e26d8df65912906d3df363d16fc86d4a530d83a07df.json", + "objectKey": "af532a887990b7f72c6eddf499cdad1a04e45b6a02659c3e9be876fc89cf2809.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/integ-ecs-imported-cluster.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/integ-ecs-imported-cluster.template.json index a399b594069ab..c9ecac101e5aa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/integ-ecs-imported-cluster.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/integ-ecs-imported-cluster.template.json @@ -675,7 +675,71 @@ ] } }, - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": { + "ASGDrainECSHookFunction5F24CF4D": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "ClusterEB0386A7" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "integ-ecs-imported-cluster/ASG" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB" + ] + }, + "ASGDrainECSHookFunctionAllowInvokeintegecsimportedclusterASGLifecycleHookDrainHookTopic78A11E12B2C7A898": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctionTopicD6FC59F7": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -689,7 +753,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -716,13 +796,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -736,7 +830,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -754,7 +864,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", "Roles": [ { "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" @@ -762,69 +872,38 @@ ] } }, - "ASGDrainECSHookFunction5F24CF4D": { - "Type": "AWS::Lambda::Function", + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "ClusterEB0386A7" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunctionServiceRoleC12963BB", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "Roles": [ { - "Key": "Name", - "Value": "integ-ecs-imported-cluster/ASG" + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "ASGDrainECSHookFunctionServiceRoleC12963BB" - ] - }, - "ASGDrainECSHookFunctionAllowInvokeintegecsimportedclusterASGLifecycleHookDrainHookTopic78A11E12B2C7A898": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } - } - }, - "ASGDrainECSHookFunctionTopicD6FC59F7": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } + ] } }, "ASGLifecycleHookDrainHookTopicA8AD4ACB": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/integ.json index 7d4c33ddbdfc2..7c4b58721d853 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "ClusterImported/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/manifest.json index 1a633d69895eb..0ff1e8e7903b6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "integ-ecs-imported-cluster.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e56132cf60edf65ae2879e26d8df65912906d3df363d16fc86d4a530d83a07df.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/af532a887990b7f72c6eddf499cdad1a04e45b6a02659c3e9be876fc89cf2809.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "VpcVPCGWBF912B6E" } ], + "/integ-ecs-imported-cluster/Cluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/integ-ecs-imported-cluster/Cluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -226,12 +232,6 @@ "data": "ASGDrainECSHookFunctionServiceRoleC12963BB" } ], - "/integ-ecs-imported-cluster/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27" - } - ], "/integ-ecs-imported-cluster/ASG/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -250,6 +250,36 @@ "data": "ASGDrainECSHookFunctionTopicD6FC59F7" } ], + "/integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3" + } + ], + "/integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01" + } + ], + "/integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2" + } + ], + "/integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B" + } + ], + "/integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B" + } + ], "/integ-ecs-imported-cluster/ASG/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -297,6 +327,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "integ-ecs-imported-cluster" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/tree.json index d252625617183..853312e9a006d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-imported.js.snapshot/tree.json @@ -31,8 +31,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -75,16 +75,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "integ-ecs-imported-cluster/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -105,8 +105,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -124,8 +124,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -144,8 +144,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -164,8 +164,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -192,14 +192,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -242,16 +242,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "integ-ecs-imported-cluster/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -272,8 +272,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -291,8 +291,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -311,8 +311,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -331,8 +331,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -359,14 +359,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -409,16 +409,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "integ-ecs-imported-cluster/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -439,8 +439,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -458,8 +458,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -478,14 +478,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -528,16 +528,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "integ-ecs-imported-cluster/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -558,8 +558,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -577,8 +577,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -597,14 +597,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -622,8 +622,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -641,14 +641,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "Cluster": { @@ -663,8 +663,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "Cluster": { @@ -685,14 +685,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnClusterCapacityProviderAssociations", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "ASG": { @@ -729,14 +729,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -747,8 +747,8 @@ "id": "ImportInstanceRole", "path": "integ-ecs-imported-cluster/ASG/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -778,8 +778,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -848,20 +848,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -878,16 +878,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "integ-ecs-imported-cluster/ASG/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -973,14 +973,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -1020,8 +1020,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1040,8 +1040,8 @@ "id": "ImportServiceRole", "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1085,119 +1085,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ASG46ED3070" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "roles": [ - { - "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1234,8 +1129,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:integecsimportedclusterASGLifecycleHookDrainHookTopic78A11E12": { @@ -1258,8 +1153,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1285,26 +1180,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ASG46ED3070" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-imported-cluster/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1330,14 +1482,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1348,8 +1500,8 @@ "id": "ImportRole", "path": "integ-ecs-imported-cluster/ASG/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1379,8 +1531,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1414,20 +1566,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1454,36 +1606,36 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "integ-ecs-imported-cluster/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "integ-ecs-imported-cluster/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "EC2CapacityProvider": { @@ -1509,44 +1661,44 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCapacityProvider", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.AsgCapacityProvider", + "version": "0.0.0" } }, "ImportedCluster": { "id": "ImportedCluster", "path": "integ-ecs-imported-cluster/ImportedCluster", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "integ-ecs-imported-cluster/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "integ-ecs-imported-cluster/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "ClusterImported": { @@ -1562,7 +1714,7 @@ "path": "ClusterImported/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1573,22 +1725,22 @@ "id": "BootstrapVersion", "path": "ClusterImported/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "ClusterImported/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } } }, @@ -1608,13 +1760,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/ClusterWindowsServerDefaultTestDeployAssertC6412DEB.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/ClusterWindowsServerDefaultTestDeployAssertC6412DEB.assets.json index bc28a7a417c47..681631effcb3a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/ClusterWindowsServerDefaultTestDeployAssertC6412DEB.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/ClusterWindowsServerDefaultTestDeployAssertC6412DEB.assets.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/__entrypoint__.js similarity index 98% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/__entrypoint__.js index 02033f55cf612..ff3a517fba12d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/__entrypoint__.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/__entrypoint__.js @@ -1,6 +1,8 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.withRetries = exports.handler = exports.external = void 0; +exports.external = void 0; +exports.handler = handler; +exports.withRetries = withRetries; const https = require("https"); const url = require("url"); // for unit tests @@ -60,7 +62,6 @@ async function handler(event, context) { await submitResponse('FAILED', resp); } } -exports.handler = handler; function renderResponse(cfnRequest, handlerResponse = {}) { // if physical ID is not returned, we have some defaults for you based // on the request type. @@ -149,7 +150,6 @@ function withRetries(options, fn) { } }; } -exports.withRetries = withRetries; async function sleep(ms) { return new Promise((ok) => setTimeout(ok, ms)); } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/index.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c/index.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/cdk.out index c6e612584e352..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"38.0.1"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/integ-ecs-windows-server-ami.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/integ-ecs-windows-server-ami.assets.json index ea6275dec580d..773ac603596b3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/integ-ecs-windows-server-ami.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/integ-ecs-windows-server-ami.assets.json @@ -1,20 +1,20 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { - "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1": { + "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c": { "source": { - "path": "asset.bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1", + "path": "asset.a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1.zip", + "objectKey": "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "c31c6711a6c4b6578da59ee8e3765dc91e85ffc61e7dadb3ee6606d9a662313b": { + "b9628d4def3cc835164f5b1eaff295ac7378dae07553617fe471c58a13ffb7ba": { "source": { "path": "integ-ecs-windows-server-ami.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c31c6711a6c4b6578da59ee8e3765dc91e85ffc61e7dadb3ee6606d9a662313b.json", + "objectKey": "b9628d4def3cc835164f5b1eaff295ac7378dae07553617fe471c58a13ffb7ba.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/integ-ecs-windows-server-ami.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/integ-ecs-windows-server-ami.template.json index cee09686f959e..77be1ef16747f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/integ-ecs-windows-server-ami.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/integ-ecs-windows-server-ami.template.json @@ -312,7 +312,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "bde7b5c89cb43285f884c94f0b9e17cdb0f5eb5345005114dd60342e0b8a85a1.zip" + "S3Key": "a1acfc2b5f4f6b183fd2bb9863f486bc5edef6a357b355a070d9a0e502df418c.zip" }, "Timeout": 900, "MemorySize": 128, @@ -645,7 +645,71 @@ ] } }, - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": { + "ASGDrainECSHookFunction5F24CF4D": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "ClusterEB0386A7" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "integ-ecs-windows-server-ami/ASG" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB" + ] + }, + "ASGDrainECSHookFunctionAllowInvokeintegecswindowsserveramiASGLifecycleHookDrainHookTopic7F7CFC5B4460B642": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctionTopicD6FC59F7": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -659,7 +723,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -686,13 +766,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -706,7 +800,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -724,7 +834,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", "Roles": [ { "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" @@ -732,69 +842,38 @@ ] } }, - "ASGDrainECSHookFunction5F24CF4D": { - "Type": "AWS::Lambda::Function", + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "ClusterEB0386A7" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunctionServiceRoleC12963BB", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "Roles": [ { - "Key": "Name", - "Value": "integ-ecs-windows-server-ami/ASG" + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "ASGDrainECSHookFunctionServiceRoleC12963BB" - ] - }, - "ASGDrainECSHookFunctionAllowInvokeintegecswindowsserveramiASGLifecycleHookDrainHookTopic7F7CFC5B4460B642": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } - } - }, - "ASGDrainECSHookFunctionTopicD6FC59F7": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } + ] } }, "ASGLifecycleHookDrainHookTopicA8AD4ACB": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/integ.json index 9cb8aa4b91cfc..070b2811851a2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "testCases": { "ClusterWindowsServer/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/manifest.json index ff635a517e7ac..ecc7c92829e06 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "artifacts": { "integ-ecs-windows-server-ami.assets": { "type": "cdk:asset-manifest", @@ -16,10 +16,9 @@ "templateFile": "integ-ecs-windows-server-ami.template.json", "terminationProtection": false, "validateOnSynth": false, - "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c31c6711a6c4b6578da59ee8e3765dc91e85ffc61e7dadb3ee6606d9a662313b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b9628d4def3cc835164f5b1eaff295ac7378dae07553617fe471c58a13ffb7ba.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -143,6 +142,12 @@ "data": "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E" } ], + "/integ-ecs-windows-server-ami/Cluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container accessing instance role is not supported. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]" + } + ], "/integ-ecs-windows-server-ami/Cluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -197,12 +202,6 @@ "data": "ASGDrainECSHookFunctionServiceRoleC12963BB" } ], - "/integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27" - } - ], "/integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -221,6 +220,36 @@ "data": "ASGDrainECSHookFunctionTopicD6FC59F7" } ], + "/integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3" + } + ], + "/integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01" + } + ], + "/integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2" + } + ], + "/integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B" + } + ], + "/integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B" + } + ], "/integ-ecs-windows-server-ami/ASG/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -269,6 +298,12 @@ "data": "TaskDef54694570" } ], + "/integ-ecs-windows-server-ami/EC2Service": [ + { + "type": "aws:cdk:warning", + "data": "minHealthyPercent has not been configured so the default value of 50% is used. The number of running tasks will decrease below the desired count during deployments etc. See https://github.com/aws/aws-cdk/issues/31705 [ack: @aws-cdk/aws-ecs:minHealthyPercent]" + } + ], "/integ-ecs-windows-server-ami/EC2Service/Service": [ { "type": "aws:cdk:logicalId", @@ -286,6 +321,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "integ-ecs-windows-server-ami" @@ -305,7 +349,6 @@ "templateFile": "ClusterWindowsServerDefaultTestDeployAssertC6412DEB.template.json", "terminationProtection": false, "validateOnSynth": false, - "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/tree.json index 7cb1f9a7a53e8..7d59501c545b3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster-windows-server-ami.js.snapshot/tree.json @@ -883,111 +883,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ASG46ED3070" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "roles": [ - { - "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1089,6 +984,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ASG46ED3070" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-windows-server-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1099,7 +1251,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1479,7 +1631,7 @@ "path": "ClusterWindowsServer/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1525,7 +1677,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/ClusterAL2023DefaultTestDeployAssert19111415.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/ClusterAL2023DefaultTestDeployAssert19111415.assets.json index ee34f51b00bf4..30c2d7aa9fbd2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/ClusterAL2023DefaultTestDeployAssert19111415.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/ClusterAL2023DefaultTestDeployAssert19111415.assets.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/cdk.out index c6e612584e352..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"38.0.1"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/integ-ecs-al2023-ami.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/integ-ecs-al2023-ami.assets.json index dc91f134d9af6..ad373115f015a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/integ-ecs-al2023-ami.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/integ-ecs-al2023-ami.assets.json @@ -1,7 +1,7 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { - "f875639342074982d90d3f026dd2a665ec32849787c8c2fee81f9a8dd2f1f58d": { + "d56f8fe448f215c1687a38c41c44d166decae81a13e79827ee268f23252885c9": { "source": { "path": "integ-ecs-al2023-ami.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f875639342074982d90d3f026dd2a665ec32849787c8c2fee81f9a8dd2f1f58d.json", + "objectKey": "d56f8fe448f215c1687a38c41c44d166decae81a13e79827ee268f23252885c9.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/integ-ecs-al2023-ami.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/integ-ecs-al2023-ami.template.json index 13f9ef83aa094..2856dff16fdde 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/integ-ecs-al2023-ami.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/integ-ecs-al2023-ami.template.json @@ -537,7 +537,71 @@ ] } }, - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": { + "ASGDrainECSHookFunction5F24CF4D": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "ClusterEB0386A7" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "integ-ecs-al2023-ami/ASG" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "ASGDrainECSHookFunctionServiceRoleC12963BB" + ] + }, + "ASGDrainECSHookFunctionAllowInvokeintegecsal2023amiASGLifecycleHookDrainHookTopic083F299FF8F99189": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctionTopicD6FC59F7": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "ASGDrainECSHookFunction5F24CF4D", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" + } + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -551,7 +615,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -578,13 +658,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -598,7 +692,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "Roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -616,7 +726,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", "Roles": [ { "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" @@ -624,69 +734,38 @@ ] } }, - "ASGDrainECSHookFunction5F24CF4D": { - "Type": "AWS::Lambda::Function", + "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "ClusterEB0386A7" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunctionServiceRoleC12963BB", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "Roles": [ { - "Key": "Name", - "Value": "integ-ecs-al2023-ami/ASG" + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "ASGDrainECSHookFunctionServiceRoleC12963BB" - ] - }, - "ASGDrainECSHookFunctionAllowInvokeintegecsal2023amiASGLifecycleHookDrainHookTopic083F299FF8F99189": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } - } - }, - "ASGDrainECSHookFunctionTopicD6FC59F7": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "ASGDrainECSHookFunction5F24CF4D", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "ASGLifecycleHookDrainHookTopicA8AD4ACB" - } + ] } }, "ASGLifecycleHookDrainHookTopicA8AD4ACB": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/integ.json index 483e48bdbbc38..5bc611872c2c9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "testCases": { "ClusterAL2023/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/manifest.json index 175636b354cc9..7ba364c4b421a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "artifacts": { "integ-ecs-al2023-ami.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f875639342074982d90d3f026dd2a665ec32849787c8c2fee81f9a8dd2f1f58d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d56f8fe448f215c1687a38c41c44d166decae81a13e79827ee268f23252885c9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -166,12 +166,6 @@ "data": "ASGDrainECSHookFunctionServiceRoleC12963BB" } ], - "/integ-ecs-al2023-ami/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27" - } - ], "/integ-ecs-al2023-ami/ASG/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -190,6 +184,36 @@ "data": "ASGDrainECSHookFunctionTopicD6FC59F7" } ], + "/integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3" + } + ], + "/integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01" + } + ], + "/integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2" + } + ], + "/integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B" + } + ], + "/integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B" + } + ], "/integ-ecs-al2023-ami/ASG/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -237,6 +261,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27": [ + { + "type": "aws:cdk:logicalId", + "data": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "integ-ecs-al2023-ami" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/tree.json index 7da3a829f5650..7c9b8620b817b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ecs/test/integ.cluster.amazonlinux2023-ami.js.snapshot/tree.json @@ -833,111 +833,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "integ-ecs-al2023-ami/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "integ-ecs-al2023-ami/ASG/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "ASG46ED3070" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "ClusterEB0386A7", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "ASGDrainECSHookFunctionServiceRoleDefaultPolicy16848A27", - "roles": [ - { - "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1039,6 +934,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole00371FEB3", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "ASG46ED3070" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole17E852E01", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole22C962AF2", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole3E4846C2B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-ecs-al2023-ami/ASG/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "ClusterEB0386A7", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ASGDrainECSHookFunctioninlinePolicyAddedToExecutionRole48434A97B", + "roles": [ + { + "Ref": "ASGDrainECSHookFunctionServiceRoleC12963BB" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/asset.2cac8fc73da9ed6d5a3bf770a8dcae5fcf36d1816d0a6de8e240db920411ae4d/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/asset.2cac8fc73da9ed6d5a3bf770a8dcae5fcf36d1816d0a6de8e240db920411ae4d/index.js index 517ad97d626ba..2c8c50b9ec5bc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/asset.2cac8fc73da9ed6d5a3bf770a8dcae5fcf36d1816d0a6de8e240db920411ae4d/index.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/asset.2cac8fc73da9ed6d5a3bf770a8dcae5fcf36d1816d0a6de8e240db920411ae4d/index.js @@ -1 +1 @@ -"use strict";var K=Object.create;var f=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var s=(i,e)=>()=>(i&&(e=i(i=0)),e);var u=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),o=(i,e)=>{for(var a in e)f(i,a,{get:e[a],enumerable:!0})},w=(i,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of R(e))!W.call(i,t)&&t!==a&&f(i,t,{get:()=>e[t],enumerable:!(r=Y(e,t))||r.enumerable});return i};var J=(i,e,a)=>(a=i!=null?K(M(i)):{},w(e||!i||!i.__esModule?f(a,"default",{value:i,enumerable:!0}):a,i)),c=i=>w(f({},"__esModule",{value:!0}),i);var N,p,U=s(()=>{"use strict";N=J(require("zlib")),p=()=>{let e=JSON.parse(N.brotliDecompressSync(Buffer.from("WwTvNRth5aS3wrMDte4UUjGpf58zaoly20sA3YFARNYeg5Tq6bgxBhJcWuvmFN8uDiWSsZWGl5gGXZ36WmpsHBsvRthrgqs8/kcaDLUxMcJeE4x6tenG38HElMLrANt1QBhS0sjELM0hz9rqMl+n/LSz329lG4V9gB5ukWQIKRYdX3//MKV54rY9XyFBkRCPmLCbIguRYLFe1fyqd1GFXF5wkEPSOfwSwJIwnxbD/TNLiXfXNLPrXWVSdHySsEBiWJB96fj0ZGSsAL6beIOt33hBYr36alWfoot8n5qSbIexFPFE2vfplsSI3CeQg2AXcnBYcEtdqPyNVaql/iMQ5N0vQJ4zQaxMCqIzCY+Sz6Lf7tmFDobUgc834Jl6UsaZ5Rvvk1Q+SHP53/e9aV/DvP7e4QUEh9w9KAU/U6H/03Jck0E+PID6bFwdSYUqQqL9yTRw1jpnm/wB71kRgMOSgLtbiRRpFlJkmJUismnPPvvc9+5rnELjpAC4K4KiZL+iyyZ+VhdWs97mZTUc1HgGuOubUdUqcqT6NSv4/1f3b21AsYe4q2VZQeqK+Gz5huiHqZ1ZveAFeQC7gX/z5MqgEtRy8rIh/N4FaObbdTicsA0KbZpMe7TLM55dQ0qjGXS+7F2edaKf8JJSIcQm3e3la/WVd3P3hL83BqyQjARC6r1b9qK9c699b0vi5PMsCcCAMcYgJLrNn8ofHW+EpP0skjzwxnjK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Z8uPnJ/6Bxxa5kkQ3z1iHOM0Ckf4eLc5YU4kkE0qKyG9iY8J9nFsdW/gXvlPMK0qjvF+NzVRY1AyF04wUt4WC4Q8zTjntUgg261MPsQJaVClqv/ZWvBwGB1fxVKScSL/010AvDl//alhAS7iS2FvycMw/3OWX36Xr8nwVTb5XZceudtAPDuV3UDmyITkLwnnoWu7cgk2HKq4jzdOinQPNik6l9BvexeuNIv6KKhexaUou9gGkzAgN/Y5pIJnSPqIBIogpcgPlR6bggk6zCr4qRJtyERu56JEA19whA4GLPcG4X3/J4n8HEMGhhlT2D7CNzAlm/JfZN4tnhnZj6OtCAdX2Onvxtd2WR6kPYF77WWutDXYAMF7j7N2YOLpDqm2oIrpSmjJ29EijTpy0MZFEo9Avjo++AHh1WwNYMSDBqkp30T7I3+oDK/WMJDa9OPeLpO/j749+jTfXDPTN+Vz3dJAnD6K/Q7VEx+itVCYHadAK8x896G0moCbk3kEAYw3cap8DIpII7xdWozsWqFl3ahiYBPHvMLIgdf/EY9uR1yDS3yiMAbu4iRXYasn49rFMZlAK5Ag+6KsBLJl4lNAHWMy2OhmuRod+kyzBe3j/pQilv09PpokoQjXIEntTpGqILAzmOwQe83jNUnY1Uvj+InKbJl9efKWK5r+saZ33ttJQDaLSFiUopBSMkOSI/oCYFR/M9Mgg4WQeli/OvB31Zjg3eTisZRg0BNXBX+o+ch1EHtb/pTKY99/vcJ7fMiX0eBkIwrSPiP1sbZbxQ0u0zwBD3C50PdJYOz5k4=","base64")).toString());return p=()=>e,e}});var z={};o(z,{Coercer:()=>d,coerceApiParameters:()=>g});function g(i,e,a={}){let r=p();return new d(r).coerceApiParameters(i,e,a)}function E(i){return i instanceof Uint8Array?i:typeof i=="string"||typeof i=="number"?new TextEncoder().encode(i.toString()):i}function Q(i){if(typeof i=="number")return i;if(typeof i=="string"){let e=Number(i);return isNaN(e)?i:e}return i}function L(i){if(typeof i=="string"||typeof i=="number"){let e=new Date(i);return isNaN(e.getTime())?i:e}return i}var d,P=s(()=>{"use strict";U();d=class{constructor(e){this.typeMachine=e}coerceApiParameters(e,a,r={}){let t=this.progress(a.toLowerCase(),this.progress(e.toLowerCase(),0));return this.recurse(r,t)}testCoerce(e){return this.recurse(e,0)}recurse(e,a){switch(a){case void 0:return e;case"b":return E(e);case"n":return Q(e);case"d":return L(e)}if(Array.isArray(e)){let r=this.progress("*",a);return r!==void 0?e.map(t=>this.recurse(t,r)):e}if(e&&typeof e=="object"){let r=this.progress("*",a);for(let t of Object.keys(e)){let m=this.progress(t,a)??r;m!==void 0&&(e[t]=this.recurse(e[t],m))}return e}return e}progress(e,a){if(!(a===void 0||typeof a!="number"))return this.typeMachine[a][e]}}});var S={};o(S,{findV3ClientConstructor:()=>x});function x(i){let[e,a]=Object.entries(i).find(([r])=>r.endsWith("Client")&&r!=="__Client");return a}var k=s(()=>{"use strict"});var T=u((ce,V)=>{V.exports={acmpca:"acm-pca",apigateway:"api-gateway",arczonalshift:"arc-zonal-shift",alexaforbusiness:"alexa-for-business",appmesh:"app-mesh",applicationautoscaling:"application-auto-scaling",applicationinsights:"application-insights",augmentedairuntime:"sage-maker-a2iruntime",autoscaling:"auto-scaling",autoscalingplans:"auto-scaling-plans",backupgateway:"backup-gateway",bedrockruntime:"bedrock-runtime",cur:"cost-and-usage-report-service",chimesdkidentity:"chime-sdk-identity",chimesdkmediapipelines:"chime-sdk-media-pipelines",chimesdkmeetings:"chime-sdk-meetings",chimesdkmessaging:"chime-sdk-messaging",chimesdkvoice:"chime-sdk-voice",cloudhsmv2:"cloudhsm-v2",cloudsearchdomain:"cloudsearch-domain",cloudtraildata:"cloudtrail-data",cloudwatchevents:"cloudwatch-events",cloudwatchlogs:"cloudwatch-logs",codegurureviewer:"codeguru-reviewer",codegurusecurity:"codeguru-security",codestarnotifications:"codestar-notifications",codestarconnections:"codestar-connections",cognitoidentity:"cognito-identity",cognitoidentityserviceprovider:"cognito-identity-provider",cognitosync:"cognito-sync",computeoptimizer:"compute-optimizer",configservice:"config-service",connectcontactlens:"connect-contact-lens",costexplorer:"cost-explorer",customerprofiles:"customer-profiles",dms:"database-migration-service",datapipeline:"data-pipeline",devopsguru:"devops-guru",devicefarm:"device-farm",directconnect:"direct-connect",directoryservice:"directory-service",discovery:"application-discovery-service",docdbelastic:"docdb-elastic",dynamodbstreams:"dynamodb-streams",ec2instanceconnect:"ec2-instance-connect",ecrpublic:"ecr-public",elb:"elastic-load-balancing",elbv2:"elastic-load-balancing-v2",emrserverless:"emr-serverless",emrcontainers:"emr-containers",es:"elasticsearch-service",elasticbeanstalk:"elastic-beanstalk",elasticinference:"elastic-inference",elastictranscoder:"elastic-transcoder",finspacedata:"finspace-data",forecastqueryservice:"forecastquery",forecastservice:"forecast",globalaccelerator:"global-accelerator",iot1clickdevicesservice:"iot-1click-devices-service",iot1clickprojects:"iot-1click-projects",iotevents:"iot-events",ioteventsdata:"iot-events-data",iotjobsdataplane:"iot-jobs-data-plane",iotroborunner:"iot-roborunner",iotwireless:"iot-wireless",iotdata:"iot-data-plane",ivsrealtime:"ivs-realtime",kendraranking:"kendra-ranking",kinesisanalytics:"kinesis-analytics",kinesisanalyticsv2:"kinesis-analytics-v2",kinesisvideo:"kinesis-video",kinesisvideoarchivedmedia:"kinesis-video-archived-media",kinesisvideomedia:"kinesis-video-media",kinesisvideosignalingchannels:"kinesis-video-signaling",kinesisvideowebrtcstorage:"kinesis-video-webrtc-storage",launchwizard:"launch-wizard",lexmodelbuildingservice:"lex-model-building-service",lexmodelsv2:"lex-models-v2",lexruntime:"lex-runtime-service",lexruntimev2:"lex-runtime-v2",licensemanager:"license-manager",licensemanagerlinuxsubscriptions:"license-manager-linux-subscriptions",licensemanagerusersubscriptions:"license-manager-user-subscriptions",machinelearning:"machine-learning",managedblockchainquery:"managedblockchain-query",marketplacecatalog:"marketplace-catalog",marketplacecommerceanalytics:"marketplace-commerce-analytics",marketplaceentitlementservice:"marketplace-entitlement-service",marketplacemetering:"marketplace-metering",mediapackagevod:"mediapackage-vod",mediastoredata:"mediastore-data",medicalimaging:"medical-imaging",memorydb:"memory-db",migrationhub:"migration-hub",migrationhubconfig:"migrationhub-config",migrationhubrefactorspaces:"migration-hub-refactor-spaces",networkfirewall:"network-firewall",paymentcryptography:"payment-cryptography",paymentcryptographydata:"payment-cryptography-data",pcaconnectorad:"pca-connector-ad",personalizeevents:"personalize-events",personalizeruntime:"personalize-runtime",pinpointemail:"pinpoint-email",pinpointsmsvoice:"pinpoint-sms-voice",pinpointsmsvoicev2:"pinpoint-sms-voice-v2",qldbsession:"qldb-session",rdsdataservice:"rds-data",redshiftdata:"redshift-data",redshiftserverless:"redshift-serverless",resourceexplorer2:"resource-explorer-2",resourcegroups:"resource-groups",resourcegroupstaggingapi:"resource-groups-tagging-api",route53:"route-53",route53domains:"route-53-domains",route53recoverycluster:"route53-recovery-cluster",route53recoverycontrolconfig:"route53-recovery-control-config",route53recoveryreadiness:"route53-recovery-readiness",s3control:"s3-control",ssmcontacts:"ssm-contacts",ssmincidents:"ssm-incidents",ssoadmin:"sso-admin",ssooidc:"sso-oidc",sagemakerfeaturestoreruntime:"sagemaker-featurestore-runtime",sagemakergeospatial:"sagemaker-geospatial",sagemakermetrics:"sagemaker-metrics",sagemakerruntime:"sagemaker-runtime",sagemakeredge:"sagemaker-edge",secretsmanager:"secrets-manager",servicecatalog:"service-catalog",servicecatalogappregistry:"service-catalog-appregistry",servicequotas:"service-quotas",snowdevicemanagement:"snow-device-management",ssmsap:"ssm-sap",stepfunctions:"sfn",storagegateway:"storage-gateway",supportapp:"support-app",timestreamquery:"timestream-query",timestreamwrite:"timestream-write",transcribeservice:"transcribe",voiceid:"voice-id",vpclattice:"vpc-lattice",wafregional:"waf-regional",workspacesweb:"workspaces-web"}});var A=u((me,I)=>{I.exports={accessanalyzer:{iamPrefix:"access-analyzer"},account:{iamPrefix:"account"},"acm-pca":{iamPrefix:"acm-pca"},acm:{iamPrefix:"acm"},"alexa-for-business":{iamPrefix:"a4b"},amp:{iamPrefix:"aps"},amplify:{iamPrefix:"amplify"},amplifybackend:{iamPrefix:"amplifybackend"},amplifyuibuilder:{iamPrefix:"amplifyuibuilder"},"api-gateway":{iamPrefix:"apigateway"},apigatewaymanagementapi:{iamPrefix:"execute-api"},apigatewayv2:{iamPrefix:"apigateway"},"app-mesh":{iamPrefix:"appmesh"},appconfig:{iamPrefix:"appconfig"},appconfigdata:{iamPrefix:"appconfig"},appfabric:{iamPrefix:"appfabric"},appflow:{iamPrefix:"appflow"},appintegrations:{iamPrefix:"app-integrations"},"application-auto-scaling":{iamPrefix:"application-autoscaling"},"application-discovery-service":{iamPrefix:"discovery"},"application-insights":{iamPrefix:"applicationinsights"},applicationcostprofiler:{iamPrefix:"application-cost-profiler"},apprunner:{iamPrefix:"apprunner"},appstream:{iamPrefix:"appstream"},appsync:{iamPrefix:"appsync"},"arc-zonal-shift":{iamPrefix:"arc-zonal-shift"},athena:{iamPrefix:"athena"},auditmanager:{iamPrefix:"auditmanager"},"auto-scaling-plans":{iamPrefix:"autoscaling-plans"},"auto-scaling":{iamPrefix:"autoscaling"},b2bi:{iamPrefix:"b2bi"},"backup-gateway":{iamPrefix:"backup-gateway"},backup:{iamPrefix:"backup"},backupstorage:{iamPrefix:"backup-storage"},batch:{iamPrefix:"batch"},"bcm-data-exports":{iamPrefix:"bcm-data-exports"},"bedrock-agent-runtime":{iamPrefix:"bedrock"},"bedrock-agent":{iamPrefix:"bedrock"},"bedrock-runtime":{iamPrefix:"bedrock"},bedrock:{iamPrefix:"bedrock"},billingconductor:{iamPrefix:"billingconductor"},braket:{iamPrefix:"braket"},budgets:{iamPrefix:"budgets"},"chime-sdk-identity":{iamPrefix:"chime"},"chime-sdk-media-pipelines":{iamPrefix:"chime"},"chime-sdk-meetings":{iamPrefix:"chime"},"chime-sdk-messaging":{iamPrefix:"chime"},"chime-sdk-voice":{iamPrefix:"chime"},chime:{iamPrefix:"chime"},cleanrooms:{iamPrefix:"cleanrooms"},cleanroomsml:{iamPrefix:"cleanrooms-ml"},cloud9:{iamPrefix:"cloud9"},cloudcontrol:{iamPrefix:"cloudcontrolapi"},clouddirectory:{iamPrefix:"clouddirectory"},cloudformation:{iamPrefix:"cloudformation"},"cloudfront-keyvaluestore":{iamPrefix:"cloudfront-keyvaluestore"},cloudfront:{iamPrefix:"cloudfront"},"cloudhsm-v2":{iamPrefix:"cloudhsm"},cloudhsm:{iamPrefix:"cloudhsm"},"cloudsearch-domain":{iamPrefix:"cloudsearch"},cloudsearch:{iamPrefix:"cloudsearch"},"cloudtrail-data":{iamPrefix:"cloudtrail-data"},cloudtrail:{iamPrefix:"cloudtrail"},"cloudwatch-events":{iamPrefix:"events"},"cloudwatch-logs":{iamPrefix:"logs"},cloudwatch:{iamPrefix:"monitoring"},codeartifact:{iamPrefix:"codeartifact"},codebuild:{iamPrefix:"codebuild"},codecatalyst:{},codecommit:{iamPrefix:"codecommit"},codedeploy:{iamPrefix:"codedeploy"},"codeguru-reviewer":{iamPrefix:"codeguru-reviewer"},"codeguru-security":{iamPrefix:"codeguru-security"},codeguruprofiler:{iamPrefix:"codeguru-profiler"},codepipeline:{iamPrefix:"codepipeline"},"codestar-connections":{iamPrefix:"codestar-connections"},"codestar-notifications":{iamPrefix:"codestar-notifications"},codestar:{iamPrefix:"codestar"},"cognito-identity-provider":{iamPrefix:"cognito-idp"},"cognito-identity":{iamPrefix:"cognito-identity"},"cognito-sync":{iamPrefix:"cognito-sync"},comprehend:{iamPrefix:"comprehend"},comprehendmedical:{iamPrefix:"comprehendmedical"},"compute-optimizer":{iamPrefix:"compute-optimizer"},"config-service":{iamPrefix:"config"},"connect-contact-lens":{iamPrefix:"connect"},connect:{iamPrefix:"connect"},connectcampaigns:{iamPrefix:"connect-campaigns"},connectcases:{iamPrefix:"cases"},connectparticipant:{iamPrefix:"execute-api"},controltower:{iamPrefix:"controltower"},"cost-and-usage-report-service":{iamPrefix:"cur"},"cost-explorer":{iamPrefix:"ce"},"cost-optimization-hub":{iamPrefix:"cost-optimization-hub"},"customer-profiles":{iamPrefix:"profile"},"data-pipeline":{iamPrefix:"datapipeline"},"database-migration-service":{iamPrefix:"dms"},databrew:{iamPrefix:"databrew"},dataexchange:{iamPrefix:"dataexchange"},datasync:{iamPrefix:"datasync"},datazone:{iamPrefix:"datazone"},dax:{iamPrefix:"dax"},detective:{iamPrefix:"detective"},"device-farm":{iamPrefix:"devicefarm"},"devops-guru":{iamPrefix:"devops-guru"},"direct-connect":{iamPrefix:"directconnect"},"directory-service":{iamPrefix:"ds"},dlm:{iamPrefix:"dlm"},"docdb-elastic":{iamPrefix:"docdb-elastic"},docdb:{iamPrefix:"rds"},drs:{iamPrefix:"drs"},"dynamodb-streams":{iamPrefix:"dynamodb"},dynamodb:{iamPrefix:"dynamodb"},ebs:{iamPrefix:"ebs"},"ec2-instance-connect":{iamPrefix:"ec2-instance-connect"},ec2:{iamPrefix:"ec2"},"ecr-public":{iamPrefix:"ecr-public"},ecr:{iamPrefix:"ecr"},ecs:{iamPrefix:"ecs",commands:["ExecuteCommand"]},efs:{iamPrefix:"elasticfilesystem"},"eks-auth":{iamPrefix:"eks-auth"},eks:{iamPrefix:"eks"},"elastic-beanstalk":{iamPrefix:"elasticbeanstalk"},"elastic-inference":{iamPrefix:"elastic-inference"},"elastic-load-balancing-v2":{iamPrefix:"elasticloadbalancing"},"elastic-load-balancing":{iamPrefix:"elasticloadbalancing"},"elastic-transcoder":{iamPrefix:"elastictranscoder"},elasticache:{iamPrefix:"elasticache"},"elasticsearch-service":{iamPrefix:"es"},"emr-containers":{iamPrefix:"emr-containers"},"emr-serverless":{iamPrefix:"emr-serverless"},emr:{iamPrefix:"elasticmapreduce"},entityresolution:{iamPrefix:"entityresolution"},eventbridge:{iamPrefix:"events"},evidently:{iamPrefix:"evidently"},"finspace-data":{iamPrefix:"finspace-api"},finspace:{iamPrefix:"finspace"},firehose:{iamPrefix:"firehose"},fis:{iamPrefix:"fis"},fms:{iamPrefix:"fms"},forecast:{iamPrefix:"forecast"},forecastquery:{iamPrefix:"forecast"},frauddetector:{iamPrefix:"frauddetector"},freetier:{iamPrefix:"freetier"},fsx:{iamPrefix:"fsx"},gamelift:{iamPrefix:"gamelift"},glacier:{iamPrefix:"glacier"},"global-accelerator":{iamPrefix:"globalaccelerator"},glue:{iamPrefix:"glue"},grafana:{iamPrefix:"grafana"},greengrass:{iamPrefix:"greengrass"},greengrassv2:{iamPrefix:"greengrass"},groundstation:{iamPrefix:"groundstation"},guardduty:{iamPrefix:"guardduty"},health:{iamPrefix:"health"},healthlake:{iamPrefix:"healthlake"},honeycode:{iamPrefix:"honeycode"},iam:{iamPrefix:"iam"},identitystore:{iamPrefix:"identitystore"},imagebuilder:{iamPrefix:"imagebuilder"},"inspector-scan":{iamPrefix:"inspector-scan"},inspector:{iamPrefix:"inspector"},inspector2:{iamPrefix:"inspector2"},internetmonitor:{iamPrefix:"internetmonitor"},"iot-1click-devices-service":{iamPrefix:"iot1click"},"iot-1click-projects":{iamPrefix:"iot1click"},"iot-data-plane":{iamPrefix:"iotdata"},"iot-events-data":{iamPrefix:"ioteventsdata"},"iot-events":{iamPrefix:"iotevents"},"iot-jobs-data-plane":{iamPrefix:"iot-jobs-data"},"iot-roborunner":{iamPrefix:"iotroborunner"},"iot-wireless":{iamPrefix:"iotwireless"},iot:{iamPrefix:"iot"},iotanalytics:{iamPrefix:"iotanalytics"},iotdeviceadvisor:{iamPrefix:"iotdeviceadvisor"},iotfleethub:{iamPrefix:"iotfleethub"},iotfleetwise:{iamPrefix:"iotfleetwise"},iotsecuretunneling:{iamPrefix:"IoTSecuredTunneling"},iotsitewise:{iamPrefix:"iotsitewise"},iotthingsgraph:{iamPrefix:"iotthingsgraph"},iottwinmaker:{iamPrefix:"iottwinmaker"},"ivs-realtime":{iamPrefix:"ivs"},ivs:{iamPrefix:"ivs"},ivschat:{iamPrefix:"ivschat"},kafka:{iamPrefix:"kafka"},kafkaconnect:{iamPrefix:"kafkaconnect"},"kendra-ranking":{iamPrefix:"kendra-ranking"},kendra:{iamPrefix:"kendra"},keyspaces:{iamPrefix:"cassandra"},"kinesis-analytics-v2":{iamPrefix:"kinesisanalytics"},"kinesis-analytics":{iamPrefix:"kinesisanalytics"},"kinesis-video-archived-media":{iamPrefix:"kinesisvideo"},"kinesis-video-media":{iamPrefix:"kinesisvideo"},"kinesis-video-signaling":{iamPrefix:"kinesisvideo"},"kinesis-video-webrtc-storage":{iamPrefix:"kinesisvideo"},"kinesis-video":{iamPrefix:"kinesisvideo"},kinesis:{iamPrefix:"kinesis"},kms:{iamPrefix:"kms"},lakeformation:{iamPrefix:"lakeformation"},lambda:{iamPrefix:"lambda"},"launch-wizard":{iamPrefix:"launchwizard"},"lex-model-building-service":{iamPrefix:"lex"},"lex-models-v2":{iamPrefix:"lex"},"lex-runtime-service":{iamPrefix:"lex"},"lex-runtime-v2":{iamPrefix:"lex"},"license-manager-linux-subscriptions":{iamPrefix:"license-manager-linux-subscriptions"},"license-manager-user-subscriptions":{iamPrefix:"license-manager-user-subscriptions"},"license-manager":{iamPrefix:"license-manager"},lightsail:{iamPrefix:"lightsail"},location:{iamPrefix:"geo"},lookoutequipment:{iamPrefix:"lookoutequipment"},lookoutmetrics:{iamPrefix:"lookoutmetrics"},lookoutvision:{iamPrefix:"lookoutvision"},m2:{iamPrefix:"m2"},"machine-learning":{iamPrefix:"machinelearning"},macie2:{iamPrefix:"macie2"},"managedblockchain-query":{iamPrefix:"managedblockchain-query"},managedblockchain:{iamPrefix:"managedblockchain"},"marketplace-agreement":{iamPrefix:"aws-marketplace"},"marketplace-catalog":{iamPrefix:"aws-marketplace"},"marketplace-commerce-analytics":{iamPrefix:"marketplacecommerceanalytics"},"marketplace-deployment":{iamPrefix:"aws-marketplace"},"marketplace-entitlement-service":{iamPrefix:"aws-marketplace"},"marketplace-metering":{iamPrefix:"aws-marketplace"},mediaconnect:{iamPrefix:"mediaconnect"},mediaconvert:{iamPrefix:"mediaconvert"},medialive:{iamPrefix:"medialive"},"mediapackage-vod":{iamPrefix:"mediapackage-vod"},mediapackage:{iamPrefix:"mediapackage"},mediapackagev2:{iamPrefix:"mediapackagev2"},"mediastore-data":{iamPrefix:"mediastore"},mediastore:{iamPrefix:"mediastore"},mediatailor:{iamPrefix:"mediatailor"},"medical-imaging":{iamPrefix:"medical-imaging"},memorydb:{iamPrefix:"memorydb"},mgn:{iamPrefix:"mgn"},"migration-hub-refactor-spaces":{iamPrefix:"refactor-spaces"},"migration-hub":{iamPrefix:"mgh"},"migrationhub-config":{iamPrefix:"mgh"},migrationhuborchestrator:{iamPrefix:"migrationhub-orchestrator"},migrationhubstrategy:{iamPrefix:"migrationhub-strategy"},mobile:{iamPrefix:"AWSMobileHubService"},mq:{iamPrefix:"mq"},mturk:{iamPrefix:"mturk-requester"},mwaa:{iamPrefix:"airflow"},"neptune-graph":{iamPrefix:"neptune-graph"},neptune:{iamPrefix:"rds"},neptunedata:{iamPrefix:"neptune-db"},"network-firewall":{iamPrefix:"network-firewall"},networkmanager:{iamPrefix:"networkmanager"},networkmonitor:{iamPrefix:"networkmonitor"},nimble:{iamPrefix:"nimble"},oam:{iamPrefix:"oam"},omics:{iamPrefix:"omics"},opensearch:{iamPrefix:"es"},opensearchserverless:{iamPrefix:"aoss"},opsworks:{iamPrefix:"opsworks"},opsworkscm:{iamPrefix:"opsworks-cm"},organizations:{iamPrefix:"organizations"},osis:{iamPrefix:"osis"},outposts:{iamPrefix:"outposts"},panorama:{iamPrefix:"panorama"},"payment-cryptography-data":{iamPrefix:"payment-cryptography"},"payment-cryptography":{iamPrefix:"payment-cryptography"},"pca-connector-ad":{iamPrefix:"pca-connector-ad"},"personalize-events":{iamPrefix:"personalize"},"personalize-runtime":{iamPrefix:"personalize"},personalize:{iamPrefix:"personalize"},pi:{iamPrefix:"pi"},"pinpoint-email":{iamPrefix:"ses"},"pinpoint-sms-voice-v2":{iamPrefix:"sms-voice"},"pinpoint-sms-voice":{iamPrefix:"sms-voice"},pinpoint:{iamPrefix:"mobiletargeting"},pipes:{iamPrefix:"pipes"},polly:{iamPrefix:"polly"},pricing:{iamPrefix:"pricing"},privatenetworks:{iamPrefix:"private-networks"},proton:{iamPrefix:"proton"},qbusiness:{iamPrefix:"qbusiness"},qconnect:{iamPrefix:"wisdom"},"qldb-session":{iamPrefix:"qldb",commands:["SendCommand"]},qldb:{iamPrefix:"qldb"},quicksight:{iamPrefix:"quicksight"},ram:{iamPrefix:"ram"},rbin:{iamPrefix:"rbin"},"rds-data":{iamPrefix:"rds-data"},rds:{iamPrefix:"rds"},"redshift-data":{iamPrefix:"redshift-data"},"redshift-serverless":{iamPrefix:"redshift-serverless"},redshift:{iamPrefix:"redshift"},rekognition:{iamPrefix:"rekognition"},rekognitionstreaming:{iamPrefix:"rekognition"},repostspace:{iamPrefix:"repostspace"},resiliencehub:{iamPrefix:"resiliencehub"},"resource-explorer-2":{iamPrefix:"resource-explorer-2"},"resource-groups-tagging-api":{iamPrefix:"tagging"},"resource-groups":{iamPrefix:"resource-groups"},robomaker:{iamPrefix:"robomaker"},rolesanywhere:{iamPrefix:"rolesanywhere"},"route-53-domains":{iamPrefix:"route53domains"},"route-53":{iamPrefix:"route53"},"route53-recovery-cluster":{iamPrefix:"route53-recovery-cluster"},"route53-recovery-control-config":{iamPrefix:"route53-recovery-control-config"},"route53-recovery-readiness":{iamPrefix:"route53-recovery-readiness"},route53resolver:{iamPrefix:"route53resolver"},rum:{iamPrefix:"rum"},"s3-control":{iamPrefix:"s3"},s3:{iamPrefix:"s3"},s3outposts:{iamPrefix:"s3-outposts"},"sagemaker-a2i-runtime":{iamPrefix:"sagemaker"},"sagemaker-edge":{iamPrefix:"sagemaker"},"sagemaker-featurestore-runtime":{iamPrefix:"sagemaker"},"sagemaker-geospatial":{iamPrefix:"sagemaker-geospatial"},"sagemaker-metrics":{iamPrefix:"sagemaker"},"sagemaker-runtime":{iamPrefix:"sagemaker"},sagemaker:{iamPrefix:"sagemaker"},savingsplans:{iamPrefix:"savingsplans"},scheduler:{iamPrefix:"scheduler"},schemas:{iamPrefix:"schemas"},"secrets-manager":{iamPrefix:"secretsmanager"},securityhub:{iamPrefix:"securityhub"},securitylake:{iamPrefix:"securitylake"},serverlessapplicationrepository:{iamPrefix:"serverlessrepo"},"service-catalog-appregistry":{iamPrefix:"servicecatalog"},"service-catalog":{iamPrefix:"servicecatalog"},"service-quotas":{iamPrefix:"servicequotas"},servicediscovery:{iamPrefix:"servicediscovery"},ses:{iamPrefix:"ses"},sesv2:{iamPrefix:"ses"},sfn:{iamPrefix:"states"},shield:{iamPrefix:"shield"},signer:{iamPrefix:"signer"},simspaceweaver:{iamPrefix:"simspaceweaver"},sms:{iamPrefix:"sms"},"snow-device-management":{iamPrefix:"snow-device-management"},snowball:{iamPrefix:"snowball"},sns:{iamPrefix:"sns"},sqs:{iamPrefix:"sqs"},"ssm-contacts":{iamPrefix:"ssm-contacts"},"ssm-incidents":{iamPrefix:"ssm-incidents"},"ssm-sap":{iamPrefix:"ssm-sap"},ssm:{iamPrefix:"ssm",commands:["CancelCommand","SendCommand"]},"sso-admin":{iamPrefix:"sso"},"sso-oidc":{iamPrefix:"sso-oauth"},sso:{iamPrefix:"awsssoportal"},"storage-gateway":{iamPrefix:"storagegateway"},sts:{iamPrefix:"sts"},supplychain:{iamPrefix:"scn"},"support-app":{iamPrefix:"supportapp"},support:{iamPrefix:"support"},swf:{iamPrefix:"swf"},synthetics:{iamPrefix:"synthetics"},textract:{iamPrefix:"textract"},"timestream-query":{iamPrefix:"timestream"},"timestream-write":{iamPrefix:"timestream"},tnb:{iamPrefix:"tnb"},"transcribe-streaming":{iamPrefix:"transcribe"},transcribe:{iamPrefix:"transcribe"},transfer:{iamPrefix:"transfer"},translate:{iamPrefix:"translate"},trustedadvisor:{iamPrefix:"trustedadvisor"},verifiedpermissions:{iamPrefix:"verifiedpermissions"},"voice-id":{iamPrefix:"voiceid"},"vpc-lattice":{iamPrefix:"vpc-lattice"},"waf-regional":{iamPrefix:"waf-regional"},waf:{iamPrefix:"waf"},wafv2:{iamPrefix:"wafv2"},wellarchitected:{iamPrefix:"wellarchitected"},wisdom:{iamPrefix:"wisdom"},workdocs:{iamPrefix:"workdocs"},worklink:{iamPrefix:"worklink"},workmail:{iamPrefix:"workmail"},workmailmessageflow:{iamPrefix:"workmailmessageflow"},"workspaces-thin-client":{iamPrefix:"thinclient"},"workspaces-web":{iamPrefix:"workspaces-web"},workspaces:{iamPrefix:"workspaces"},xray:{iamPrefix:"xray"}}});var X={};o(X,{normalizeActionName:()=>b,normalizeServiceName:()=>y});function y(i){return i=i.toLowerCase(),i=i.replace(/^@aws-sdk\/client-/,""),i=B()?.[i]??i,i}function b(i,e){return e.charAt(0).toLowerCase()===e.charAt(0)?e.charAt(0).toUpperCase()+e.slice(1):F()[i]?.commands?.includes(e)?e:e.replace(/Command$/,"")}function B(){return T()}function F(){return A()}var h=s(()=>{"use strict"});var H={};o(H,{ApiCall:()=>v,coerceSdkv3Response:()=>l,flatten:()=>O});function O(i){let e={};return a(i),e;function a(r,t=[]){if(r&&typeof r=="object"){for(let[m,Z]of Object.entries(r))a(Z,[...t,m]);return}e[t.join(".")]=r}}async function l(i){if(i&&typeof i=="object"&&typeof i.transformToString=="function")return i.transformToString();if(Buffer.isBuffer(i))return i.toString("utf8");if(ArrayBuffer.isView(i))return G.decode(i.buffer);if(Array.isArray(i)){let e=[];for(let a of i)e.push(await l(a));return e}if(i&&typeof i=="object"){for(let e of Object.keys(i))i[e]=await l(i[e]);return i}return i}var v,G,q=s(()=>{"use strict";P();k();h();v=class{constructor(e,a){this.service=y(e),this.action=b(this.service,a),this.v3PackageName=`@aws-sdk/client-${this.service}`}async invoke(e){this.initializePackage(e.sdkPackage),this.initializeClient(e);let a=this.findCommandClass(),r=await this.client.send(new a(g(this.service,this.action,e.parameters??{})));delete r.$metadata;let t=await l(r);return e.flattenResponse?O(t):t}initializePackage(e){if(!this.v3Package){if(e){this.v3Package=e;return}try{this.v3Package=require(this.v3PackageName)}catch{throw Error(`Service ${this.service} client package with name '${this.v3PackageName}' does not exist.`)}}}initializeClient(e){this.v3Package||this.initializePackage();let a=this.findConstructor(this.v3Package);return this.client=new a({apiVersion:e.apiVersion,credentials:e.credentials,region:e.region}),this.client}findCommandClass(){this.v3Package||this.initializePackage();let e=`${this.action}Command`,a=Object.entries(this.v3Package??{}).find(([r])=>r.toLowerCase()===e.toLowerCase())?.[1];if(!a)throw new Error(`Unable to find command named: ${e} for action: ${this.action} in service package ${this.v3PackageName}`);return a}findConstructor(e){try{let a=x(e);if(!a)throw new Error("findV3ClientConstructor returned undefined");return a}catch(a){throw console.error(a),Error(`No client constructor found within package: ${this.v3PackageName}`)}}};G=new TextDecoder});var j=u(n=>{"use strict";var _=n&&n.__createBinding||(Object.create?function(i,e,a,r){r===void 0&&(r=a);var t=Object.getOwnPropertyDescriptor(e,a);(!t||("get"in t?!e.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(i,r,t)}:function(i,e,a,r){r===void 0&&(r=a),i[r]=e[a]}),$=n&&n.__exportStar||function(i,e){for(var a in i)a!=="default"&&!Object.prototype.hasOwnProperty.call(e,a)&&_(e,i,a)};Object.defineProperty(n,"__esModule",{value:!0});n.normalizeActionName=n.normalizeServiceName=n.findV3ClientConstructor=n.coerceApiParameters=void 0;var ee=(P(),c(z));Object.defineProperty(n,"coerceApiParameters",{enumerable:!0,get:function(){return ee.coerceApiParameters}});var ie=(k(),c(S));Object.defineProperty(n,"findV3ClientConstructor",{enumerable:!0,get:function(){return ie.findV3ClientConstructor}});var C=(h(),c(X));Object.defineProperty(n,"normalizeServiceName",{enumerable:!0,get:function(){return C.normalizeServiceName}});Object.defineProperty(n,"normalizeActionName",{enumerable:!0,get:function(){return C.normalizeActionName}});$((q(),c(H)),n)});var re={};o(re,{handler:()=>ae});module.exports=c(re);var D=J(j());async function ae(i){console.log("Event: %j",{...i,ResponseURL:"..."});let e=new D.ApiCall(i.service,i.action);console.log(`AWS SDK V3: ${e.v3PackageName}`);try{let a=await e.invoke({parameters:i.parameters??{},apiVersion:i.apiVersion});delete a.$metadata,console.log("Response: %j",a)}catch(a){if(console.log(a),!i.catchErrorPattern||!new RegExp(i.catchErrorPattern).test(a.name))throw a}}0&&(module.exports={handler}); +"use strict";var K=Object.create;var f=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var s=(i,e)=>()=>(i&&(e=i(i=0)),e);var u=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),o=(i,e)=>{for(var a in e)f(i,a,{get:e[a],enumerable:!0})},w=(i,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of R(e))!W.call(i,t)&&t!==a&&f(i,t,{get:()=>e[t],enumerable:!(r=Y(e,t))||r.enumerable});return i};var J=(i,e,a)=>(a=i!=null?K(M(i)):{},w(e||!i||!i.__esModule?f(a,"default",{value:i,enumerable:!0}):a,i)),c=i=>w(f({},"__esModule",{value:!0}),i);var N,p,U=s(()=>{"use strict";N=J(require("zlib")),p=()=>{let e=JSON.parse(N.brotliDecompressSync(Buffer.from("WwTvNRth5aS3wrMDte4UUjGpf58zaoly20sA3YFARNYeg5Tq6bgxBhJcWuvmFN8uDiWSsZWGl5gGXZ36WmpsHBsvRthrgqs8/kcaDLUxMcJeE4x6tenG38HElMLrANt1QBhS0sjELM0hz9rqMl+n/LSz329lG4V9gB5ukWQIKRYdX3//MKV54rY9XyFBkRCPmLCbIguRYLFe1fyqd1GFXF5wkEPSOfwSwJIwnxbD/TNLiXfXNLPrXWVSdHySsEBiWJB96fj0ZGSsAL6beIOt33hBYr36alWfoot8n5qSbIexFPFE2vfplsSI3CeQg2AXcnBYcEtdqPyNVaql/iMQ5N0vQJ4zQaxMCqIzCY+Sz6Lf7tmFDobUgc834Jl6UsaZ5Rvvk1Q+SHP53/e9aV/DvP7e4QUEh9w9KAU/U6H/03Jck0E+PID6bFwdSYUqQqL9yTRw1jpnm/wB71kRgMOSgLtbiRRpF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}});var z={};o(z,{Coercer:()=>d,coerceApiParameters:()=>g});function g(i,e,a={}){let r=p();return new d(r).coerceApiParameters(i,e,a)}function E(i){return i instanceof Uint8Array?i:typeof i=="string"||typeof i=="number"?new TextEncoder().encode(i.toString()):i}function Q(i){if(typeof i=="number")return i;if(typeof i=="string"){let e=Number(i);return isNaN(e)?i:e}return i}function L(i){if(typeof i=="string"||typeof i=="number"){let e=new Date(i);return isNaN(e.getTime())?i:e}return i}var d,P=s(()=>{"use strict";U();d=class{constructor(e){this.typeMachine=e}coerceApiParameters(e,a,r={}){let t=this.progress(a.toLowerCase(),this.progress(e.toLowerCase(),0));return this.recurse(r,t)}testCoerce(e){return this.recurse(e,0)}recurse(e,a){switch(a){case void 0:return e;case"b":return E(e);case"n":return Q(e);case"d":return L(e)}if(Array.isArray(e)){let r=this.progress("*",a);return r!==void 0?e.map(t=>this.recurse(t,r)):e}if(e&&typeof e=="object"){let r=this.progress("*",a);for(let t of Object.keys(e)){let m=this.progress(t,a)??r;m!==void 0&&(e[t]=this.recurse(e[t],m))}return e}return e}progress(e,a){if(!(a===void 0||typeof a!="number"))return this.typeMachine[a][e]}}});var S={};o(S,{findV3ClientConstructor:()=>x});function x(i){let[e,a]=Object.entries(i).find(([r])=>r.endsWith("Client")&&r!=="__Client");return a}var k=s(()=>{"use strict"});var T=u((ce,V)=>{V.exports={acmpca:"acm-pca",apigateway:"api-gateway",arczonalshift:"arc-zonal-shift",alexaforbusiness:"alexa-for-business",appmesh:"app-mesh",applicationautoscaling:"application-auto-scaling",applicationinsights:"application-insights",augmentedairuntime:"sage-maker-a2iruntime",autoscaling:"auto-scaling",autoscalingplans:"auto-scaling-plans",backupgateway:"backup-gateway",bedrockruntime:"bedrock-runtime",cur:"cost-and-usage-report-service",chimesdkidentity:"chime-sdk-identity",chimesdkmediapipelines:"chime-sdk-media-pipelines",chimesdkmeetings:"chime-sdk-meetings",chimesdkmessaging:"chime-sdk-messaging",chimesdkvoice:"chime-sdk-voice",cloudhsmv2:"cloudhsm-v2",cloudsearchdomain:"cloudsearch-domain",cloudtraildata:"cloudtrail-data",cloudwatchevents:"cloudwatch-events",cloudwatchlogs:"cloudwatch-logs",codegurureviewer:"codeguru-reviewer",codegurusecurity:"codeguru-security",codestarnotifications:"codestar-notifications",codestarconnections:"codestar-connections",cognitoidentity:"cognito-identity",cognitoidentityserviceprovider:"cognito-identity-provider",cognitosync:"cognito-sync",computeoptimizer:"compute-optimizer",configservice:"config-service",connectcontactlens:"connect-contact-lens",costexplorer:"cost-explorer",customerprofiles:"customer-profiles",dms:"database-migration-service",datapipeline:"data-pipeline",devopsguru:"devops-guru",devicefarm:"device-farm",directconnect:"direct-connect",directoryservice:"directory-service",discovery:"application-discovery-service",docdbelastic:"docdb-elastic",dynamodbstreams:"dynamodb-streams",ec2instanceconnect:"ec2-instance-connect",ecrpublic:"ecr-public",elb:"elastic-load-balancing",elbv2:"elastic-load-balancing-v2",emrserverless:"emr-serverless",emrcontainers:"emr-containers",es:"elasticsearch-service",elasticbeanstalk:"elastic-beanstalk",elasticinference:"elastic-inference",elastictranscoder:"elastic-transcoder",finspacedata:"finspace-data",forecastqueryservice:"forecastquery",forecastservice:"forecast",globalaccelerator:"global-accelerator",iot1clickdevicesservice:"iot-1click-devices-service",iot1clickprojects:"iot-1click-projects",iotevents:"iot-events",ioteventsdata:"iot-events-data",iotjobsdataplane:"iot-jobs-data-plane",iotroborunner:"iot-roborunner",iotwireless:"iot-wireless",iotdata:"iot-data-plane",ivsrealtime:"ivs-realtime",kendraranking:"kendra-ranking",kinesisanalytics:"kinesis-analytics",kinesisanalyticsv2:"kinesis-analytics-v2",kinesisvideo:"kinesis-video",kinesisvideoarchivedmedia:"kinesis-video-archived-media",kinesisvideomedia:"kinesis-video-media",kinesisvideosignalingchannels:"kinesis-video-signaling",kinesisvideowebrtcstorage:"kinesis-video-webrtc-storage",launchwizard:"launch-wizard",lexmodelbuildingservice:"lex-model-building-service",lexmodelsv2:"lex-models-v2",lexruntime:"lex-runtime-service",lexruntimev2:"lex-runtime-v2",licensemanager:"license-manager",licensemanagerlinuxsubscriptions:"license-manager-linux-subscriptions",licensemanagerusersubscriptions:"license-manager-user-subscriptions",machinelearning:"machine-learning",managedblockchainquery:"managedblockchain-query",marketplacecatalog:"marketplace-catalog",marketplacecommerceanalytics:"marketplace-commerce-analytics",marketplaceentitlementservice:"marketplace-entitlement-service",marketplacemetering:"marketplace-metering",mediapackagevod:"mediapackage-vod",mediastoredata:"mediastore-data",medicalimaging:"medical-imaging",memorydb:"memory-db",migrationhub:"migration-hub",migrationhubconfig:"migrationhub-config",migrationhubrefactorspaces:"migration-hub-refactor-spaces",networkfirewall:"network-firewall",paymentcryptography:"payment-cryptography",paymentcryptographydata:"payment-cryptography-data",pcaconnectorad:"pca-connector-ad",personalizeevents:"personalize-events",personalizeruntime:"personalize-runtime",pinpointemail:"pinpoint-email",pinpointsmsvoice:"pinpoint-sms-voice",pinpointsmsvoicev2:"pinpoint-sms-voice-v2",qldbsession:"qldb-session",rdsdataservice:"rds-data",redshiftdata:"redshift-data",redshiftserverless:"redshift-serverless",resourceexplorer2:"resource-explorer-2",resourcegroups:"resource-groups",resourcegroupstaggingapi:"resource-groups-tagging-api",route53:"route-53",route53domains:"route-53-domains",route53recoverycluster:"route53-recovery-cluster",route53recoverycontrolconfig:"route53-recovery-control-config",route53recoveryreadiness:"route53-recovery-readiness",s3control:"s3-control",ssmcontacts:"ssm-contacts",ssmincidents:"ssm-incidents",ssoadmin:"sso-admin",ssooidc:"sso-oidc",sagemakerfeaturestoreruntime:"sagemaker-featurestore-runtime",sagemakergeospatial:"sagemaker-geospatial",sagemakermetrics:"sagemaker-metrics",sagemakerruntime:"sagemaker-runtime",sagemakeredge:"sagemaker-edge",secretsmanager:"secrets-manager",servicecatalog:"service-catalog",servicecatalogappregistry:"service-catalog-appregistry",servicequotas:"service-quotas",snowdevicemanagement:"snow-device-management",ssmsap:"ssm-sap",stepfunctions:"sfn",storagegateway:"storage-gateway",supportapp:"support-app",timestreamquery:"timestream-query",timestreamwrite:"timestream-write",transcribeservice:"transcribe",voiceid:"voice-id",vpclattice:"vpc-lattice",wafregional:"waf-regional",workspacesweb:"workspaces-web"}});var A=u((me,I)=>{I.exports={accessanalyzer:{iamPrefix:"access-analyzer"},account:{iamPrefix:"account"},"acm-pca":{iamPrefix:"acm-pca"},acm:{iamPrefix:"acm"},"alexa-for-business":{iamPrefix:"a4b"},amp:{iamPrefix:"aps"},amplify:{iamPrefix:"amplify"},amplifybackend:{iamPrefix:"amplifybackend"},amplifyuibuilder:{iamPrefix:"amplifyuibuilder"},"api-gateway":{iamPrefix:"apigateway"},apigatewaymanagementapi:{iamPrefix:"execute-api"},apigatewayv2:{iamPrefix:"apigateway"},"app-mesh":{iamPrefix:"appmesh"},appconfig:{iamPrefix:"appconfig"},appconfigdata:{iamPrefix:"appconfig"},appfabric:{iamPrefix:"appfabric"},appflow:{iamPrefix:"appflow"},appintegrations:{iamPrefix:"app-integrations"},"application-auto-scaling":{iamPrefix:"application-autoscaling"},"application-discovery-service":{iamPrefix:"discovery"},"application-insights":{iamPrefix:"applicationinsights"},applicationcostprofiler:{iamPrefix:"application-cost-profiler"},apprunner:{iamPrefix:"apprunner"},appstream:{iamPrefix:"appstream"},appsync:{iamPrefix:"appsync"},"arc-zonal-shift":{iamPrefix:"arc-zonal-shift"},athena:{iamPrefix:"athena"},auditmanager:{iamPrefix:"auditmanager"},"auto-scaling-plans":{iamPrefix:"autoscaling-plans"},"auto-scaling":{iamPrefix:"autoscaling"},b2bi:{iamPrefix:"b2bi"},"backup-gateway":{iamPrefix:"backup-gateway"},backup:{iamPrefix:"backup"},backupstorage:{iamPrefix:"backup-storage"},batch:{iamPrefix:"batch"},"bcm-data-exports":{iamPrefix:"bcm-data-exports"},"bedrock-agent-runtime":{iamPrefix:"bedrock"},"bedrock-agent":{iamPrefix:"bedrock"},"bedrock-runtime":{iamPrefix:"bedrock"},bedrock:{iamPrefix:"bedrock"},billingconductor:{iamPrefix:"billingconductor"},braket:{iamPrefix:"braket"},budgets:{iamPrefix:"budgets"},"chime-sdk-identity":{iamPrefix:"chime"},"chime-sdk-media-pipelines":{iamPrefix:"chime"},"chime-sdk-meetings":{iamPrefix:"chime"},"chime-sdk-messaging":{iamPrefix:"chime"},"chime-sdk-voice":{iamPrefix:"chime"},chime:{iamPrefix:"chime"},cleanrooms:{iamPrefix:"cleanrooms"},cleanroomsml:{iamPrefix:"cleanrooms-ml"},cloud9:{iamPrefix:"cloud9"},cloudcontrol:{iamPrefix:"cloudcontrolapi"},clouddirectory:{iamPrefix:"clouddirectory"},cloudformation:{iamPrefix:"cloudformation"},"cloudfront-keyvaluestore":{iamPrefix:"cloudfront-keyvaluestore"},cloudfront:{iamPrefix:"cloudfront"},"cloudhsm-v2":{iamPrefix:"cloudhsm"},cloudhsm:{iamPrefix:"cloudhsm"},"cloudsearch-domain":{iamPrefix:"cloudsearch"},cloudsearch:{iamPrefix:"cloudsearch"},"cloudtrail-data":{iamPrefix:"cloudtrail-data"},cloudtrail:{iamPrefix:"cloudtrail"},"cloudwatch-events":{iamPrefix:"events"},"cloudwatch-logs":{iamPrefix:"logs"},cloudwatch:{iamPrefix:"monitoring"},codeartifact:{iamPrefix:"codeartifact"},codebuild:{iamPrefix:"codebuild"},codecatalyst:{},codecommit:{iamPrefix:"codecommit"},codedeploy:{iamPrefix:"codedeploy"},"codeguru-reviewer":{iamPrefix:"codeguru-reviewer"},"codeguru-security":{iamPrefix:"codeguru-security"},codeguruprofiler:{iamPrefix:"codeguru-profiler"},codepipeline:{iamPrefix:"codepipeline"},"codestar-connections":{iamPrefix:"codestar-connections"},"codestar-notifications":{iamPrefix:"codestar-notifications"},codestar:{iamPrefix:"codestar"},"cognito-identity-provider":{iamPrefix:"cognito-idp"},"cognito-identity":{iamPrefix:"cognito-identity"},"cognito-sync":{iamPrefix:"cognito-sync"},comprehend:{iamPrefix:"comprehend"},comprehendmedical:{iamPrefix:"comprehendmedical"},"compute-optimizer":{iamPrefix:"compute-optimizer"},"config-service":{iamPrefix:"config"},"connect-contact-lens":{iamPrefix:"connect"},connect:{iamPrefix:"connect"},connectcampaigns:{iamPrefix:"connect-campaigns"},connectcases:{iamPrefix:"cases"},connectparticipant:{iamPrefix:"execute-api"},controltower:{iamPrefix:"controltower"},"cost-and-usage-report-service":{iamPrefix:"cur"},"cost-explorer":{iamPrefix:"ce"},"cost-optimization-hub":{iamPrefix:"cost-optimization-hub"},"customer-profiles":{iamPrefix:"profile"},"data-pipeline":{iamPrefix:"datapipeline"},"database-migration-service":{iamPrefix:"dms"},databrew:{iamPrefix:"databrew"},dataexchange:{iamPrefix:"dataexchange"},datasync:{iamPrefix:"datasync"},datazone:{iamPrefix:"datazone"},dax:{iamPrefix:"dax"},detective:{iamPrefix:"detective"},"device-farm":{iamPrefix:"devicefarm"},"devops-guru":{iamPrefix:"devops-guru"},"direct-connect":{iamPrefix:"directconnect"},"directory-service":{iamPrefix:"ds"},dlm:{iamPrefix:"dlm"},"docdb-elastic":{iamPrefix:"docdb-elastic"},docdb:{iamPrefix:"rds"},drs:{iamPrefix:"drs"},"dynamodb-streams":{iamPrefix:"dynamodb"},dynamodb:{iamPrefix:"dynamodb"},ebs:{iamPrefix:"ebs"},"ec2-instance-connect":{iamPrefix:"ec2-instance-connect"},ec2:{iamPrefix:"ec2"},"ecr-public":{iamPrefix:"ecr-public"},ecr:{iamPrefix:"ecr"},ecs:{iamPrefix:"ecs",commands:["ExecuteCommand"]},efs:{iamPrefix:"elasticfilesystem"},"eks-auth":{iamPrefix:"eks-auth"},eks:{iamPrefix:"eks"},"elastic-beanstalk":{iamPrefix:"elasticbeanstalk"},"elastic-inference":{iamPrefix:"elastic-inference"},"elastic-load-balancing-v2":{iamPrefix:"elasticloadbalancing"},"elastic-load-balancing":{iamPrefix:"elasticloadbalancing"},"elastic-transcoder":{iamPrefix:"elastictranscoder"},elasticache:{iamPrefix:"elasticache"},"elasticsearch-service":{iamPrefix:"es"},"emr-containers":{iamPrefix:"emr-containers"},"emr-serverless":{iamPrefix:"emr-serverless"},emr:{iamPrefix:"elasticmapreduce"},entityresolution:{iamPrefix:"entityresolution"},eventbridge:{iamPrefix:"events"},evidently:{iamPrefix:"evidently"},"finspace-data":{iamPrefix:"finspace-api"},finspace:{iamPrefix:"finspace"},firehose:{iamPrefix:"firehose"},fis:{iamPrefix:"fis"},fms:{iamPrefix:"fms"},forecast:{iamPrefix:"forecast"},forecastquery:{iamPrefix:"forecast"},frauddetector:{iamPrefix:"frauddetector"},freetier:{iamPrefix:"freetier"},fsx:{iamPrefix:"fsx"},gamelift:{iamPrefix:"gamelift"},glacier:{iamPrefix:"glacier"},"global-accelerator":{iamPrefix:"globalaccelerator"},glue:{iamPrefix:"glue"},grafana:{iamPrefix:"grafana"},greengrass:{iamPrefix:"greengrass"},greengrassv2:{iamPrefix:"greengrass"},groundstation:{iamPrefix:"groundstation"},guardduty:{iamPrefix:"guardduty"},health:{iamPrefix:"health"},healthlake:{iamPrefix:"healthlake"},honeycode:{iamPrefix:"honeycode"},iam:{iamPrefix:"iam"},identitystore:{iamPrefix:"identitystore"},imagebuilder:{iamPrefix:"imagebuilder"},"inspector-scan":{iamPrefix:"inspector-scan"},inspector:{iamPrefix:"inspector"},inspector2:{iamPrefix:"inspector2"},internetmonitor:{iamPrefix:"internetmonitor"},"iot-1click-devices-service":{iamPrefix:"iot1click"},"iot-1click-projects":{iamPrefix:"iot1click"},"iot-data-plane":{iamPrefix:"iotdata"},"iot-events-data":{iamPrefix:"ioteventsdata"},"iot-events":{iamPrefix:"iotevents"},"iot-jobs-data-plane":{iamPrefix:"iot-jobs-data"},"iot-roborunner":{iamPrefix:"iotroborunner"},"iot-wireless":{iamPrefix:"iotwireless"},iot:{iamPrefix:"iot"},iotanalytics:{iamPrefix:"iotanalytics"},iotdeviceadvisor:{iamPrefix:"iotdeviceadvisor"},iotfleethub:{iamPrefix:"iotfleethub"},iotfleetwise:{iamPrefix:"iotfleetwise"},iotsecuretunneling:{iamPrefix:"IoTSecuredTunneling"},iotsitewise:{iamPrefix:"iotsitewise"},iotthingsgraph:{iamPrefix:"iotthingsgraph"},iottwinmaker:{iamPrefix:"iottwinmaker"},"ivs-realtime":{iamPrefix:"ivs"},ivs:{iamPrefix:"ivs"},ivschat:{iamPrefix:"ivschat"},kafka:{iamPrefix:"kafka"},kafkaconnect:{iamPrefix:"kafkaconnect"},"kendra-ranking":{iamPrefix:"kendra-ranking"},kendra:{iamPrefix:"kendra"},keyspaces:{iamPrefix:"cassandra"},"kinesis-analytics-v2":{iamPrefix:"kinesisanalytics"},"kinesis-analytics":{iamPrefix:"kinesisanalytics"},"kinesis-video-archived-media":{iamPrefix:"kinesisvideo"},"kinesis-video-media":{iamPrefix:"kinesisvideo"},"kinesis-video-signaling":{iamPrefix:"kinesisvideo"},"kinesis-video-webrtc-storage":{iamPrefix:"kinesisvideo"},"kinesis-video":{iamPrefix:"kinesisvideo"},kinesis:{iamPrefix:"kinesis"},kms:{iamPrefix:"kms"},lakeformation:{iamPrefix:"lakeformation"},lambda:{iamPrefix:"lambda"},"launch-wizard":{iamPrefix:"launchwizard"},"lex-model-building-service":{iamPrefix:"lex"},"lex-models-v2":{iamPrefix:"lex"},"lex-runtime-service":{iamPrefix:"lex"},"lex-runtime-v2":{iamPrefix:"lex"},"license-manager-linux-subscriptions":{iamPrefix:"license-manager-linux-subscriptions"},"license-manager-user-subscriptions":{iamPrefix:"license-manager-user-subscriptions"},"license-manager":{iamPrefix:"license-manager"},lightsail:{iamPrefix:"lightsail"},location:{iamPrefix:"geo"},lookoutequipment:{iamPrefix:"lookoutequipment"},lookoutmetrics:{iamPrefix:"lookoutmetrics"},lookoutvision:{iamPrefix:"lookoutvision"},m2:{iamPrefix:"m2"},"machine-learning":{iamPrefix:"machinelearning"},macie2:{iamPrefix:"macie2"},"managedblockchain-query":{iamPrefix:"managedblockchain-query"},managedblockchain:{iamPrefix:"managedblockchain"},"marketplace-agreement":{iamPrefix:"aws-marketplace"},"marketplace-catalog":{iamPrefix:"aws-marketplace"},"marketplace-commerce-analytics":{iamPrefix:"marketplacecommerceanalytics"},"marketplace-deployment":{iamPrefix:"aws-marketplace"},"marketplace-entitlement-service":{iamPrefix:"aws-marketplace"},"marketplace-metering":{iamPrefix:"aws-marketplace"},mediaconnect:{iamPrefix:"mediaconnect"},mediaconvert:{iamPrefix:"mediaconvert"},medialive:{iamPrefix:"medialive"},"mediapackage-vod":{iamPrefix:"mediapackage-vod"},mediapackage:{iamPrefix:"mediapackage"},mediapackagev2:{iamPrefix:"mediapackagev2"},"mediastore-data":{iamPrefix:"mediastore"},mediastore:{iamPrefix:"mediastore"},mediatailor:{iamPrefix:"mediatailor"},"medical-imaging":{iamPrefix:"medical-imaging"},memorydb:{iamPrefix:"memorydb"},mgn:{iamPrefix:"mgn"},"migration-hub-refactor-spaces":{iamPrefix:"refactor-spaces"},"migration-hub":{iamPrefix:"mgh"},"migrationhub-config":{iamPrefix:"mgh"},migrationhuborchestrator:{iamPrefix:"migrationhub-orchestrator"},migrationhubstrategy:{iamPrefix:"migrationhub-strategy"},mobile:{iamPrefix:"AWSMobileHubService"},mq:{iamPrefix:"mq"},mturk:{iamPrefix:"mturk-requester"},mwaa:{iamPrefix:"airflow"},"neptune-graph":{iamPrefix:"neptune-graph"},neptune:{iamPrefix:"rds"},neptunedata:{iamPrefix:"neptune-db"},"network-firewall":{iamPrefix:"network-firewall"},networkmanager:{iamPrefix:"networkmanager"},networkmonitor:{iamPrefix:"networkmonitor"},nimble:{iamPrefix:"nimble"},oam:{iamPrefix:"oam"},omics:{iamPrefix:"omics"},opensearch:{iamPrefix:"es"},opensearchserverless:{iamPrefix:"aoss"},opsworks:{iamPrefix:"opsworks"},opsworkscm:{iamPrefix:"opsworks-cm"},organizations:{iamPrefix:"organizations"},osis:{iamPrefix:"osis"},outposts:{iamPrefix:"outposts"},panorama:{iamPrefix:"panorama"},"payment-cryptography-data":{iamPrefix:"payment-cryptography"},"payment-cryptography":{iamPrefix:"payment-cryptography"},"pca-connector-ad":{iamPrefix:"pca-connector-ad"},"personalize-events":{iamPrefix:"personalize"},"personalize-runtime":{iamPrefix:"personalize"},personalize:{iamPrefix:"personalize"},pi:{iamPrefix:"pi"},"pinpoint-email":{iamPrefix:"ses"},"pinpoint-sms-voice-v2":{iamPrefix:"sms-voice"},"pinpoint-sms-voice":{iamPrefix:"sms-voice"},pinpoint:{iamPrefix:"mobiletargeting"},pipes:{iamPrefix:"pipes"},polly:{iamPrefix:"polly"},pricing:{iamPrefix:"pricing"},privatenetworks:{iamPrefix:"private-networks"},proton:{iamPrefix:"proton"},qbusiness:{iamPrefix:"qbusiness"},qconnect:{iamPrefix:"wisdom"},"qldb-session":{iamPrefix:"qldb",commands:["SendCommand"]},qldb:{iamPrefix:"qldb"},quicksight:{iamPrefix:"quicksight"},ram:{iamPrefix:"ram"},rbin:{iamPrefix:"rbin"},"rds-data":{iamPrefix:"rds-data"},rds:{iamPrefix:"rds"},"redshift-data":{iamPrefix:"redshift-data"},"redshift-serverless":{iamPrefix:"redshift-serverless"},redshift:{iamPrefix:"redshift"},rekognition:{iamPrefix:"rekognition"},rekognitionstreaming:{iamPrefix:"rekognition"},repostspace:{iamPrefix:"repostspace"},resiliencehub:{iamPrefix:"resiliencehub"},"resource-explorer-2":{iamPrefix:"resource-explorer-2"},"resource-groups-tagging-api":{iamPrefix:"tagging"},"resource-groups":{iamPrefix:"resource-groups"},robomaker:{iamPrefix:"robomaker"},rolesanywhere:{iamPrefix:"rolesanywhere"},"route-53-domains":{iamPrefix:"route53domains"},"route-53":{iamPrefix:"route53"},"route53-recovery-cluster":{iamPrefix:"route53-recovery-cluster"},"route53-recovery-control-config":{iamPrefix:"route53-recovery-control-config"},"route53-recovery-readiness":{iamPrefix:"route53-recovery-readiness"},route53resolver:{iamPrefix:"route53resolver"},rum:{iamPrefix:"rum"},"s3-control":{iamPrefix:"s3"},s3:{iamPrefix:"s3"},s3outposts:{iamPrefix:"s3-outposts"},"sagemaker-a2i-runtime":{iamPrefix:"sagemaker"},"sagemaker-edge":{iamPrefix:"sagemaker"},"sagemaker-featurestore-runtime":{iamPrefix:"sagemaker"},"sagemaker-geospatial":{iamPrefix:"sagemaker-geospatial"},"sagemaker-metrics":{iamPrefix:"sagemaker"},"sagemaker-runtime":{iamPrefix:"sagemaker"},sagemaker:{iamPrefix:"sagemaker"},savingsplans:{iamPrefix:"savingsplans"},scheduler:{iamPrefix:"scheduler"},schemas:{iamPrefix:"schemas"},"secrets-manager":{iamPrefix:"secretsmanager"},securityhub:{iamPrefix:"securityhub"},securitylake:{iamPrefix:"securitylake"},serverlessapplicationrepository:{iamPrefix:"serverlessrepo"},"service-catalog-appregistry":{iamPrefix:"servicecatalog"},"service-catalog":{iamPrefix:"servicecatalog"},"service-quotas":{iamPrefix:"servicequotas"},servicediscovery:{iamPrefix:"servicediscovery"},ses:{iamPrefix:"ses"},sesv2:{iamPrefix:"ses"},sfn:{iamPrefix:"states"},shield:{iamPrefix:"shield"},signer:{iamPrefix:"signer"},simspaceweaver:{iamPrefix:"simspaceweaver"},sms:{iamPrefix:"sms"},"snow-device-management":{iamPrefix:"snow-device-management"},snowball:{iamPrefix:"snowball"},sns:{iamPrefix:"sns"},sqs:{iamPrefix:"sqs"},"ssm-contacts":{iamPrefix:"ssm-contacts"},"ssm-incidents":{iamPrefix:"ssm-incidents"},"ssm-sap":{iamPrefix:"ssm-sap"},ssm:{iamPrefix:"ssm",commands:["CancelCommand","SendCommand"]},"sso-admin":{iamPrefix:"sso"},"sso-oidc":{iamPrefix:"sso-oauth"},sso:{iamPrefix:"awsssoportal"},"storage-gateway":{iamPrefix:"storagegateway"},sts:{iamPrefix:"sts"},supplychain:{iamPrefix:"scn"},"support-app":{iamPrefix:"supportapp"},support:{iamPrefix:"support"},swf:{iamPrefix:"swf"},synthetics:{iamPrefix:"synthetics"},textract:{iamPrefix:"textract"},"timestream-query":{iamPrefix:"timestream"},"timestream-write":{iamPrefix:"timestream"},tnb:{iamPrefix:"tnb"},"transcribe-streaming":{iamPrefix:"transcribe"},transcribe:{iamPrefix:"transcribe"},transfer:{iamPrefix:"transfer"},translate:{iamPrefix:"translate"},trustedadvisor:{iamPrefix:"trustedadvisor"},verifiedpermissions:{iamPrefix:"verifiedpermissions"},"voice-id":{iamPrefix:"voiceid"},"vpc-lattice":{iamPrefix:"vpc-lattice"},"waf-regional":{iamPrefix:"waf-regional"},waf:{iamPrefix:"waf"},wafv2:{iamPrefix:"wafv2"},wellarchitected:{iamPrefix:"wellarchitected"},wisdom:{iamPrefix:"wisdom"},workdocs:{iamPrefix:"workdocs"},worklink:{iamPrefix:"worklink"},workmail:{iamPrefix:"workmail"},workmailmessageflow:{iamPrefix:"workmailmessageflow"},"workspaces-thin-client":{iamPrefix:"thinclient"},"workspaces-web":{iamPrefix:"workspaces-web"},workspaces:{iamPrefix:"workspaces"},xray:{iamPrefix:"xray"}}});var X={};o(X,{normalizeActionName:()=>b,normalizeServiceName:()=>y});function y(i){return i=i.toLowerCase(),i=i.replace(/^@aws-sdk\/client-/,""),i=B()?.[i]??i,i}function b(i,e){return e.charAt(0).toLowerCase()===e.charAt(0)?e.charAt(0).toUpperCase()+e.slice(1):F()[i]?.commands?.includes(e)?e:e.replace(/Command$/,"")}function B(){return T()}function F(){return A()}var h=s(()=>{"use strict"});var H={};o(H,{ApiCall:()=>v,coerceSdkv3Response:()=>l,flatten:()=>O});function O(i){let e={};return a(i),e;function a(r,t=[]){if(r&&typeof r=="object"){for(let[m,Z]of Object.entries(r))a(Z,[...t,m]);return}e[t.join(".")]=r}}async function l(i){if(i&&typeof i=="object"&&typeof i.transformToString=="function")return i.transformToString();if(Buffer.isBuffer(i))return i.toString("utf8");if(ArrayBuffer.isView(i))return G.decode(i.buffer);if(Array.isArray(i)){let e=[];for(let a of i)e.push(await l(a));return e}if(i&&typeof i=="object"){for(let e of Object.keys(i))i[e]=await l(i[e]);return i}return i}var v,G,q=s(()=>{"use strict";P();k();h();v=class{constructor(e,a){this.service=y(e),this.action=b(this.service,a),this.v3PackageName=`@aws-sdk/client-${this.service}`}async invoke(e){this.initializePackage(e.sdkPackage),this.initializeClient(e);let a=this.findCommandClass(),r=await this.client.send(new a(g(this.service,this.action,e.parameters??{})));delete r.$metadata;let t=await l(r);return e.flattenResponse?O(t):t}initializePackage(e){if(!this.v3Package){if(e){this.v3Package=e;return}try{this.v3Package=require(this.v3PackageName)}catch{throw Error(`Service ${this.service} client package with name '${this.v3PackageName}' does not exist.`)}}}initializeClient(e){this.v3Package||this.initializePackage();let a=this.findConstructor(this.v3Package);return this.client=new a({apiVersion:e.apiVersion,credentials:e.credentials,region:e.region}),this.client}findCommandClass(){this.v3Package||this.initializePackage();let e=`${this.action}Command`,a=Object.entries(this.v3Package??{}).find(([r])=>r.toLowerCase()===e.toLowerCase())?.[1];if(!a)throw new Error(`Unable to find command named: ${e} for action: ${this.action} in service package ${this.v3PackageName}`);return a}findConstructor(e){try{let a=x(e);if(!a)throw new Error("findV3ClientConstructor returned undefined");return a}catch(a){throw console.error(a),Error(`No client constructor found within package: ${this.v3PackageName}`)}}};G=new TextDecoder});var j=u(n=>{"use strict";var _=n&&n.__createBinding||(Object.create?function(i,e,a,r){r===void 0&&(r=a);var t=Object.getOwnPropertyDescriptor(e,a);(!t||("get"in t?!e.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(i,r,t)}:function(i,e,a,r){r===void 0&&(r=a),i[r]=e[a]}),$=n&&n.__exportStar||function(i,e){for(var a in i)a!=="default"&&!Object.prototype.hasOwnProperty.call(e,a)&&_(e,i,a)};Object.defineProperty(n,"__esModule",{value:!0});n.normalizeActionName=n.normalizeServiceName=n.findV3ClientConstructor=n.coerceApiParameters=void 0;var ee=(P(),c(z));Object.defineProperty(n,"coerceApiParameters",{enumerable:!0,get:function(){return ee.coerceApiParameters}});var ie=(k(),c(S));Object.defineProperty(n,"findV3ClientConstructor",{enumerable:!0,get:function(){return ie.findV3ClientConstructor}});var C=(h(),c(X));Object.defineProperty(n,"normalizeServiceName",{enumerable:!0,get:function(){return C.normalizeServiceName}});Object.defineProperty(n,"normalizeActionName",{enumerable:!0,get:function(){return C.normalizeActionName}});$((q(),c(H)),n)});var re={};o(re,{handler:()=>ae});module.exports=c(re);var D=J(j());async function ae(i){console.log("Event: %j",{...i,ResponseURL:"..."});let e=new D.ApiCall(i.service,i.action);console.log(`AWS SDK V3: ${e.v3PackageName}`);try{let a=await e.invoke({parameters:i.parameters??{},apiVersion:i.apiVersion});delete a.$metadata,console.log("Response: %j",a)}catch(a){if(console.log(a),!i.catchErrorPattern||!new RegExp(i.catchErrorPattern).test(a.name))throw a}}0&&(module.exports={handler}); \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/asset.eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.bundle/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle/index.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/asset.eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.bundle/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle/index.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/aws-cdk-aws-api-target-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/aws-cdk-aws-api-target-integ.assets.json index 97af47d6cc955..6ca835b723e4b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/aws-cdk-aws-api-target-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/aws-cdk-aws-api-target-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "2cac8fc73da9ed6d5a3bf770a8dcae5fcf36d1816d0a6de8e240db920411ae4d": { "source": { @@ -14,7 +14,7 @@ } } }, - "8ba69f373d71849859d4fd9e99c821f32a535224a0283841d4a36a4d46248d67": { + "cf5c5df486cd4ea0ef88e964ac3666babbee1de5b8b9bd36b8076a5714eccd89": { "source": { "path": "aws-cdk-aws-api-target-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "8ba69f373d71849859d4fd9e99c821f32a535224a0283841d4a36a4d46248d67.json", + "objectKey": "cf5c5df486cd4ea0ef88e964ac3666babbee1de5b8b9bd36b8076a5714eccd89.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/aws-cdk-aws-api-target-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/aws-cdk-aws-api-target-integ.template.json index 22bb166242c80..26f9338250a43 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/aws-cdk-aws-api-target-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/aws-cdk-aws-api-target-integ.template.json @@ -29,6 +29,27 @@ ] } }, + "ScheduleRuleScheduleRuleTarget0HandlerinlinePolicyAddedToExecutionRole060ECCF6C": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "ecs:UpdateService", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ScheduleRuleScheduleRuleTarget0HandlerinlinePolicyAddedToExecutionRole060ECCF6C", + "Roles": [ + { + "Ref": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" + } + ] + } + }, "ScheduleRuleAllowEventRuleawscdkawsapitargetintegScheduleRuleScheduleRuleTarget0HandlerF2C0C898874A4805": { "Type": "AWS::Lambda::Permission", "Properties": { @@ -48,6 +69,27 @@ } } }, + "ScheduleRuleScheduleRuleTarget1HandlerinlinePolicyAddedToExecutionRole026BB6AFF": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "rds:StopDBInstance", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ScheduleRuleScheduleRuleTarget1HandlerinlinePolicyAddedToExecutionRole026BB6AFF", + "Roles": [ + { + "Ref": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" + } + ] + } + }, "ScheduleRuleAllowEventRuleawscdkawsapitargetintegScheduleRuleScheduleRuleTarget1Handler4688817C0179F894": { "Type": "AWS::Lambda::Permission", "Properties": { @@ -98,32 +140,6 @@ ] } }, - "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRoleDefaultPolicy4D43A7C1": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "ecs:UpdateService", - "kms:Encrypt", - "rds:StopDBInstance", - "ssm:PutParameter" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRoleDefaultPolicy4D43A7C1", - "Roles": [ - { - "Ref": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" - } - ] - } - }, "AWSb4cf1abd4e4f4bc699441af7ccd9ec371511E620": { "Type": "AWS::Lambda::Function", "Properties": { @@ -153,7 +169,6 @@ "Timeout": 60 }, "DependsOn": [ - "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRoleDefaultPolicy4D43A7C1", "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" ] }, @@ -207,6 +222,30 @@ "TestParameter95DD6E25" ] }, + "UpdateSSMRuleUpdateSSMRuleTarget0HandlerinlinePolicyAddedToExecutionRole06C9883FF": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "ssm:PutParameter", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "UpdateSSMRuleUpdateSSMRuleTarget0HandlerinlinePolicyAddedToExecutionRole06C9883FF", + "Roles": [ + { + "Ref": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" + } + ] + }, + "DependsOn": [ + "TestParameter95DD6E25" + ] + }, "UpdateSSMRuleAllowEventRuleawscdkawsapitargetintegUpdateSSMRuleUpdateSSMRuleTarget0Handler573B788B9ACEE6B4": { "Type": "AWS::Lambda::Permission", "Properties": { @@ -303,6 +342,27 @@ ] } }, + "EncryptDataRuleEncryptDataRuleTarget0HandlerinlinePolicyAddedToExecutionRole05E262763": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "kms:Encrypt", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EncryptDataRuleEncryptDataRuleTarget0HandlerinlinePolicyAddedToExecutionRole05E262763", + "Roles": [ + { + "Ref": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" + } + ] + } + }, "EncryptDataRuleAllowEventRuleawscdkawsapitargetintegEncryptDataRuleEncryptDataRuleTarget0HandlerC3017ED86520046E": { "Type": "AWS::Lambda::Permission", "Properties": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/awsapiintegDefaultTestDeployAssertBB35B14E.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/awsapiintegDefaultTestDeployAssertBB35B14E.assets.json index b4086ec796a95..48c0d08c52e90 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/awsapiintegDefaultTestDeployAssertBB35B14E.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/awsapiintegDefaultTestDeployAssertBB35B14E.assets.json @@ -1,20 +1,20 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a": { + "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd": { "source": { - "path": "asset.eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.bundle", + "path": "asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.zip", + "objectKey": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "52476d5be032a0785e26c75846e13f42f58187ef5868c9b4d919f530e586cf43": { + "88529e43e2e9adab7f0d5a2358390c3040cdc1b38015184e4586bc67b70896da": { "source": { "path": "awsapiintegDefaultTestDeployAssertBB35B14E.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "52476d5be032a0785e26c75846e13f42f58187ef5868c9b4d919f530e586cf43.json", + "objectKey": "88529e43e2e9adab7f0d5a2358390c3040cdc1b38015184e4586bc67b70896da.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/awsapiintegDefaultTestDeployAssertBB35B14E.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/awsapiintegDefaultTestDeployAssertBB35B14E.template.json index b1353a3f19f77..31f37089c71ef 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/awsapiintegDefaultTestDeployAssertBB35B14E.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/awsapiintegDefaultTestDeployAssertBB35B14E.template.json @@ -30,7 +30,7 @@ } }, "flattenResponse": "false", - "salt": "1720061670557" + "salt": "1738535766658" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -119,7 +119,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -166,7 +166,7 @@ "Parameter.Value", "Parameter.Value" ], - "salt": "1720061670558" + "salt": "1738535766659" }, "DependsOn": [ "AwsApiCallEventBridgeputEvents13ba168ed67d6e97ff2c94cc14e4d276" @@ -358,7 +358,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.isComplete", @@ -408,7 +408,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.onTimeout", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/integ.json index a32c9a43cb811..a176cc586bed5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "aws-api-integ/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/manifest.json index 57760bc9cef24..6a1d4492f99ba 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "aws-cdk-aws-api-target-integ.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8ba69f373d71849859d4fd9e99c821f32a535224a0283841d4a36a4d46248d67.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cf5c5df486cd4ea0ef88e964ac3666babbee1de5b8b9bd36b8076a5714eccd89.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -40,12 +40,24 @@ "data": "ScheduleRuleDA5BD877" } ], + "/aws-cdk-aws-api-target-integ/ScheduleRule/ScheduleRuleTarget0Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ScheduleRuleScheduleRuleTarget0HandlerinlinePolicyAddedToExecutionRole060ECCF6C" + } + ], "/aws-cdk-aws-api-target-integ/ScheduleRule/AllowEventRuleawscdkawsapitargetintegScheduleRuleScheduleRuleTarget0HandlerF2C0C898": [ { "type": "aws:cdk:logicalId", "data": "ScheduleRuleAllowEventRuleawscdkawsapitargetintegScheduleRuleScheduleRuleTarget0HandlerF2C0C898874A4805" } ], + "/aws-cdk-aws-api-target-integ/ScheduleRule/ScheduleRuleTarget1Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ScheduleRuleScheduleRuleTarget1HandlerinlinePolicyAddedToExecutionRole026BB6AFF" + } + ], "/aws-cdk-aws-api-target-integ/ScheduleRule/AllowEventRuleawscdkawsapitargetintegScheduleRuleScheduleRuleTarget1Handler4688817C": [ { "type": "aws:cdk:logicalId", @@ -58,16 +70,44 @@ "data": "LatestNodeRuntimeMap" } ], - "/aws-cdk-aws-api-target-integ/AWSb4cf1abd4e4f4bc699441af7ccd9ec37/ServiceRole/Resource": [ + "/aws-cdk-aws-api-target-integ/AWSb4cf1abd4e4f4bc699441af7ccd9ec37": [ { - "type": "aws:cdk:logicalId", - "data": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" + "type": "aws:cdk:is-custom-resource-handler-singleton", + "data": true + }, + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 0 + }, + { + "type": "aws:cdk:is-custom-resource-handler-singleton", + "data": true + }, + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 0 + }, + { + "type": "aws:cdk:is-custom-resource-handler-singleton", + "data": true + }, + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 0 + }, + { + "type": "aws:cdk:is-custom-resource-handler-singleton", + "data": true + }, + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 0 } ], - "/aws-cdk-aws-api-target-integ/AWSb4cf1abd4e4f4bc699441af7ccd9ec37/ServiceRole/DefaultPolicy/Resource": [ + "/aws-cdk-aws-api-target-integ/AWSb4cf1abd4e4f4bc699441af7ccd9ec37/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", - "data": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRoleDefaultPolicy4D43A7C1" + "data": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" } ], "/aws-cdk-aws-api-target-integ/AWSb4cf1abd4e4f4bc699441af7ccd9ec37/Resource": [ @@ -88,6 +128,12 @@ "data": "UpdateSSMRule6532685F" } ], + "/aws-cdk-aws-api-target-integ/UpdateSSMRule/UpdateSSMRuleTarget0Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "UpdateSSMRuleUpdateSSMRuleTarget0HandlerinlinePolicyAddedToExecutionRole06C9883FF" + } + ], "/aws-cdk-aws-api-target-integ/UpdateSSMRule/AllowEventRuleawscdkawsapitargetintegUpdateSSMRuleUpdateSSMRuleTarget0Handler573B788B": [ { "type": "aws:cdk:logicalId", @@ -106,6 +152,12 @@ "data": "EncryptDataRule79774425" } ], + "/aws-cdk-aws-api-target-integ/EncryptDataRule/EncryptDataRuleTarget0Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EncryptDataRuleEncryptDataRuleTarget0HandlerinlinePolicyAddedToExecutionRole05E262763" + } + ], "/aws-cdk-aws-api-target-integ/EncryptDataRule/AllowEventRuleawscdkawsapitargetintegEncryptDataRuleEncryptDataRuleTarget0HandlerC3017ED8": [ { "type": "aws:cdk:logicalId", @@ -135,6 +187,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRoleDefaultPolicy4D43A7C1": [ + { + "type": "aws:cdk:logicalId", + "data": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRoleDefaultPolicy4D43A7C1", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-cdk-aws-api-target-integ" @@ -156,7 +217,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/52476d5be032a0785e26c75846e13f42f58187ef5868c9b4d919f530e586cf43.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/88529e43e2e9adab7f0d5a2358390c3040cdc1b38015184e4586bc67b70896da.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/tree.json index 6ee69353e18e6..4d48c72159916 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/aws-api/integ.aws-api.js.snapshot/tree.json @@ -52,6 +52,47 @@ "ScheduleRuleTarget0Handler": { "id": "ScheduleRuleTarget0Handler", "path": "aws-cdk-aws-api-target-integ/ScheduleRule/ScheduleRuleTarget0Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-aws-api-target-integ/ScheduleRule/ScheduleRuleTarget0Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-aws-api-target-integ/ScheduleRule/ScheduleRuleTarget0Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "ecs:UpdateService", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ScheduleRuleScheduleRuleTarget0HandlerinlinePolicyAddedToExecutionRole060ECCF6C", + "roles": [ + { + "Ref": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", "version": "0.0.0" @@ -87,6 +128,47 @@ "ScheduleRuleTarget1Handler": { "id": "ScheduleRuleTarget1Handler", "path": "aws-cdk-aws-api-target-integ/ScheduleRule/ScheduleRuleTarget1Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-aws-api-target-integ/ScheduleRule/ScheduleRuleTarget1Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-aws-api-target-integ/ScheduleRule/ScheduleRuleTarget1Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "rds:StopDBInstance", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ScheduleRuleScheduleRuleTarget1HandlerinlinePolicyAddedToExecutionRole026BB6AFF", + "roles": [ + { + "Ref": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", "version": "0.0.0" @@ -187,50 +269,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-aws-api-target-integ/AWSb4cf1abd4e4f4bc699441af7ccd9ec37/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-aws-api-target-integ/AWSb4cf1abd4e4f4bc699441af7ccd9ec37/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ecs:UpdateService", - "kms:Encrypt", - "rds:StopDBInstance", - "ssm:PutParameter" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRoleDefaultPolicy4D43A7C1", - "roles": [ - { - "Ref": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -387,6 +425,47 @@ "UpdateSSMRuleTarget0Handler": { "id": "UpdateSSMRuleTarget0Handler", "path": "aws-cdk-aws-api-target-integ/UpdateSSMRule/UpdateSSMRuleTarget0Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-aws-api-target-integ/UpdateSSMRule/UpdateSSMRuleTarget0Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-aws-api-target-integ/UpdateSSMRule/UpdateSSMRuleTarget0Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "ssm:PutParameter", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "UpdateSSMRuleUpdateSSMRuleTarget0HandlerinlinePolicyAddedToExecutionRole06C9883FF", + "roles": [ + { + "Ref": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", "version": "0.0.0" @@ -530,6 +609,47 @@ "EncryptDataRuleTarget0Handler": { "id": "EncryptDataRuleTarget0Handler", "path": "aws-cdk-aws-api-target-integ/EncryptDataRule/EncryptDataRuleTarget0Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-aws-api-target-integ/EncryptDataRule/EncryptDataRuleTarget0Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-aws-api-target-integ/EncryptDataRule/EncryptDataRuleTarget0Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "kms:Encrypt", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EncryptDataRuleEncryptDataRuleTarget0HandlerinlinePolicyAddedToExecutionRole05E262763", + "roles": [ + { + "Ref": "AWSb4cf1abd4e4f4bc699441af7ccd9ec37ServiceRole9FFE9C50" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", "version": "0.0.0" @@ -591,7 +711,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "BootstrapVersion": { @@ -629,7 +749,7 @@ "path": "aws-api-integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -649,7 +769,7 @@ "path": "aws-api-integ/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents13ba168ed67d6e97ff2c94cc14e4d276/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, @@ -713,7 +833,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LatestNodeRuntimeMap": { @@ -737,7 +857,7 @@ "path": "aws-api-integ/DefaultTest/DeployAssert/AwsApiCallSSMgetParameter968d20b6d08f54c7f2e797d02863bf0e/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, @@ -777,7 +897,7 @@ "path": "aws-api-integ/DefaultTest/DeployAssert/AwsApiCallSSMgetParameter968d20b6d08f54c7f2e797d02863bf0e/WaitFor/IsCompleteProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "Invoke": { @@ -803,7 +923,7 @@ "path": "aws-api-integ/DefaultTest/DeployAssert/AwsApiCallSSMgetParameter968d20b6d08f54c7f2e797d02863bf0e/WaitFor/TimeoutProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "Invoke": { @@ -887,7 +1007,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a": { @@ -921,7 +1041,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "BootstrapVersion": { @@ -963,7 +1083,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/doc/doc-style.css b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/doc/doc-style.css new file mode 100644 index 0000000000000..2019a1b7659c6 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/doc/doc-style.css @@ -0,0 +1,403 @@ +/* + +Original highlight.js style (c) Ivan Sagalaev + +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} +/* Base color: saturation 0; */ +.hljs, +.hljs-subst { + color: #444; +} +.hljs-comment { + color: #888888; +} +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold; +} +/* User color: hue: 0 */ +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #880000; +} +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060; +} +/* Language color: hue: 90; */ +.hljs-literal { + color: #78A960; +} +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #397300; +} +/* Meta color: hue: 200 */ +.hljs-meta { + color: #1f7199; +} +.hljs-meta-string { + color: #4d99bf; +} +/* Misc effects */ +.hljs-emphasis { + font-style: italic; +} +.hljs-strong { + font-weight: bold; +} +body { + font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; + font-size: 15px; + line-height: 22px; + margin: 0; + padding: 0; + background: #ffffff; + color: #4d4d4d; +} +p, +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0 0 15px 0; +} +h1 { + margin-top: 40px; +} +a { + color: #880000; +} +a:visited { + color: #880000; +} +#tree, +#headings { + position: absolute; + top: 30px; + left: 0; + bottom: 0; + width: 290px; + padding: 10px 0; + overflow: auto; +} +#sidebar_wrapper { + position: fixed; + top: 0; + left: 0; + bottom: 0; + width: 0; + overflow: hidden; + background: #e7e7e7; +} +#sidebar_switch { + position: absolute; + top: 0; + left: 0; + width: 290px; + height: 29px; + border-bottom: 1px solid; + background: #e2e2e2; + border-bottom-color: #d6d6d6; +} +#sidebar_switch span { + display: block; + float: left; + width: 50%; + text-align: center; + line-height: 29px; + cursor: pointer; + color: #4b4b4b; +} +#sidebar_switch span:hover { + background: #e7e7e7; +} +#sidebar_switch .selected { + font-weight: bold; + background: #ededed; + color: #444; +} +.slidey #sidebar_wrapper { + -webkit-transition: width 250ms linear; + -moz-transition: width 250ms linear; + -ms-transition: width 250ms linear; + -o-transition: width 250ms linear; + transition: width 250ms linear; +} +.sidebar #sidebar_wrapper { + width: 290px; +} +#tree .nodename { + text-indent: 12px; + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII="); + background-repeat: no-repeat; + background-position: left center; + cursor: pointer; +} +#tree .open > .nodename { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg=="); + background-position: left 7px; +} +#tree .dir, +#tree .file { + position: relative; + min-height: 20px; + line-height: 20px; + padding-left: 12px; +} +#tree .dir > .children, +#tree .file > .children { + display: none; +} +#tree .dir.open > .children, +#tree .file.open > .children { + display: block; +} +#tree .file { + padding-left: 24px; + display: block; + text-decoration: none; + color: #444; +} +#tree > .dir { + padding-left: 0; +} +#headings .heading a { + text-decoration: none; + padding-left: 10px; + display: block; + color: #444; +} +#headings .h1 { + padding-left: 0; + margin-top: 10px; + font-size: 1.3em; +} +#headings .h2 { + padding-left: 10px; + margin-top: 8px; + font-size: 1.1em; +} +#headings .h3 { + padding-left: 20px; + margin-top: 5px; + font-size: 1em; +} +#headings .h4 { + padding-left: 30px; + margin-top: 3px; + font-size: 0.9em; +} +#headings .h5 { + padding-left: 40px; + margin-top: 1px; + font-size: 0.8em; +} +#headings .h6 { + padding-left: 50px; + font-size: 0.75em; +} +#sidebar-toggle { + position: fixed; + top: 0; + left: 0; + width: 5px; + bottom: 0; + z-index: 2; + cursor: pointer; + background: #dfdfdf; +} +#sidebar-toggle:hover { + width: 10px; + background: #d6d6d6; +} +.slidey #sidebar-toggle, +.slidey #container { + -webkit-transition: all 250ms linear; + -moz-transition: all 250ms linear; + -ms-transition: all 250ms linear; + -o-transition: all 250ms linear; + transition: all 250ms linear; +} +.sidebar #sidebar-toggle { + left: 290px; +} +#container { + position: fixed; + left: 5px; + right: 0; + top: 0; + bottom: 0; + overflow: auto; +} +.sidebar #container { + left: 295px; +} +.no-sidebar #sidebar_wrapper, +.no-sidebar #sidebar-toggle { + display: none; +} +.no-sidebar #container { + left: 0; +} +#page { + padding-top: 40px; +} +table td { + border: 0; + outline: 0; +} +.docs.markdown { + padding: 10px 50px; +} +td.docs { + max-width: 450px; + min-width: 450px; + min-height: 5px; + padding: 10px 25px 1px 50px; + overflow-x: hidden; + vertical-align: top; + text-align: left; +} +.docs pre { + margin: 15px 0 15px; + padding: 5px; + padding-left: 10px; + border: 1px solid #d6d6d6; + background: #F0F0F0; + font-size: 12px; + overflow: auto; +} +.docs pre.code_stats { + font-size: 60%; +} +.docs p tt, +.docs li tt, +.docs p code, +.docs li code { + border: 1px solid #d6d6d6; + font-size: 12px; + padding: 0 0.2em; + background: #e7e7e7; +} +.dox { + border-top: 1px solid #dddddd; + padding-top: 10px; + padding-bottom: 10px; +} +.dox .details { + padding: 10px; + background: #F0F0F0; + border: 1px solid #d6d6d6; + margin-bottom: 10px; +} +.dox .dox_tag_title { + font-weight: bold; +} +.dox .dox_tag_detail { + margin-left: 10px; +} +.dox .dox_tag_detail span { + margin-right: 5px; +} +.dox .dox_type { + font-style: italic; +} +.dox .dox_tag_name { + font-weight: bold; +} +.pilwrap { + position: relative; + padding-top: 1px; +} +.pilwrap .pilcrow { + font: 12px Arial; + text-decoration: none; + color: #454545; + position: absolute; + left: -20px; + padding: 1px 2px; + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -ms-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + color: #555555; +} +.pilwrap .pilcrow:before { + content: '\b6'; +} +.pilwrap:hover .pilcrow { + opacity: 1; +} +td.code { + padding: 8px 15px 8px 25px; + width: 100%; + vertical-align: top; + border-left: 1px solid #d6d6d6; + background: #F0F0F0; +} +.background { + border-left: 1px solid #d6d6d6; + position: absolute; + z-index: -1; + top: 0; + right: 0; + bottom: 0; + left: 525px; + background: #F0F0F0; +} +pre, +tt, +code { + font-size: 12px; + line-height: 18px; + font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; + margin: 0; + padding: 0; + white-space: pre-wrap; + background: #F0F0F0; +} +.line-num { + display: inline-block; + width: 50px; + text-align: right; + opacity: 0.3; + margin-left: -20px; + text-decoration: none; + color: #888888; +} +.line-num:before { + content: attr(data-line); +} diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/EcsTestDefaultTestDeployAssert8B2741C4.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/EcsTestDefaultTestDeployAssert8B2741C4.assets.json index a8157b72463ac..0ae13e6e6f145 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/EcsTestDefaultTestDeployAssert8B2741C4.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/EcsTestDefaultTestDeployAssert8B2741C4.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/aws-ecs-integ-ecs.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/aws-ecs-integ-ecs.assets.json index d3154cd6e7128..0873995143f8c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/aws-ecs-integ-ecs.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/aws-ecs-integ-ecs.assets.json @@ -1,7 +1,7 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "a45a7e9ee8f6a0851fc55369fe78d110df956cb96319d5c3d73d3d818d94c041": { + "f6fedd99e21807e94daaf45b5ca1f76789a92726a171a4a465ed05daf3228bcd": { "source": { "path": "aws-ecs-integ-ecs.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a45a7e9ee8f6a0851fc55369fe78d110df956cb96319d5c3d73d3d818d94c041.json", + "objectKey": "f6fedd99e21807e94daaf45b5ca1f76789a92726a171a4a465ed05daf3228bcd.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/aws-ecs-integ-ecs.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/aws-ecs-integ-ecs.template.json index 27b833b65a416..3c2b599c71bbf 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/aws-ecs-integ-ecs.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/aws-ecs-integ-ecs.template.json @@ -484,7 +484,71 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396": { + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "EcsCluster97242B84" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + ] + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" + } + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -498,7 +562,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -525,13 +605,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -545,7 +639,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "Roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -563,7 +673,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", "Roles": [ { "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" @@ -571,69 +681,38 @@ ] } }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E": { - "Type": "AWS::Lambda::Function", + "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "EcsCluster97242B84" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "Roles": [ { - "Key": "Name", - "Value": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup" + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - ] - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawsecsintegecsEcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic0C4958AFBA77E328": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } - } - }, - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionE17A5F5E", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4" - } + ] } }, "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicACD2D4A4": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/integ.json index bc94f6a9998c9..2518dd48c6297 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "EcsTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/manifest.json index dec09707d31a5..3a12d99927206 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "aws-ecs-integ-ecs.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a45a7e9ee8f6a0851fc55369fe78d110df956cb96319d5c3d73d3d818d94c041.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f6fedd99e21807e94daaf45b5ca1f76789a92726a171a4a465ed05daf3228bcd.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -112,6 +112,27 @@ "data": "VpcVPCGWBF912B6E" } ], + "/aws-ecs-integ-ecs/EcsCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]", + "trace": [ + "Annotations.addMessage (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:135:29)", + "Annotations.addWarningV2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:66:18)", + "Cluster.handleCanContainersAccessInstanceRoleForAL2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:581:47)", + "Cluster.configureAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:486:26)", + "Cluster.addAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:452:14)", + "Cluster.addCapacity (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:405:14)", + "Object. (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js:20:9)", + "Module._compile (node:internal/modules/cjs/loader:1256:14)", + "Module._extensions..js (node:internal/modules/cjs/loader:1310:10)", + "Module.load (node:internal/modules/cjs/loader:1119:32)", + "Module._load (node:internal/modules/cjs/loader:960:12)", + "Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)", + "node:internal/main/run_main_module:23:47" + ] + } + ], "/aws-ecs-integ-ecs/EcsCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -160,12 +181,6 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" } ], - "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396" - } - ], "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -184,6 +199,36 @@ "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic8F34E394" } ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC" + } + ], + "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3" + } + ], "/aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/tree.json index 333a699b5a393..426ed9a4550de 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/ecs/integ.event-ec2-task.js.snapshot/tree.json @@ -771,111 +771,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396", - "roles": [ - { - "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -977,6 +872,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "EcsClusterDefaultAutoScalingGroupASGC1A785DB" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19CB19D22", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole25F218D50", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole30F54BDDC", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-ecs-integ-ecs/EcsCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole4C9B545F3", + "roles": [ + { + "Ref": "EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -987,7 +1139,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1770,7 +1922,7 @@ "path": "EcsTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1816,7 +1968,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.assets.json index 9294b843e11e9..274fbec00d558 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.assets.json @@ -14,7 +14,7 @@ } } }, - "106852c8e0fc570a21634644053cb39ee11e3af80576e3c9ef92746dda7f8b5b": { + "dc31082d9bbea7e2a02c874799c27fcc09d8337e8784ba92420570aee42d833b": { "source": { "path": "LogGroupDefaultTestDeployAssert353EE07A.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "106852c8e0fc570a21634644053cb39ee11e3af80576e3c9ef92746dda7f8b5b.json", + "objectKey": "dc31082d9bbea7e2a02c874799c27fcc09d8337e8784ba92420570aee42d833b.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.template.json index 63f5e816a70f9..6b7b4ce480db8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/LogGroupDefaultTestDeployAssert353EE07A.template.json @@ -1,6 +1,6 @@ { "Resources": { - "AwsApiCallEventBridgeputEvents8b1c88915a4a579fffb75da7180f9f83": { + "AwsApiCallEventBridgeputEvents553bf9107bb038682ce514ab06253825": { "Type": "Custom::DeployAssert@SdkCallEventBridgeputEvents", "Properties": { "ServiceToken": { @@ -12,10 +12,10 @@ "service": "EventBridge", "api": "putEvents", "parameters": { - "Entries": "[{\"Detail\":\"{\\\"date\\\":\\\"abc1737590864295\\\"}\",\"DetailType\":\"cdk-integ-custom-rule\",\"Source\":\"cdk-integ\"}]" + "Entries": "[{\"Detail\":\"{\\\"date\\\":\\\"abc1738609866047\\\"}\",\"DetailType\":\"cdk-integ-custom-rule\",\"Source\":\"cdk-integ\"}]" }, "flattenResponse": "false", - "salt": "1737590864309" + "salt": "1738609866054" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -107,7 +107,7 @@ } } }, - "AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f": { + "AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f": { "Type": "Custom::DeployAssert@SdkCallCloudWatchLogsfilterLogEvents", "Properties": { "ServiceToken": { @@ -118,7 +118,7 @@ }, "service": "CloudWatchLogs", "api": "filterLogEvents", - "expected": "{\"$StringLike\":\"abc1737590864295\"}", + "expected": "{\"$StringLike\":\"abc1738609866047\"}", "actualPath": "events.0.message", "parameters": { "logGroupName": { @@ -133,17 +133,17 @@ ] ] }, - "startTime": "1737590864295", + "startTime": "1738609866047", "limit": "1" }, "flattenResponse": "true", "outputPaths": [ "events.0.message" ], - "salt": "1737590864310" + "salt": "1738609866054" }, "DependsOn": [ - "AwsApiCallEventBridgeputEvents8b1c88915a4a579fffb75da7180f9f83" + "AwsApiCallEventBridgeputEvents553bf9107bb038682ce514ab06253825" ], "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -274,10 +274,10 @@ } }, "Outputs": { - "AssertionResultsAwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f": { + "AssertionResultsAwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f": { "Value": { "Fn::GetAtt": [ - "AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f", + "AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f", "assertion" ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/asset.cde607091ceabfbfb56e643cd4a5647680cfaf19c63f4d59b3f4880df4a71c8d/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/asset.9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec/index.js similarity index 99% rename from packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/asset.cde607091ceabfbfb56e643cd4a5647680cfaf19c63f4d59b3f4880df4a71c8d/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/asset.9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec/index.js index b8736f86c3c65..5b4d962c43a0d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/asset.cde607091ceabfbfb56e643cd4a5647680cfaf19c63f4d59b3f4880df4a71c8d/index.js +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/asset.9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec/index.js @@ -1 +1 @@ -"use strict";var $=Object.create;var x=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var re=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty;var l=(e,i)=>()=>(e&&(i=e(e=0)),i);var w=(e,i)=>()=>(i||e((i={exports:{}}).exports,i),i.exports),u=(e,i)=>{for(var r in i)x(e,r,{get:i[r],enumerable:!0})},H=(e,i,r,a)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of ie(i))!ae.call(e,t)&&t!==r&&x(e,t,{get:()=>i[t],enumerable:!(a=ee(i,t))||a.enumerable});return e};var v=(e,i,r)=>(r=e!=null?$(re(e)):{},H(i||!e||!e.__esModule?x(r,"default",{value:e,enumerable:!0}):r,e)),p=e=>H(x({},"__esModule",{value:!0}),e);var q,S,R=l(()=>{"use strict";q=v(require("zlib")),S=()=>{let i=JSON.parse(q.brotliDecompressSync(Buffer.from("WwTvNRth5aS3wrMDte4UUjGpf58zaoly20sA3YFARNYeg5Tq6bgxBhJcWuvmFN8uDiWSsZWGl5gGXZ36WmpsHBsvRthrgqs8/kcaDLUxMcJeE4x6tenG38HElMLrANt1QBhS0sjELM0hz9rqMl+n/LSz329lG4V9gB5ukWQIKRYdX3//MKV54rY9XyFBkRCPmLCbIguRYLFe1fyqd1GFXF5wkEPSOfwSwJIwnxbD/TNLiXfXNLPrXWVSdHySsEBiWJB96fj0ZGSsAL6beIOt33hBYr36alWfoot8n5qSbIexFPFE2vfplsSI3CeQg2AXcnBYcEtdqPyNVaql/iMQ5N0vQJ4zQaxMCqIzCY+Sz6Lf7tmFDobUgc834Jl6UsaZ5Rvvk1Q+SHP53/e9aV/DvP7e4QUEh9w9KAU/U6H/03Jck0E+PID6bFwdSYUqQqL9yTRw1jpnm/wB71kRgMOSgLtbiRRpFlJkmJUismnPPvvc9+5rnELjpAC4K4KiZL+iyyZ+VhdWs97mZTUc1HgGuOubUdUqcqT6NSv4/1f3b21AsYe4q2VZQeqK+Gz5huiHqZ1ZveAFeQC7gX/z5MqgEtRy8rIh/N4FaObbdTicsA0KbZpMe7TLM55dQ0qjGXS+7F2edaKf8JJSIcQm3e3la/WVd3P3hL83BqyQjARC6r1b9qK9c699b0vi5PMsCcCAMcYgJLrNn8ofHW+EpP0skjzwxnjKWfam9Zvp7DuapPmsxWHMKST5wuBlv6++P3b3nN1bj66/HZPAW0VEhBDv/t4v+//tJDP3rK6urr8bSwIDxviNQQjNur+rZn/D+B99aMv5pNW/RNNPM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QJaVClqv/ZWvBwGB1fxVKScSL/010AvDl//alhAS7iS2FvycMw/3OWX36Xr8nwVTb5XZceudtAPDuV3UDmyITkLwnnoWu7cgk2HKq4jzdOinQPNik6l9BvexeuNIv6KKhexaUou9gGkzAgN/Y5pIJnSPqIBIogpcgPlR6bggk6zCr4qRJtyERu56JEA19whA4GLPcG4X3/J4n8HEMGhhlT2D7CNzAlm/JfZN4tnhnZj6OtCAdX2Onvxtd2WR6kPYF77WWutDXYAMF7j7N2YOLpDqm2oIrpSmjJ29EijTpy0MZFEo9Avjo++AHh1WwNYMSDBqkp30T7I3+oDK/WMJDa9OPeLpO/j749+jTfXDPTN+Vz3dJAnD6K/Q7VEx+itVCYHadAK8x896G0moCbk3kEAYw3cap8DIpII7xdWozsWqFl3ahiYBPHvMLIgdf/EY9uR1yDS3yiMAbu4iRXYasn49rFMZlAK5Ag+6KsBLJl4lNAHWMy2OhmuRod+kyzBe3j/pQilv09PpokoQjXIEntTpGqILAzmOwQe83jNUnY1Uvj+InKbJl9efKWK5r+saZ33ttJQDaLSFiUopBSMkOSI/oCYFR/M9Mgg4WQeli/OvB31Zjg3eTisZRg0BNXBX+o+ch1EHtb/pTKY99/vcJ7fMiX0eBkIwrSPiP1sbZbxQ0u0zwBD3C50PdJYOz5k4=","base64")).toString());return S=()=>i,i}});var D={};u(D,{Coercer:()=>k,coerceApiParameters:()=>J});function J(e,i,r={}){let a=S();return new k(a).coerceApiParameters(e,i,r)}function te(e){return e instanceof Uint8Array?e:typeof e=="string"||typeof e=="number"?new TextEncoder().encode(e.toString()):e}function ne(e){if(typeof e=="number")return e;if(typeof e=="string"){let i=Number(e);return isNaN(i)?e:i}return e}function se(e){if(typeof e=="string"||typeof e=="number"){let i=new Date(e);return isNaN(i.getTime())?e:i}return e}var k,N=l(()=>{"use strict";R();k=class{constructor(i){this.typeMachine=i}coerceApiParameters(i,r,a={}){let t=this.progress(r.toLowerCase(),this.progress(i.toLowerCase(),0));return this.recurse(a,t)}testCoerce(i){return this.recurse(i,0)}recurse(i,r){switch(r){case void 0:return i;case"b":return te(i);case"n":return ne(i);case"d":return se(i)}if(Array.isArray(i)){let a=this.progress("*",r);return a!==void 0?i.map(t=>this.recurse(t,a)):i}if(i&&typeof i=="object"){let a=this.progress("*",r);for(let t of Object.keys(i)){let s=this.progress(t,r)??a;s!==void 0&&(i[t]=this.recurse(i[t],s))}return i}return i}progress(i,r){if(!(r===void 0||typeof r!="number"))return this.typeMachine[r][i]}}});var j={};u(j,{findV3ClientConstructor:()=>U});function U(e){let[i,r]=Object.entries(e).find(([a])=>a.endsWith("Client")&&a!=="__Client");return r}var z=l(()=>{"use strict"});var K=w((Ne,oe)=>{oe.exports={acmpca:"acm-pca",apigateway:"api-gateway",arczonalshift:"arc-zonal-shift",alexaforbusiness:"alexa-for-business",appmesh:"app-mesh",applicationautoscaling:"application-auto-scaling",applicationinsights:"application-insights",augmentedairuntime:"sage-maker-a2iruntime",autoscaling:"auto-scaling",autoscalingplans:"auto-scaling-plans",backupgateway:"backup-gateway",bedrockruntime:"bedrock-runtime",cur:"cost-and-usage-report-service",chimesdkidentity:"chime-sdk-identity",chimesdkmediapipelines:"chime-sdk-media-pipelines",chimesdkmeetings:"chime-sdk-meetings",chimesdkmessaging:"chime-sdk-messaging",chimesdkvoice:"chime-sdk-voice",cloudhsmv2:"cloudhsm-v2",cloudsearchdomain:"cloudsearch-domain",cloudtraildata:"cloudtrail-data",cloudwatchevents:"cloudwatch-events",cloudwatchlogs:"cloudwatch-logs",codegurureviewer:"codeguru-reviewer",codegurusecurity:"codeguru-security",codestarnotifications:"codestar-notifications",codestarconnections:"codestar-connections",cognitoidentity:"cognito-identity",cognitoidentityserviceprovider:"cognito-identity-provider",cognitosync:"cognito-sync",computeoptimizer:"compute-optimizer",configservice:"config-service",connectcontactlens:"connect-contact-lens",costexplorer:"cost-explorer",customerprofiles:"customer-profiles",dms:"database-migration-service",datapipeline:"data-pipeline",devopsguru:"devops-guru",devicefarm:"device-farm",directconnect:"direct-connect",directoryservice:"directory-service",discovery:"application-discovery-service",docdbelastic:"docdb-elastic",dynamodbstreams:"dynamodb-streams",ec2instanceconnect:"ec2-instance-connect",ecrpublic:"ecr-public",elb:"elastic-load-balancing",elbv2:"elastic-load-balancing-v2",emrserverless:"emr-serverless",emrcontainers:"emr-containers",es:"elasticsearch-service",elasticbeanstalk:"elastic-beanstalk",elasticinference:"elastic-inference",elastictranscoder:"elastic-transcoder",finspacedata:"finspace-data",forecastqueryservice:"forecastquery",forecastservice:"forecast",globalaccelerator:"global-accelerator",iot1clickdevicesservice:"iot-1click-devices-service",iot1clickprojects:"iot-1click-projects",iotevents:"iot-events",ioteventsdata:"iot-events-data",iotjobsdataplane:"iot-jobs-data-plane",iotroborunner:"iot-roborunner",iotwireless:"iot-wireless",iotdata:"iot-data-plane",ivsrealtime:"ivs-realtime",kendraranking:"kendra-ranking",kinesisanalytics:"kinesis-analytics",kinesisanalyticsv2:"kinesis-analytics-v2",kinesisvideo:"kinesis-video",kinesisvideoarchivedmedia:"kinesis-video-archived-media",kinesisvideomedia:"kinesis-video-media",kinesisvideosignalingchannels:"kinesis-video-signaling",kinesisvideowebrtcstorage:"kinesis-video-webrtc-storage",launchwizard:"launch-wizard",lexmodelbuildingservice:"lex-model-building-service",lexmodelsv2:"lex-models-v2",lexruntime:"lex-runtime-service",lexruntimev2:"lex-runtime-v2",licensemanager:"license-manager",licensemanagerlinuxsubscriptions:"license-manager-linux-subscriptions",licensemanagerusersubscriptions:"license-manager-user-subscriptions",machinelearning:"machine-learning",managedblockchainquery:"managedblockchain-query",marketplacecatalog:"marketplace-catalog",marketplacecommerceanalytics:"marketplace-commerce-analytics",marketplaceentitlementservice:"marketplace-entitlement-service",marketplacemetering:"marketplace-metering",mediapackagevod:"mediapackage-vod",mediastoredata:"mediastore-data",medicalimaging:"medical-imaging",memorydb:"memory-db",migrationhub:"migration-hub",migrationhubconfig:"migrationhub-config",migrationhubrefactorspaces:"migration-hub-refactor-spaces",networkfirewall:"network-firewall",paymentcryptography:"payment-cryptography",paymentcryptographydata:"payment-cryptography-data",pcaconnectorad:"pca-connector-ad",personalizeevents:"personalize-events",personalizeruntime:"personalize-runtime",pinpointemail:"pinpoint-email",pinpointsmsvoice:"pinpoint-sms-voice",pinpointsmsvoicev2:"pinpoint-sms-voice-v2",qldbsession:"qldb-session",rdsdataservice:"rds-data",redshiftdata:"redshift-data",redshiftserverless:"redshift-serverless",resourceexplorer2:"resource-explorer-2",resourcegroups:"resource-groups",resourcegroupstaggingapi:"resource-groups-tagging-api",route53:"route-53",route53domains:"route-53-domains",route53recoverycluster:"route53-recovery-cluster",route53recoverycontrolconfig:"route53-recovery-control-config",route53recoveryreadiness:"route53-recovery-readiness",s3control:"s3-control",ssmcontacts:"ssm-contacts",ssmincidents:"ssm-incidents",ssoadmin:"sso-admin",ssooidc:"sso-oidc",sagemakerfeaturestoreruntime:"sagemaker-featurestore-runtime",sagemakergeospatial:"sagemaker-geospatial",sagemakermetrics:"sagemaker-metrics",sagemakerruntime:"sagemaker-runtime",sagemakeredge:"sagemaker-edge",secretsmanager:"secrets-manager",servicecatalog:"service-catalog",servicecatalogappregistry:"service-catalog-appregistry",servicequotas:"service-quotas",snowdevicemanagement:"snow-device-management",ssmsap:"ssm-sap",stepfunctions:"sfn",storagegateway:"storage-gateway",supportapp:"support-app",timestreamquery:"timestream-query",timestreamwrite:"timestream-write",transcribeservice:"transcribe",voiceid:"voice-id",vpclattice:"vpc-lattice",wafregional:"waf-regional",workspacesweb:"workspaces-web"}});var Z=w((Ue,ce)=>{ce.exports={accessanalyzer:{iamPrefix:"access-analyzer"},account:{iamPrefix:"account"},"acm-pca":{iamPrefix:"acm-pca"},acm:{iamPrefix:"acm"},"alexa-for-business":{iamPrefix:"a4b"},amp:{iamPrefix:"aps"},amplify:{iamPrefix:"amplify"},amplifybackend:{iamPrefix:"amplifybackend"},amplifyuibuilder:{iamPrefix:"amplifyuibuilder"},"api-gateway":{iamPrefix:"apigateway"},apigatewaymanagementapi:{iamPrefix:"execute-api"},apigatewayv2:{iamPrefix:"apigateway"},"app-mesh":{iamPrefix:"appmesh"},appconfig:{iamPrefix:"appconfig"},appconfigdata:{iamPrefix:"appconfig"},appfabric:{iamPrefix:"appfabric"},appflow:{iamPrefix:"appflow"},appintegrations:{iamPrefix:"app-integrations"},"application-auto-scaling":{iamPrefix:"application-autoscaling"},"application-discovery-service":{iamPrefix:"discovery"},"application-insights":{iamPrefix:"applicationinsights"},applicationcostprofiler:{iamPrefix:"application-cost-profiler"},apprunner:{iamPrefix:"apprunner"},appstream:{iamPrefix:"appstream"},appsync:{iamPrefix:"appsync"},"arc-zonal-shift":{iamPrefix:"arc-zonal-shift"},athena:{iamPrefix:"athena"},auditmanager:{iamPrefix:"auditmanager"},"auto-scaling-plans":{iamPrefix:"autoscaling-plans"},"auto-scaling":{iamPrefix:"autoscaling"},b2bi:{iamPrefix:"b2bi"},"backup-gateway":{iamPrefix:"backup-gateway"},backup:{iamPrefix:"backup"},backupstorage:{iamPrefix:"backup-storage"},batch:{iamPrefix:"batch"},"bcm-data-exports":{iamPrefix:"bcm-data-exports"},"bedrock-agent-runtime":{iamPrefix:"bedrock"},"bedrock-agent":{iamPrefix:"bedrock"},"bedrock-runtime":{iamPrefix:"bedrock"},bedrock:{iamPrefix:"bedrock"},billingconductor:{iamPrefix:"billingconductor"},braket:{iamPrefix:"braket"},budgets:{iamPrefix:"budgets"},"chime-sdk-identity":{iamPrefix:"chime"},"chime-sdk-media-pipelines":{iamPrefix:"chime"},"chime-sdk-meetings":{iamPrefix:"chime"},"chime-sdk-messaging":{iamPrefix:"chime"},"chime-sdk-voice":{iamPrefix:"chime"},chime:{iamPrefix:"chime"},cleanrooms:{iamPrefix:"cleanrooms"},cleanroomsml:{iamPrefix:"cleanrooms-ml"},cloud9:{iamPrefix:"cloud9"},cloudcontrol:{iamPrefix:"cloudcontrolapi"},clouddirectory:{iamPrefix:"clouddirectory"},cloudformation:{iamPrefix:"cloudformation"},"cloudfront-keyvaluestore":{iamPrefix:"cloudfront-keyvaluestore"},cloudfront:{iamPrefix:"cloudfront"},"cloudhsm-v2":{iamPrefix:"cloudhsm"},cloudhsm:{iamPrefix:"cloudhsm"},"cloudsearch-domain":{iamPrefix:"cloudsearch"},cloudsearch:{iamPrefix:"cloudsearch"},"cloudtrail-data":{iamPrefix:"cloudtrail-data"},cloudtrail:{iamPrefix:"cloudtrail"},"cloudwatch-events":{iamPrefix:"events"},"cloudwatch-logs":{iamPrefix:"logs"},cloudwatch:{iamPrefix:"cloudwatch"},codeartifact:{iamPrefix:"codeartifact"},codebuild:{iamPrefix:"codebuild"},codecatalyst:{},codecommit:{iamPrefix:"codecommit"},codedeploy:{iamPrefix:"codedeploy"},"codeguru-reviewer":{iamPrefix:"codeguru-reviewer"},"codeguru-security":{iamPrefix:"codeguru-security"},codeguruprofiler:{iamPrefix:"codeguru-profiler"},codepipeline:{iamPrefix:"codepipeline"},"codestar-connections":{iamPrefix:"codestar-connections"},"codestar-notifications":{iamPrefix:"codestar-notifications"},codestar:{iamPrefix:"codestar"},"cognito-identity-provider":{iamPrefix:"cognito-idp"},"cognito-identity":{iamPrefix:"cognito-identity"},"cognito-sync":{iamPrefix:"cognito-sync"},comprehend:{iamPrefix:"comprehend"},comprehendmedical:{iamPrefix:"comprehendmedical"},"compute-optimizer":{iamPrefix:"compute-optimizer"},"config-service":{iamPrefix:"config"},"connect-contact-lens":{iamPrefix:"connect"},connect:{iamPrefix:"connect"},connectcampaigns:{iamPrefix:"connect-campaigns"},connectcases:{iamPrefix:"cases"},connectparticipant:{iamPrefix:"execute-api"},controltower:{iamPrefix:"controltower"},"cost-and-usage-report-service":{iamPrefix:"cur"},"cost-explorer":{iamPrefix:"ce"},"cost-optimization-hub":{iamPrefix:"cost-optimization-hub"},"customer-profiles":{iamPrefix:"profile"},"data-pipeline":{iamPrefix:"datapipeline"},"database-migration-service":{iamPrefix:"dms"},databrew:{iamPrefix:"databrew"},dataexchange:{iamPrefix:"dataexchange"},datasync:{iamPrefix:"datasync"},datazone:{iamPrefix:"datazone"},dax:{iamPrefix:"dax"},detective:{iamPrefix:"detective"},"device-farm":{iamPrefix:"devicefarm"},"devops-guru":{iamPrefix:"devops-guru"},"direct-connect":{iamPrefix:"directconnect"},"directory-service":{iamPrefix:"ds"},dlm:{iamPrefix:"dlm"},"docdb-elastic":{iamPrefix:"docdb-elastic"},docdb:{iamPrefix:"rds"},drs:{iamPrefix:"drs"},"dynamodb-streams":{iamPrefix:"dynamodb"},dynamodb:{iamPrefix:"dynamodb"},ebs:{iamPrefix:"ebs"},"ec2-instance-connect":{iamPrefix:"ec2-instance-connect"},ec2:{iamPrefix:"ec2"},"ecr-public":{iamPrefix:"ecr-public"},ecr:{iamPrefix:"ecr"},ecs:{iamPrefix:"ecs",commands:["ExecuteCommand"]},efs:{iamPrefix:"elasticfilesystem"},"eks-auth":{iamPrefix:"eks-auth"},eks:{iamPrefix:"eks"},"elastic-beanstalk":{iamPrefix:"elasticbeanstalk"},"elastic-inference":{iamPrefix:"elastic-inference"},"elastic-load-balancing-v2":{iamPrefix:"elasticloadbalancing"},"elastic-load-balancing":{iamPrefix:"elasticloadbalancing"},"elastic-transcoder":{iamPrefix:"elastictranscoder"},elasticache:{iamPrefix:"elasticache"},"elasticsearch-service":{iamPrefix:"es"},"emr-containers":{iamPrefix:"emr-containers"},"emr-serverless":{iamPrefix:"emr-serverless"},emr:{iamPrefix:"elasticmapreduce"},entityresolution:{iamPrefix:"entityresolution"},eventbridge:{iamPrefix:"events"},evidently:{iamPrefix:"evidently"},"finspace-data":{iamPrefix:"finspace-api"},finspace:{iamPrefix:"finspace"},firehose:{iamPrefix:"firehose"},fis:{iamPrefix:"fis"},fms:{iamPrefix:"fms"},forecast:{iamPrefix:"forecast"},forecastquery:{iamPrefix:"forecast"},frauddetector:{iamPrefix:"frauddetector"},freetier:{iamPrefix:"freetier"},fsx:{iamPrefix:"fsx"},gamelift:{iamPrefix:"gamelift"},glacier:{iamPrefix:"glacier"},"global-accelerator":{iamPrefix:"globalaccelerator"},glue:{iamPrefix:"glue"},grafana:{iamPrefix:"grafana"},greengrass:{iamPrefix:"greengrass"},greengrassv2:{iamPrefix:"greengrass"},groundstation:{iamPrefix:"groundstation"},guardduty:{iamPrefix:"guardduty"},health:{iamPrefix:"health"},healthlake:{iamPrefix:"healthlake"},honeycode:{iamPrefix:"honeycode"},iam:{iamPrefix:"iam"},identitystore:{iamPrefix:"identitystore"},imagebuilder:{iamPrefix:"imagebuilder"},"inspector-scan":{iamPrefix:"inspector-scan"},inspector:{iamPrefix:"inspector"},inspector2:{iamPrefix:"inspector2"},internetmonitor:{iamPrefix:"internetmonitor"},"iot-1click-devices-service":{iamPrefix:"iot1click"},"iot-1click-projects":{iamPrefix:"iot1click"},"iot-data-plane":{iamPrefix:"iotdata"},"iot-events-data":{iamPrefix:"ioteventsdata"},"iot-events":{iamPrefix:"iotevents"},"iot-jobs-data-plane":{iamPrefix:"iot-jobs-data"},"iot-roborunner":{iamPrefix:"iotroborunner"},"iot-wireless":{iamPrefix:"iotwireless"},iot:{iamPrefix:"iot"},iotanalytics:{iamPrefix:"iotanalytics"},iotdeviceadvisor:{iamPrefix:"iotdeviceadvisor"},iotfleethub:{iamPrefix:"iotfleethub"},iotfleetwise:{iamPrefix:"iotfleetwise"},iotsecuretunneling:{iamPrefix:"IoTSecuredTunneling"},iotsitewise:{iamPrefix:"iotsitewise"},iotthingsgraph:{iamPrefix:"iotthingsgraph"},iottwinmaker:{iamPrefix:"iottwinmaker"},"ivs-realtime":{iamPrefix:"ivs"},ivs:{iamPrefix:"ivs"},ivschat:{iamPrefix:"ivschat"},kafka:{iamPrefix:"kafka"},kafkaconnect:{iamPrefix:"kafkaconnect"},"kendra-ranking":{iamPrefix:"kendra-ranking"},kendra:{iamPrefix:"kendra"},keyspaces:{iamPrefix:"cassandra"},"kinesis-analytics-v2":{iamPrefix:"kinesisanalytics"},"kinesis-analytics":{iamPrefix:"kinesisanalytics"},"kinesis-video-archived-media":{iamPrefix:"kinesisvideo"},"kinesis-video-media":{iamPrefix:"kinesisvideo"},"kinesis-video-signaling":{iamPrefix:"kinesisvideo"},"kinesis-video-webrtc-storage":{iamPrefix:"kinesisvideo"},"kinesis-video":{iamPrefix:"kinesisvideo"},kinesis:{iamPrefix:"kinesis"},kms:{iamPrefix:"kms"},lakeformation:{iamPrefix:"lakeformation"},lambda:{iamPrefix:"lambda"},"launch-wizard":{iamPrefix:"launchwizard"},"lex-model-building-service":{iamPrefix:"lex"},"lex-models-v2":{iamPrefix:"lex"},"lex-runtime-service":{iamPrefix:"lex"},"lex-runtime-v2":{iamPrefix:"lex"},"license-manager-linux-subscriptions":{iamPrefix:"license-manager-linux-subscriptions"},"license-manager-user-subscriptions":{iamPrefix:"license-manager-user-subscriptions"},"license-manager":{iamPrefix:"license-manager"},lightsail:{iamPrefix:"lightsail"},location:{iamPrefix:"geo"},lookoutequipment:{iamPrefix:"lookoutequipment"},lookoutmetrics:{iamPrefix:"lookoutmetrics"},lookoutvision:{iamPrefix:"lookoutvision"},m2:{iamPrefix:"m2"},"machine-learning":{iamPrefix:"machinelearning"},macie2:{iamPrefix:"macie2"},"managedblockchain-query":{iamPrefix:"managedblockchain-query"},managedblockchain:{iamPrefix:"managedblockchain"},"marketplace-agreement":{iamPrefix:"aws-marketplace"},"marketplace-catalog":{iamPrefix:"aws-marketplace"},"marketplace-commerce-analytics":{iamPrefix:"marketplacecommerceanalytics"},"marketplace-deployment":{iamPrefix:"aws-marketplace"},"marketplace-entitlement-service":{iamPrefix:"aws-marketplace"},"marketplace-metering":{iamPrefix:"aws-marketplace"},mediaconnect:{iamPrefix:"mediaconnect"},mediaconvert:{iamPrefix:"mediaconvert"},medialive:{iamPrefix:"medialive"},"mediapackage-vod":{iamPrefix:"mediapackage-vod"},mediapackage:{iamPrefix:"mediapackage"},mediapackagev2:{iamPrefix:"mediapackagev2"},"mediastore-data":{iamPrefix:"mediastore"},mediastore:{iamPrefix:"mediastore"},mediatailor:{iamPrefix:"mediatailor"},"medical-imaging":{iamPrefix:"medical-imaging"},memorydb:{iamPrefix:"memorydb"},mgn:{iamPrefix:"mgn"},"migration-hub-refactor-spaces":{iamPrefix:"refactor-spaces"},"migration-hub":{iamPrefix:"mgh"},"migrationhub-config":{iamPrefix:"mgh"},migrationhuborchestrator:{iamPrefix:"migrationhub-orchestrator"},migrationhubstrategy:{iamPrefix:"migrationhub-strategy"},mobile:{iamPrefix:"AWSMobileHubService"},mq:{iamPrefix:"mq"},mturk:{iamPrefix:"mturk-requester"},mwaa:{iamPrefix:"airflow"},"neptune-graph":{iamPrefix:"neptune-graph"},neptune:{iamPrefix:"rds"},neptunedata:{iamPrefix:"neptune-db"},"network-firewall":{iamPrefix:"network-firewall"},networkmanager:{iamPrefix:"networkmanager"},networkmonitor:{iamPrefix:"networkmonitor"},nimble:{iamPrefix:"nimble"},oam:{iamPrefix:"oam"},omics:{iamPrefix:"omics"},opensearch:{iamPrefix:"es"},opensearchserverless:{iamPrefix:"aoss"},opsworks:{iamPrefix:"opsworks"},opsworkscm:{iamPrefix:"opsworks-cm"},organizations:{iamPrefix:"organizations"},osis:{iamPrefix:"osis"},outposts:{iamPrefix:"outposts"},panorama:{iamPrefix:"panorama"},"payment-cryptography-data":{iamPrefix:"payment-cryptography"},"payment-cryptography":{iamPrefix:"payment-cryptography"},"pca-connector-ad":{iamPrefix:"pca-connector-ad"},"personalize-events":{iamPrefix:"personalize"},"personalize-runtime":{iamPrefix:"personalize"},personalize:{iamPrefix:"personalize"},pi:{iamPrefix:"pi"},"pinpoint-email":{iamPrefix:"ses"},"pinpoint-sms-voice-v2":{iamPrefix:"sms-voice"},"pinpoint-sms-voice":{iamPrefix:"sms-voice"},pinpoint:{iamPrefix:"mobiletargeting"},pipes:{iamPrefix:"pipes"},polly:{iamPrefix:"polly"},pricing:{iamPrefix:"pricing"},privatenetworks:{iamPrefix:"private-networks"},proton:{iamPrefix:"proton"},qbusiness:{iamPrefix:"qbusiness"},qconnect:{iamPrefix:"wisdom"},"qldb-session":{iamPrefix:"qldb",commands:["SendCommand"]},qldb:{iamPrefix:"qldb"},quicksight:{iamPrefix:"quicksight"},ram:{iamPrefix:"ram"},rbin:{iamPrefix:"rbin"},"rds-data":{iamPrefix:"rds-data"},rds:{iamPrefix:"rds"},"redshift-data":{iamPrefix:"redshift-data"},"redshift-serverless":{iamPrefix:"redshift-serverless"},redshift:{iamPrefix:"redshift"},rekognition:{iamPrefix:"rekognition"},rekognitionstreaming:{iamPrefix:"rekognition"},repostspace:{iamPrefix:"repostspace"},resiliencehub:{iamPrefix:"resiliencehub"},"resource-explorer-2":{iamPrefix:"resource-explorer-2"},"resource-groups-tagging-api":{iamPrefix:"tagging"},"resource-groups":{iamPrefix:"resource-groups"},robomaker:{iamPrefix:"robomaker"},rolesanywhere:{iamPrefix:"rolesanywhere"},"route-53-domains":{iamPrefix:"route53domains"},"route-53":{iamPrefix:"route53"},"route53-recovery-cluster":{iamPrefix:"route53-recovery-cluster"},"route53-recovery-control-config":{iamPrefix:"route53-recovery-control-config"},"route53-recovery-readiness":{iamPrefix:"route53-recovery-readiness"},route53resolver:{iamPrefix:"route53resolver"},rum:{iamPrefix:"rum"},"s3-control":{iamPrefix:"s3"},s3:{iamPrefix:"s3"},s3outposts:{iamPrefix:"s3-outposts"},"sagemaker-a2i-runtime":{iamPrefix:"sagemaker"},"sagemaker-edge":{iamPrefix:"sagemaker"},"sagemaker-featurestore-runtime":{iamPrefix:"sagemaker"},"sagemaker-geospatial":{iamPrefix:"sagemaker-geospatial"},"sagemaker-metrics":{iamPrefix:"sagemaker"},"sagemaker-runtime":{iamPrefix:"sagemaker"},sagemaker:{iamPrefix:"sagemaker"},savingsplans:{iamPrefix:"savingsplans"},scheduler:{iamPrefix:"scheduler"},schemas:{iamPrefix:"schemas"},"secrets-manager":{iamPrefix:"secretsmanager"},securityhub:{iamPrefix:"securityhub"},securitylake:{iamPrefix:"securitylake"},serverlessapplicationrepository:{iamPrefix:"serverlessrepo"},"service-catalog-appregistry":{iamPrefix:"servicecatalog"},"service-catalog":{iamPrefix:"servicecatalog"},"service-quotas":{iamPrefix:"servicequotas"},servicediscovery:{iamPrefix:"servicediscovery"},ses:{iamPrefix:"ses"},sesv2:{iamPrefix:"ses"},sfn:{iamPrefix:"states"},shield:{iamPrefix:"shield"},signer:{iamPrefix:"signer"},simspaceweaver:{iamPrefix:"simspaceweaver"},sms:{iamPrefix:"sms"},"snow-device-management":{iamPrefix:"snow-device-management"},snowball:{iamPrefix:"snowball"},sns:{iamPrefix:"sns"},sqs:{iamPrefix:"sqs"},"ssm-contacts":{iamPrefix:"ssm-contacts"},"ssm-incidents":{iamPrefix:"ssm-incidents"},"ssm-sap":{iamPrefix:"ssm-sap"},ssm:{iamPrefix:"ssm",commands:["CancelCommand","SendCommand"]},"sso-admin":{iamPrefix:"sso"},"sso-oidc":{iamPrefix:"sso-oauth"},sso:{iamPrefix:"awsssoportal"},"storage-gateway":{iamPrefix:"storagegateway"},sts:{iamPrefix:"sts"},supplychain:{iamPrefix:"scn"},"support-app":{iamPrefix:"supportapp"},support:{iamPrefix:"support"},swf:{iamPrefix:"swf"},synthetics:{iamPrefix:"synthetics"},textract:{iamPrefix:"textract"},"timestream-query":{iamPrefix:"timestream"},"timestream-write":{iamPrefix:"timestream"},tnb:{iamPrefix:"tnb"},"transcribe-streaming":{iamPrefix:"transcribe"},transcribe:{iamPrefix:"transcribe"},transfer:{iamPrefix:"transfer"},translate:{iamPrefix:"translate"},trustedadvisor:{iamPrefix:"trustedadvisor"},verifiedpermissions:{iamPrefix:"verifiedpermissions"},"voice-id":{iamPrefix:"voiceid"},"vpc-lattice":{iamPrefix:"vpc-lattice"},"waf-regional":{iamPrefix:"waf-regional"},waf:{iamPrefix:"waf"},wafv2:{iamPrefix:"wafv2"},wellarchitected:{iamPrefix:"wellarchitected"},wisdom:{iamPrefix:"wisdom"},workdocs:{iamPrefix:"workdocs"},worklink:{iamPrefix:"worklink"},workmail:{iamPrefix:"workmail"},workmailmessageflow:{iamPrefix:"workmailmessageflow"},"workspaces-thin-client":{iamPrefix:"thinclient"},"workspaces-web":{iamPrefix:"workspaces-web"},workspaces:{iamPrefix:"workspaces"},xray:{iamPrefix:"xray"}}});var E={};u(E,{normalizeActionName:()=>T,normalizeServiceName:()=>A});function A(e){return e=e.toLowerCase(),e=e.replace(/^@aws-sdk\/client-/,""),e=me()?.[e]??e,e}function T(e,i){return i.charAt(0).toLowerCase()===i.charAt(0)?i.charAt(0).toUpperCase()+i.slice(1):fe()[e]?.commands?.includes(i)?i:i.replace(/Command$/,"")}function me(){return K()}function fe(){return Z()}var O=l(()=>{"use strict"});var Y={};u(Y,{ApiCall:()=>C,coerceSdkv3Response:()=>y,flatten:()=>I});function I(e){let i={};return r(e),i;function r(a,t=[]){if(a&&typeof a=="object"){for(let[s,o]of Object.entries(a))r(o,[...t,s]);return}i[t.join(".")]=a}}async function y(e){if(e&&typeof e=="object"&&typeof e.transformToString=="function")return e.transformToString();if(Buffer.isBuffer(e))return e.toString("utf8");if(ArrayBuffer.isView(e))return de.decode(e.buffer);if(Array.isArray(e)){let i=[];for(let r of e)i.push(await y(r));return i}if(e&&typeof e=="object"){for(let i of Object.keys(e))e[i]=await y(e[i]);return e}return e}var C,de,L=l(()=>{"use strict";N();z();O();C=class{constructor(i,r){this.service=A(i),this.action=T(this.service,r),this.v3PackageName=`@aws-sdk/client-${this.service}`}async invoke(i){this.initializePackage(i.sdkPackage),this.initializeClient(i);let r=this.findCommandClass(),a=await this.client.send(new r(J(this.service,this.action,i.parameters??{})));delete a.$metadata;let t=await y(a);return i.flattenResponse?I(t):t}initializePackage(i){if(!this.v3Package){if(i){this.v3Package=i;return}try{this.v3Package=require(this.v3PackageName)}catch{throw Error(`Service ${this.service} client package with name '${this.v3PackageName}' does not exist.`)}}}initializeClient(i){this.v3Package||this.initializePackage();let r=this.findConstructor(this.v3Package);return this.client=new r({apiVersion:i.apiVersion,credentials:i.credentials,region:i.region}),this.client}findCommandClass(){this.v3Package||this.initializePackage();let i=`${this.action}Command`,r=Object.entries(this.v3Package??{}).find(([a])=>a.toLowerCase()===i.toLowerCase())?.[1];if(!r)throw new Error(`Unable to find command named: ${i} for action: ${this.action} in service package ${this.v3PackageName}`);return r}findConstructor(i){try{let r=U(i);if(!r)throw new Error("findV3ClientConstructor returned undefined");return r}catch(r){throw console.error(r),Error(`No client constructor found within package: ${this.v3PackageName}`)}}};de=new TextDecoder});var W=w(n=>{"use strict";var le=n&&n.__createBinding||(Object.create?function(e,i,r,a){a===void 0&&(a=r);var t=Object.getOwnPropertyDescriptor(i,r);(!t||("get"in t?!i.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return i[r]}}),Object.defineProperty(e,a,t)}:function(e,i,r,a){a===void 0&&(a=r),e[a]=i[r]}),ue=n&&n.__exportStar||function(e,i){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(i,r)&&le(i,e,r)};Object.defineProperty(n,"__esModule",{value:!0});n.normalizeActionName=n.normalizeServiceName=n.findV3ClientConstructor=n.coerceApiParameters=void 0;var pe=(N(),p(D));Object.defineProperty(n,"coerceApiParameters",{enumerable:!0,get:function(){return pe.coerceApiParameters}});var ge=(z(),p(j));Object.defineProperty(n,"findV3ClientConstructor",{enumerable:!0,get:function(){return ge.findV3ClientConstructor}});var M=(O(),p(E));Object.defineProperty(n,"normalizeServiceName",{enumerable:!0,get:function(){return M.normalizeServiceName}});Object.defineProperty(n,"normalizeActionName",{enumerable:!0,get:function(){return M.normalizeActionName}});ue((L(),p(Y)),n)});var he={};u(he,{handler:()=>be});module.exports=p(he);var _=v(W());var Q=require("child_process"),b={};function Pe(e){console.log(`Installing latest AWS SDK v3: ${e}`),(0,Q.execSync)(`NPM_CONFIG_UPDATE_NOTIFIER=false HOME=/tmp npm install ${JSON.stringify(e)} --omit=dev --no-package-lock --no-save --prefix /tmp`),b={...b,[e]:!0}}async function V(e,i){let r;try{if(!b[e]&&i==="true")try{Pe(e),r=require(`/tmp/node_modules/${e}`)}catch(a){return console.log(`Failed to install latest AWS SDK v3. Falling back to pre-installed version. Error: ${a}`),require(e)}else b[e]?r=require(`/tmp/node_modules/${e}`):r=require(e)}catch{throw Error(`Package ${e} does not exist.`)}return r}var xe="PHYSICAL:RESOURCEID:";function B(e,i){return r(e);function r(a){if(a===xe)return i;if(Array.isArray(a))return a.map(r);if(a&&typeof a=="object"){for(let[t,s]of Object.entries(a))a[t]=r(s);return a}return a}}function h(e){if(e)return JSON.parse(e)}function X(e,i,r,a,t,s){let o={Status:i,Reason:r,PhysicalResourceId:a,StackId:e.StackId,RequestId:e.RequestId,LogicalResourceId:e.LogicalResourceId,NoEcho:!1,Data:t};if(s)console.log("Responding",JSON.stringify(o));else{let{Data:c,...f}=o;console.log("Responding",JSON.stringify(f))}let g=require("url").parse(e.ResponseURL),P=JSON.stringify(o),m={hostname:g.hostname,path:g.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(P,"utf8")}};return new Promise((c,f)=>{try{let d=require("https").request(m,c);d.on("error",f),d.write(P),d.end()}catch(d){f(d)}})}async function F(e,i){let r;if(e.assumedRoleArn){let a=new Date().getTime(),t={RoleArn:e.assumedRoleArn,RoleSessionName:`${a}-${i}`.substring(0,64)},{fromTemporaryCredentials:s}=await import("@aws-sdk/credential-providers");r=s({params:t,clientConfig:e.region!==void 0?{region:e.region}:void 0})}return r}function G(e,i){let r;return e.outputPath?r=[e.outputPath]:e.outputPaths&&(r=e.outputPaths),r?ye(i,ke(r)):i}function ke(e){return function(i){for(let r of e)if(i.startsWith(r))return!0;return!1}}function ye(e,i){return Object.entries(e).reduce((r,[a,t])=>i(a)?{...r,[a]:t}:r,{})}async function be(e,i){try{e.ResourceProperties.Create=h(e.ResourceProperties.Create),e.ResourceProperties.Update=h(e.ResourceProperties.Update),e.ResourceProperties.Delete=h(e.ResourceProperties.Delete);let r={},a;switch(e.RequestType){case"Create":a=e.ResourceProperties.Create?.physicalResourceId?.id??e.ResourceProperties.Update?.physicalResourceId?.id??e.ResourceProperties.Delete?.physicalResourceId?.id??e.LogicalResourceId;break;case"Update":case"Delete":a=e.ResourceProperties[e.RequestType]?.physicalResourceId?.id??e.PhysicalResourceId;break}let t=e.ResourceProperties[e.RequestType],s=t?.logApiResponseData??!0;if(t){let o=new _.ApiCall(t.service,t.action),g=await V(o.v3PackageName,e.ResourceProperties.InstallLatestAwsSdk);console.log(JSON.stringify({...e,ResponseURL:"..."}));let P=await F(t,a),m={};try{let c=await o.invoke({sdkPackage:g,apiVersion:t.apiVersion,credentials:P,region:t.region,parameters:B(t.parameters,a),flattenResponse:!0});s&&console.log("API response",c),m.apiVersion=o.client.config.apiVersion,m.region=await o.client.config.region().catch(()=>{}),Object.assign(m,c),r=G(t,m)}catch(c){let f=c.name??c.constructor.name;if(!t.ignoreErrorCodesMatching||!new RegExp(t.ignoreErrorCodesMatching).test(f))throw c}t.physicalResourceId?.responsePath&&(a=m[t.physicalResourceId.responsePath])}await X(e,"SUCCESS","OK",a,r,s)}catch(r){console.log(r),await X(e,"FAILED",r.message||"Internal Error",i.logStreamName,{},!0)}}0&&(module.exports={handler}); +"use strict";var $=Object.create;var x=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var re=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty;var l=(e,i)=>()=>(e&&(i=e(e=0)),i);var w=(e,i)=>()=>(i||e((i={exports:{}}).exports,i),i.exports),u=(e,i)=>{for(var r in i)x(e,r,{get:i[r],enumerable:!0})},H=(e,i,r,a)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of ie(i))!ae.call(e,t)&&t!==r&&x(e,t,{get:()=>i[t],enumerable:!(a=ee(i,t))||a.enumerable});return e};var v=(e,i,r)=>(r=e!=null?$(re(e)):{},H(i||!e||!e.__esModule?x(r,"default",{value:e,enumerable:!0}):r,e)),p=e=>H(x({},"__esModule",{value:!0}),e);var q,S,R=l(()=>{"use strict";q=v(require("zlib")),S=()=>{let i=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NzAlm/JfZN4tnhnZj6OtCAdX2Onvxtd2WR6kPYF77WWutDXYAMF7j7N2YOLpDqm2oIrpSmjJ29EijTpy0MZFEo9Avjo++AHh1WwNYMSDBqkp30T7I3+oDK/WMJDa9OPeLpO/j749+jTfXDPTN+Vz3dJAnD6K/Q7VEx+itVCYHadAK8x896G0moCbk3kEAYw3cap8DIpII7xdWozsWqFl3ahiYBPHvMLIgdf/EY9uR1yDS3yiMAbu4iRXYasn49rFMZlAK5Ag+6KsBLJl4lNAHWMy2OhmuRod+kyzBe3j/pQilv09PpokoQjXIEntTpGqILAzmOwQe83jNUnY1Uvj+InKbJl9efKWK5r+saZ33ttJQDaLSFiUopBSMkOSI/oCYFR/M9Mgg4WQeli/OvB31Zjg3eTisZRg0BNXBX+o+ch1EHtb/pTKY99/vcJ7fMiX0eBkIwrSPiP1sbZbxQ0u0zwBD3C50PdJYOz5k4=","base64")).toString());return S=()=>i,i}});var D={};u(D,{Coercer:()=>k,coerceApiParameters:()=>J});function J(e,i,r={}){let a=S();return new k(a).coerceApiParameters(e,i,r)}function te(e){return e instanceof Uint8Array?e:typeof e=="string"||typeof e=="number"?new TextEncoder().encode(e.toString()):e}function ne(e){if(typeof e=="number")return e;if(typeof e=="string"){let i=Number(e);return isNaN(i)?e:i}return e}function se(e){if(typeof e=="string"||typeof e=="number"){let i=new Date(e);return isNaN(i.getTime())?e:i}return e}var k,N=l(()=>{"use strict";R();k=class{constructor(i){this.typeMachine=i}coerceApiParameters(i,r,a={}){let t=this.progress(r.toLowerCase(),this.progress(i.toLowerCase(),0));return this.recurse(a,t)}testCoerce(i){return this.recurse(i,0)}recurse(i,r){switch(r){case void 0:return i;case"b":return te(i);case"n":return ne(i);case"d":return se(i)}if(Array.isArray(i)){let a=this.progress("*",r);return a!==void 0?i.map(t=>this.recurse(t,a)):i}if(i&&typeof i=="object"){let a=this.progress("*",r);for(let t of Object.keys(i)){let s=this.progress(t,r)??a;s!==void 0&&(i[t]=this.recurse(i[t],s))}return i}return i}progress(i,r){if(!(r===void 0||typeof r!="number"))return this.typeMachine[r][i]}}});var j={};u(j,{findV3ClientConstructor:()=>U});function U(e){let[i,r]=Object.entries(e).find(([a])=>a.endsWith("Client")&&a!=="__Client");return r}var z=l(()=>{"use strict"});var K=w((Ne,oe)=>{oe.exports={acmpca:"acm-pca",apigateway:"api-gateway",arczonalshift:"arc-zonal-shift",alexaforbusiness:"alexa-for-business",appmesh:"app-mesh",applicationautoscaling:"application-auto-scaling",applicationinsights:"application-insights",augmentedairuntime:"sage-maker-a2iruntime",autoscaling:"auto-scaling",autoscalingplans:"auto-scaling-plans",backupgateway:"backup-gateway",bedrockruntime:"bedrock-runtime",cur:"cost-and-usage-report-service",chimesdkidentity:"chime-sdk-identity",chimesdkmediapipelines:"chime-sdk-media-pipelines",chimesdkmeetings:"chime-sdk-meetings",chimesdkmessaging:"chime-sdk-messaging",chimesdkvoice:"chime-sdk-voice",cloudhsmv2:"cloudhsm-v2",cloudsearchdomain:"cloudsearch-domain",cloudtraildata:"cloudtrail-data",cloudwatchevents:"cloudwatch-events",cloudwatchlogs:"cloudwatch-logs",codegurureviewer:"codeguru-reviewer",codegurusecurity:"codeguru-security",codestarnotifications:"codestar-notifications",codestarconnections:"codestar-connections",cognitoidentity:"cognito-identity",cognitoidentityserviceprovider:"cognito-identity-provider",cognitosync:"cognito-sync",computeoptimizer:"compute-optimizer",configservice:"config-service",connectcontactlens:"connect-contact-lens",costexplorer:"cost-explorer",customerprofiles:"customer-profiles",dms:"database-migration-service",datapipeline:"data-pipeline",devopsguru:"devops-guru",devicefarm:"device-farm",directconnect:"direct-connect",directoryservice:"directory-service",discovery:"application-discovery-service",docdbelastic:"docdb-elastic",dynamodbstreams:"dynamodb-streams",ec2instanceconnect:"ec2-instance-connect",ecrpublic:"ecr-public",elb:"elastic-load-balancing",elbv2:"elastic-load-balancing-v2",emrserverless:"emr-serverless",emrcontainers:"emr-containers",es:"elasticsearch-service",elasticbeanstalk:"elastic-beanstalk",elasticinference:"elastic-inference",elastictranscoder:"elastic-transcoder",finspacedata:"finspace-data",forecastqueryservice:"forecastquery",forecastservice:"forecast",globalaccelerator:"global-accelerator",iot1clickdevicesservice:"iot-1click-devices-service",iot1clickprojects:"iot-1click-projects",iotevents:"iot-events",ioteventsdata:"iot-events-data",iotjobsdataplane:"iot-jobs-data-plane",iotroborunner:"iot-roborunner",iotwireless:"iot-wireless",iotdata:"iot-data-plane",ivsrealtime:"ivs-realtime",kendraranking:"kendra-ranking",kinesisanalytics:"kinesis-analytics",kinesisanalyticsv2:"kinesis-analytics-v2",kinesisvideo:"kinesis-video",kinesisvideoarchivedmedia:"kinesis-video-archived-media",kinesisvideomedia:"kinesis-video-media",kinesisvideosignalingchannels:"kinesis-video-signaling",kinesisvideowebrtcstorage:"kinesis-video-webrtc-storage",launchwizard:"launch-wizard",lexmodelbuildingservice:"lex-model-building-service",lexmodelsv2:"lex-models-v2",lexruntime:"lex-runtime-service",lexruntimev2:"lex-runtime-v2",licensemanager:"license-manager",licensemanagerlinuxsubscriptions:"license-manager-linux-subscriptions",licensemanagerusersubscriptions:"license-manager-user-subscriptions",machinelearning:"machine-learning",managedblockchainquery:"managedblockchain-query",marketplacecatalog:"marketplace-catalog",marketplacecommerceanalytics:"marketplace-commerce-analytics",marketplaceentitlementservice:"marketplace-entitlement-service",marketplacemetering:"marketplace-metering",mediapackagevod:"mediapackage-vod",mediastoredata:"mediastore-data",medicalimaging:"medical-imaging",memorydb:"memory-db",migrationhub:"migration-hub",migrationhubconfig:"migrationhub-config",migrationhubrefactorspaces:"migration-hub-refactor-spaces",networkfirewall:"network-firewall",paymentcryptography:"payment-cryptography",paymentcryptographydata:"payment-cryptography-data",pcaconnectorad:"pca-connector-ad",personalizeevents:"personalize-events",personalizeruntime:"personalize-runtime",pinpointemail:"pinpoint-email",pinpointsmsvoice:"pinpoint-sms-voice",pinpointsmsvoicev2:"pinpoint-sms-voice-v2",qldbsession:"qldb-session",rdsdataservice:"rds-data",redshiftdata:"redshift-data",redshiftserverless:"redshift-serverless",resourceexplorer2:"resource-explorer-2",resourcegroups:"resource-groups",resourcegroupstaggingapi:"resource-groups-tagging-api",route53:"route-53",route53domains:"route-53-domains",route53recoverycluster:"route53-recovery-cluster",route53recoverycontrolconfig:"route53-recovery-control-config",route53recoveryreadiness:"route53-recovery-readiness",s3control:"s3-control",ssmcontacts:"ssm-contacts",ssmincidents:"ssm-incidents",ssoadmin:"sso-admin",ssooidc:"sso-oidc",sagemakerfeaturestoreruntime:"sagemaker-featurestore-runtime",sagemakergeospatial:"sagemaker-geospatial",sagemakermetrics:"sagemaker-metrics",sagemakerruntime:"sagemaker-runtime",sagemakeredge:"sagemaker-edge",secretsmanager:"secrets-manager",servicecatalog:"service-catalog",servicecatalogappregistry:"service-catalog-appregistry",servicequotas:"service-quotas",snowdevicemanagement:"snow-device-management",ssmsap:"ssm-sap",stepfunctions:"sfn",storagegateway:"storage-gateway",supportapp:"support-app",timestreamquery:"timestream-query",timestreamwrite:"timestream-write",transcribeservice:"transcribe",voiceid:"voice-id",vpclattice:"vpc-lattice",wafregional:"waf-regional",workspacesweb:"workspaces-web"}});var Z=w((Ue,ce)=>{ce.exports={accessanalyzer:{iamPrefix:"access-analyzer"},account:{iamPrefix:"account"},"acm-pca":{iamPrefix:"acm-pca"},acm:{iamPrefix:"acm"},"alexa-for-business":{iamPrefix:"a4b"},amp:{iamPrefix:"aps"},amplify:{iamPrefix:"amplify"},amplifybackend:{iamPrefix:"amplifybackend"},amplifyuibuilder:{iamPrefix:"amplifyuibuilder"},"api-gateway":{iamPrefix:"apigateway"},apigatewaymanagementapi:{iamPrefix:"execute-api"},apigatewayv2:{iamPrefix:"apigateway"},"app-mesh":{iamPrefix:"appmesh"},appconfig:{iamPrefix:"appconfig"},appconfigdata:{iamPrefix:"appconfig"},appfabric:{iamPrefix:"appfabric"},appflow:{iamPrefix:"appflow"},appintegrations:{iamPrefix:"app-integrations"},"application-auto-scaling":{iamPrefix:"application-autoscaling"},"application-discovery-service":{iamPrefix:"discovery"},"application-insights":{iamPrefix:"applicationinsights"},applicationcostprofiler:{iamPrefix:"application-cost-profiler"},apprunner:{iamPrefix:"apprunner"},appstream:{iamPrefix:"appstream"},appsync:{iamPrefix:"appsync"},"arc-zonal-shift":{iamPrefix:"arc-zonal-shift"},athena:{iamPrefix:"athena"},auditmanager:{iamPrefix:"auditmanager"},"auto-scaling-plans":{iamPrefix:"autoscaling-plans"},"auto-scaling":{iamPrefix:"autoscaling"},b2bi:{iamPrefix:"b2bi"},"backup-gateway":{iamPrefix:"backup-gateway"},backup:{iamPrefix:"backup"},backupstorage:{iamPrefix:"backup-storage"},batch:{iamPrefix:"batch"},"bcm-data-exports":{iamPrefix:"bcm-data-exports"},"bedrock-agent-runtime":{iamPrefix:"bedrock"},"bedrock-agent":{iamPrefix:"bedrock"},"bedrock-runtime":{iamPrefix:"bedrock"},bedrock:{iamPrefix:"bedrock"},billingconductor:{iamPrefix:"billingconductor"},braket:{iamPrefix:"braket"},budgets:{iamPrefix:"budgets"},"chime-sdk-identity":{iamPrefix:"chime"},"chime-sdk-media-pipelines":{iamPrefix:"chime"},"chime-sdk-meetings":{iamPrefix:"chime"},"chime-sdk-messaging":{iamPrefix:"chime"},"chime-sdk-voice":{iamPrefix:"chime"},chime:{iamPrefix:"chime"},cleanrooms:{iamPrefix:"cleanrooms"},cleanroomsml:{iamPrefix:"cleanrooms-ml"},cloud9:{iamPrefix:"cloud9"},cloudcontrol:{iamPrefix:"cloudcontrolapi"},clouddirectory:{iamPrefix:"clouddirectory"},cloudformation:{iamPrefix:"cloudformation"},"cloudfront-keyvaluestore":{iamPrefix:"cloudfront-keyvaluestore"},cloudfront:{iamPrefix:"cloudfront"},"cloudhsm-v2":{iamPrefix:"cloudhsm"},cloudhsm:{iamPrefix:"cloudhsm"},"cloudsearch-domain":{iamPrefix:"cloudsearch"},cloudsearch:{iamPrefix:"cloudsearch"},"cloudtrail-data":{iamPrefix:"cloudtrail-data"},cloudtrail:{iamPrefix:"cloudtrail"},"cloudwatch-events":{iamPrefix:"events"},"cloudwatch-logs":{iamPrefix:"logs"},cloudwatch:{iamPrefix:"monitoring"},codeartifact:{iamPrefix:"codeartifact"},codebuild:{iamPrefix:"codebuild"},codecatalyst:{},codecommit:{iamPrefix:"codecommit"},codedeploy:{iamPrefix:"codedeploy"},"codeguru-reviewer":{iamPrefix:"codeguru-reviewer"},"codeguru-security":{iamPrefix:"codeguru-security"},codeguruprofiler:{iamPrefix:"codeguru-profiler"},codepipeline:{iamPrefix:"codepipeline"},"codestar-connections":{iamPrefix:"codestar-connections"},"codestar-notifications":{iamPrefix:"codestar-notifications"},codestar:{iamPrefix:"codestar"},"cognito-identity-provider":{iamPrefix:"cognito-idp"},"cognito-identity":{iamPrefix:"cognito-identity"},"cognito-sync":{iamPrefix:"cognito-sync"},comprehend:{iamPrefix:"comprehend"},comprehendmedical:{iamPrefix:"comprehendmedical"},"compute-optimizer":{iamPrefix:"compute-optimizer"},"config-service":{iamPrefix:"config"},"connect-contact-lens":{iamPrefix:"connect"},connect:{iamPrefix:"connect"},connectcampaigns:{iamPrefix:"connect-campaigns"},connectcases:{iamPrefix:"cases"},connectparticipant:{iamPrefix:"execute-api"},controltower:{iamPrefix:"controltower"},"cost-and-usage-report-service":{iamPrefix:"cur"},"cost-explorer":{iamPrefix:"ce"},"cost-optimization-hub":{iamPrefix:"cost-optimization-hub"},"customer-profiles":{iamPrefix:"profile"},"data-pipeline":{iamPrefix:"datapipeline"},"database-migration-service":{iamPrefix:"dms"},databrew:{iamPrefix:"databrew"},dataexchange:{iamPrefix:"dataexchange"},datasync:{iamPrefix:"datasync"},datazone:{iamPrefix:"datazone"},dax:{iamPrefix:"dax"},detective:{iamPrefix:"detective"},"device-farm":{iamPrefix:"devicefarm"},"devops-guru":{iamPrefix:"devops-guru"},"direct-connect":{iamPrefix:"directconnect"},"directory-service":{iamPrefix:"ds"},dlm:{iamPrefix:"dlm"},"docdb-elastic":{iamPrefix:"docdb-elastic"},docdb:{iamPrefix:"rds"},drs:{iamPrefix:"drs"},"dynamodb-streams":{iamPrefix:"dynamodb"},dynamodb:{iamPrefix:"dynamodb"},ebs:{iamPrefix:"ebs"},"ec2-instance-connect":{iamPrefix:"ec2-instance-connect"},ec2:{iamPrefix:"ec2"},"ecr-public":{iamPrefix:"ecr-public"},ecr:{iamPrefix:"ecr"},ecs:{iamPrefix:"ecs",commands:["ExecuteCommand"]},efs:{iamPrefix:"elasticfilesystem"},"eks-auth":{iamPrefix:"eks-auth"},eks:{iamPrefix:"eks"},"elastic-beanstalk":{iamPrefix:"elasticbeanstalk"},"elastic-inference":{iamPrefix:"elastic-inference"},"elastic-load-balancing-v2":{iamPrefix:"elasticloadbalancing"},"elastic-load-balancing":{iamPrefix:"elasticloadbalancing"},"elastic-transcoder":{iamPrefix:"elastictranscoder"},elasticache:{iamPrefix:"elasticache"},"elasticsearch-service":{iamPrefix:"es"},"emr-containers":{iamPrefix:"emr-containers"},"emr-serverless":{iamPrefix:"emr-serverless"},emr:{iamPrefix:"elasticmapreduce"},entityresolution:{iamPrefix:"entityresolution"},eventbridge:{iamPrefix:"events"},evidently:{iamPrefix:"evidently"},"finspace-data":{iamPrefix:"finspace-api"},finspace:{iamPrefix:"finspace"},firehose:{iamPrefix:"firehose"},fis:{iamPrefix:"fis"},fms:{iamPrefix:"fms"},forecast:{iamPrefix:"forecast"},forecastquery:{iamPrefix:"forecast"},frauddetector:{iamPrefix:"frauddetector"},freetier:{iamPrefix:"freetier"},fsx:{iamPrefix:"fsx"},gamelift:{iamPrefix:"gamelift"},glacier:{iamPrefix:"glacier"},"global-accelerator":{iamPrefix:"globalaccelerator"},glue:{iamPrefix:"glue"},grafana:{iamPrefix:"grafana"},greengrass:{iamPrefix:"greengrass"},greengrassv2:{iamPrefix:"greengrass"},groundstation:{iamPrefix:"groundstation"},guardduty:{iamPrefix:"guardduty"},health:{iamPrefix:"health"},healthlake:{iamPrefix:"healthlake"},honeycode:{iamPrefix:"honeycode"},iam:{iamPrefix:"iam"},identitystore:{iamPrefix:"identitystore"},imagebuilder:{iamPrefix:"imagebuilder"},"inspector-scan":{iamPrefix:"inspector-scan"},inspector:{iamPrefix:"inspector"},inspector2:{iamPrefix:"inspector2"},internetmonitor:{iamPrefix:"internetmonitor"},"iot-1click-devices-service":{iamPrefix:"iot1click"},"iot-1click-projects":{iamPrefix:"iot1click"},"iot-data-plane":{iamPrefix:"iotdata"},"iot-events-data":{iamPrefix:"ioteventsdata"},"iot-events":{iamPrefix:"iotevents"},"iot-jobs-data-plane":{iamPrefix:"iot-jobs-data"},"iot-roborunner":{iamPrefix:"iotroborunner"},"iot-wireless":{iamPrefix:"iotwireless"},iot:{iamPrefix:"iot"},iotanalytics:{iamPrefix:"iotanalytics"},iotdeviceadvisor:{iamPrefix:"iotdeviceadvisor"},iotfleethub:{iamPrefix:"iotfleethub"},iotfleetwise:{iamPrefix:"iotfleetwise"},iotsecuretunneling:{iamPrefix:"IoTSecuredTunneling"},iotsitewise:{iamPrefix:"iotsitewise"},iotthingsgraph:{iamPrefix:"iotthingsgraph"},iottwinmaker:{iamPrefix:"iottwinmaker"},"ivs-realtime":{iamPrefix:"ivs"},ivs:{iamPrefix:"ivs"},ivschat:{iamPrefix:"ivschat"},kafka:{iamPrefix:"kafka"},kafkaconnect:{iamPrefix:"kafkaconnect"},"kendra-ranking":{iamPrefix:"kendra-ranking"},kendra:{iamPrefix:"kendra"},keyspaces:{iamPrefix:"cassandra"},"kinesis-analytics-v2":{iamPrefix:"kinesisanalytics"},"kinesis-analytics":{iamPrefix:"kinesisanalytics"},"kinesis-video-archived-media":{iamPrefix:"kinesisvideo"},"kinesis-video-media":{iamPrefix:"kinesisvideo"},"kinesis-video-signaling":{iamPrefix:"kinesisvideo"},"kinesis-video-webrtc-storage":{iamPrefix:"kinesisvideo"},"kinesis-video":{iamPrefix:"kinesisvideo"},kinesis:{iamPrefix:"kinesis"},kms:{iamPrefix:"kms"},lakeformation:{iamPrefix:"lakeformation"},lambda:{iamPrefix:"lambda"},"launch-wizard":{iamPrefix:"launchwizard"},"lex-model-building-service":{iamPrefix:"lex"},"lex-models-v2":{iamPrefix:"lex"},"lex-runtime-service":{iamPrefix:"lex"},"lex-runtime-v2":{iamPrefix:"lex"},"license-manager-linux-subscriptions":{iamPrefix:"license-manager-linux-subscriptions"},"license-manager-user-subscriptions":{iamPrefix:"license-manager-user-subscriptions"},"license-manager":{iamPrefix:"license-manager"},lightsail:{iamPrefix:"lightsail"},location:{iamPrefix:"geo"},lookoutequipment:{iamPrefix:"lookoutequipment"},lookoutmetrics:{iamPrefix:"lookoutmetrics"},lookoutvision:{iamPrefix:"lookoutvision"},m2:{iamPrefix:"m2"},"machine-learning":{iamPrefix:"machinelearning"},macie2:{iamPrefix:"macie2"},"managedblockchain-query":{iamPrefix:"managedblockchain-query"},managedblockchain:{iamPrefix:"managedblockchain"},"marketplace-agreement":{iamPrefix:"aws-marketplace"},"marketplace-catalog":{iamPrefix:"aws-marketplace"},"marketplace-commerce-analytics":{iamPrefix:"marketplacecommerceanalytics"},"marketplace-deployment":{iamPrefix:"aws-marketplace"},"marketplace-entitlement-service":{iamPrefix:"aws-marketplace"},"marketplace-metering":{iamPrefix:"aws-marketplace"},mediaconnect:{iamPrefix:"mediaconnect"},mediaconvert:{iamPrefix:"mediaconvert"},medialive:{iamPrefix:"medialive"},"mediapackage-vod":{iamPrefix:"mediapackage-vod"},mediapackage:{iamPrefix:"mediapackage"},mediapackagev2:{iamPrefix:"mediapackagev2"},"mediastore-data":{iamPrefix:"mediastore"},mediastore:{iamPrefix:"mediastore"},mediatailor:{iamPrefix:"mediatailor"},"medical-imaging":{iamPrefix:"medical-imaging"},memorydb:{iamPrefix:"memorydb"},mgn:{iamPrefix:"mgn"},"migration-hub-refactor-spaces":{iamPrefix:"refactor-spaces"},"migration-hub":{iamPrefix:"mgh"},"migrationhub-config":{iamPrefix:"mgh"},migrationhuborchestrator:{iamPrefix:"migrationhub-orchestrator"},migrationhubstrategy:{iamPrefix:"migrationhub-strategy"},mobile:{iamPrefix:"AWSMobileHubService"},mq:{iamPrefix:"mq"},mturk:{iamPrefix:"mturk-requester"},mwaa:{iamPrefix:"airflow"},"neptune-graph":{iamPrefix:"neptune-graph"},neptune:{iamPrefix:"rds"},neptunedata:{iamPrefix:"neptune-db"},"network-firewall":{iamPrefix:"network-firewall"},networkmanager:{iamPrefix:"networkmanager"},networkmonitor:{iamPrefix:"networkmonitor"},nimble:{iamPrefix:"nimble"},oam:{iamPrefix:"oam"},omics:{iamPrefix:"omics"},opensearch:{iamPrefix:"es"},opensearchserverless:{iamPrefix:"aoss"},opsworks:{iamPrefix:"opsworks"},opsworkscm:{iamPrefix:"opsworks-cm"},organizations:{iamPrefix:"organizations"},osis:{iamPrefix:"osis"},outposts:{iamPrefix:"outposts"},panorama:{iamPrefix:"panorama"},"payment-cryptography-data":{iamPrefix:"payment-cryptography"},"payment-cryptography":{iamPrefix:"payment-cryptography"},"pca-connector-ad":{iamPrefix:"pca-connector-ad"},"personalize-events":{iamPrefix:"personalize"},"personalize-runtime":{iamPrefix:"personalize"},personalize:{iamPrefix:"personalize"},pi:{iamPrefix:"pi"},"pinpoint-email":{iamPrefix:"ses"},"pinpoint-sms-voice-v2":{iamPrefix:"sms-voice"},"pinpoint-sms-voice":{iamPrefix:"sms-voice"},pinpoint:{iamPrefix:"mobiletargeting"},pipes:{iamPrefix:"pipes"},polly:{iamPrefix:"polly"},pricing:{iamPrefix:"pricing"},privatenetworks:{iamPrefix:"private-networks"},proton:{iamPrefix:"proton"},qbusiness:{iamPrefix:"qbusiness"},qconnect:{iamPrefix:"wisdom"},"qldb-session":{iamPrefix:"qldb",commands:["SendCommand"]},qldb:{iamPrefix:"qldb"},quicksight:{iamPrefix:"quicksight"},ram:{iamPrefix:"ram"},rbin:{iamPrefix:"rbin"},"rds-data":{iamPrefix:"rds-data"},rds:{iamPrefix:"rds"},"redshift-data":{iamPrefix:"redshift-data"},"redshift-serverless":{iamPrefix:"redshift-serverless"},redshift:{iamPrefix:"redshift"},rekognition:{iamPrefix:"rekognition"},rekognitionstreaming:{iamPrefix:"rekognition"},repostspace:{iamPrefix:"repostspace"},resiliencehub:{iamPrefix:"resiliencehub"},"resource-explorer-2":{iamPrefix:"resource-explorer-2"},"resource-groups-tagging-api":{iamPrefix:"tagging"},"resource-groups":{iamPrefix:"resource-groups"},robomaker:{iamPrefix:"robomaker"},rolesanywhere:{iamPrefix:"rolesanywhere"},"route-53-domains":{iamPrefix:"route53domains"},"route-53":{iamPrefix:"route53"},"route53-recovery-cluster":{iamPrefix:"route53-recovery-cluster"},"route53-recovery-control-config":{iamPrefix:"route53-recovery-control-config"},"route53-recovery-readiness":{iamPrefix:"route53-recovery-readiness"},route53resolver:{iamPrefix:"route53resolver"},rum:{iamPrefix:"rum"},"s3-control":{iamPrefix:"s3"},s3:{iamPrefix:"s3"},s3outposts:{iamPrefix:"s3-outposts"},"sagemaker-a2i-runtime":{iamPrefix:"sagemaker"},"sagemaker-edge":{iamPrefix:"sagemaker"},"sagemaker-featurestore-runtime":{iamPrefix:"sagemaker"},"sagemaker-geospatial":{iamPrefix:"sagemaker-geospatial"},"sagemaker-metrics":{iamPrefix:"sagemaker"},"sagemaker-runtime":{iamPrefix:"sagemaker"},sagemaker:{iamPrefix:"sagemaker"},savingsplans:{iamPrefix:"savingsplans"},scheduler:{iamPrefix:"scheduler"},schemas:{iamPrefix:"schemas"},"secrets-manager":{iamPrefix:"secretsmanager"},securityhub:{iamPrefix:"securityhub"},securitylake:{iamPrefix:"securitylake"},serverlessapplicationrepository:{iamPrefix:"serverlessrepo"},"service-catalog-appregistry":{iamPrefix:"servicecatalog"},"service-catalog":{iamPrefix:"servicecatalog"},"service-quotas":{iamPrefix:"servicequotas"},servicediscovery:{iamPrefix:"servicediscovery"},ses:{iamPrefix:"ses"},sesv2:{iamPrefix:"ses"},sfn:{iamPrefix:"states"},shield:{iamPrefix:"shield"},signer:{iamPrefix:"signer"},simspaceweaver:{iamPrefix:"simspaceweaver"},sms:{iamPrefix:"sms"},"snow-device-management":{iamPrefix:"snow-device-management"},snowball:{iamPrefix:"snowball"},sns:{iamPrefix:"sns"},sqs:{iamPrefix:"sqs"},"ssm-contacts":{iamPrefix:"ssm-contacts"},"ssm-incidents":{iamPrefix:"ssm-incidents"},"ssm-sap":{iamPrefix:"ssm-sap"},ssm:{iamPrefix:"ssm",commands:["CancelCommand","SendCommand"]},"sso-admin":{iamPrefix:"sso"},"sso-oidc":{iamPrefix:"sso-oauth"},sso:{iamPrefix:"awsssoportal"},"storage-gateway":{iamPrefix:"storagegateway"},sts:{iamPrefix:"sts"},supplychain:{iamPrefix:"scn"},"support-app":{iamPrefix:"supportapp"},support:{iamPrefix:"support"},swf:{iamPrefix:"swf"},synthetics:{iamPrefix:"synthetics"},textract:{iamPrefix:"textract"},"timestream-query":{iamPrefix:"timestream"},"timestream-write":{iamPrefix:"timestream"},tnb:{iamPrefix:"tnb"},"transcribe-streaming":{iamPrefix:"transcribe"},transcribe:{iamPrefix:"transcribe"},transfer:{iamPrefix:"transfer"},translate:{iamPrefix:"translate"},trustedadvisor:{iamPrefix:"trustedadvisor"},verifiedpermissions:{iamPrefix:"verifiedpermissions"},"voice-id":{iamPrefix:"voiceid"},"vpc-lattice":{iamPrefix:"vpc-lattice"},"waf-regional":{iamPrefix:"waf-regional"},waf:{iamPrefix:"waf"},wafv2:{iamPrefix:"wafv2"},wellarchitected:{iamPrefix:"wellarchitected"},wisdom:{iamPrefix:"wisdom"},workdocs:{iamPrefix:"workdocs"},worklink:{iamPrefix:"worklink"},workmail:{iamPrefix:"workmail"},workmailmessageflow:{iamPrefix:"workmailmessageflow"},"workspaces-thin-client":{iamPrefix:"thinclient"},"workspaces-web":{iamPrefix:"workspaces-web"},workspaces:{iamPrefix:"workspaces"},xray:{iamPrefix:"xray"}}});var E={};u(E,{normalizeActionName:()=>T,normalizeServiceName:()=>A});function A(e){return e=e.toLowerCase(),e=e.replace(/^@aws-sdk\/client-/,""),e=me()?.[e]??e,e}function T(e,i){return i.charAt(0).toLowerCase()===i.charAt(0)?i.charAt(0).toUpperCase()+i.slice(1):fe()[e]?.commands?.includes(i)?i:i.replace(/Command$/,"")}function me(){return K()}function fe(){return Z()}var O=l(()=>{"use strict"});var Y={};u(Y,{ApiCall:()=>C,coerceSdkv3Response:()=>y,flatten:()=>I});function I(e){let i={};return r(e),i;function r(a,t=[]){if(a&&typeof a=="object"){for(let[s,o]of Object.entries(a))r(o,[...t,s]);return}i[t.join(".")]=a}}async function y(e){if(e&&typeof e=="object"&&typeof e.transformToString=="function")return e.transformToString();if(Buffer.isBuffer(e))return e.toString("utf8");if(ArrayBuffer.isView(e))return de.decode(e.buffer);if(Array.isArray(e)){let i=[];for(let r of e)i.push(await y(r));return i}if(e&&typeof e=="object"){for(let i of Object.keys(e))e[i]=await y(e[i]);return e}return e}var C,de,L=l(()=>{"use strict";N();z();O();C=class{constructor(i,r){this.service=A(i),this.action=T(this.service,r),this.v3PackageName=`@aws-sdk/client-${this.service}`}async invoke(i){this.initializePackage(i.sdkPackage),this.initializeClient(i);let r=this.findCommandClass(),a=await this.client.send(new r(J(this.service,this.action,i.parameters??{})));delete a.$metadata;let t=await y(a);return i.flattenResponse?I(t):t}initializePackage(i){if(!this.v3Package){if(i){this.v3Package=i;return}try{this.v3Package=require(this.v3PackageName)}catch{throw Error(`Service ${this.service} client package with name '${this.v3PackageName}' does not exist.`)}}}initializeClient(i){this.v3Package||this.initializePackage();let r=this.findConstructor(this.v3Package);return this.client=new r({apiVersion:i.apiVersion,credentials:i.credentials,region:i.region}),this.client}findCommandClass(){this.v3Package||this.initializePackage();let i=`${this.action}Command`,r=Object.entries(this.v3Package??{}).find(([a])=>a.toLowerCase()===i.toLowerCase())?.[1];if(!r)throw new Error(`Unable to find command named: ${i} for action: ${this.action} in service package ${this.v3PackageName}`);return r}findConstructor(i){try{let r=U(i);if(!r)throw new Error("findV3ClientConstructor returned undefined");return r}catch(r){throw console.error(r),Error(`No client constructor found within package: ${this.v3PackageName}`)}}};de=new TextDecoder});var W=w(n=>{"use strict";var le=n&&n.__createBinding||(Object.create?function(e,i,r,a){a===void 0&&(a=r);var t=Object.getOwnPropertyDescriptor(i,r);(!t||("get"in t?!i.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return i[r]}}),Object.defineProperty(e,a,t)}:function(e,i,r,a){a===void 0&&(a=r),e[a]=i[r]}),ue=n&&n.__exportStar||function(e,i){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(i,r)&&le(i,e,r)};Object.defineProperty(n,"__esModule",{value:!0});n.normalizeActionName=n.normalizeServiceName=n.findV3ClientConstructor=n.coerceApiParameters=void 0;var pe=(N(),p(D));Object.defineProperty(n,"coerceApiParameters",{enumerable:!0,get:function(){return pe.coerceApiParameters}});var ge=(z(),p(j));Object.defineProperty(n,"findV3ClientConstructor",{enumerable:!0,get:function(){return ge.findV3ClientConstructor}});var M=(O(),p(E));Object.defineProperty(n,"normalizeServiceName",{enumerable:!0,get:function(){return M.normalizeServiceName}});Object.defineProperty(n,"normalizeActionName",{enumerable:!0,get:function(){return M.normalizeActionName}});ue((L(),p(Y)),n)});var he={};u(he,{handler:()=>be});module.exports=p(he);var _=v(W());var Q=require("child_process"),b={};function Pe(e){console.log(`Installing latest AWS SDK v3: ${e}`),(0,Q.execSync)(`NPM_CONFIG_UPDATE_NOTIFIER=false HOME=/tmp npm install ${JSON.stringify(e)} --omit=dev --no-package-lock --no-save --prefix /tmp`),b={...b,[e]:!0}}async function V(e,i){let r;try{if(!b[e]&&i==="true")try{Pe(e),r=require(`/tmp/node_modules/${e}`)}catch(a){return console.log(`Failed to install latest AWS SDK v3. Falling back to pre-installed version. Error: ${a}`),require(e)}else b[e]?r=require(`/tmp/node_modules/${e}`):r=require(e)}catch{throw Error(`Package ${e} does not exist.`)}return r}var xe="PHYSICAL:RESOURCEID:";function B(e,i){return r(e);function r(a){if(a===xe)return i;if(Array.isArray(a))return a.map(r);if(a&&typeof a=="object"){for(let[t,s]of Object.entries(a))a[t]=r(s);return a}return a}}function h(e){if(e)return JSON.parse(e)}function X(e,i,r,a,t,s){let o={Status:i,Reason:r,PhysicalResourceId:a,StackId:e.StackId,RequestId:e.RequestId,LogicalResourceId:e.LogicalResourceId,NoEcho:!1,Data:t};if(s)console.log("Responding",JSON.stringify(o));else{let{Data:c,...f}=o;console.log("Responding",JSON.stringify(f))}let g=require("url").parse(e.ResponseURL),P=JSON.stringify(o),m={hostname:g.hostname,path:g.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(P,"utf8")}};return new Promise((c,f)=>{try{let d=require("https").request(m,c);d.on("error",f),d.write(P),d.end()}catch(d){f(d)}})}async function F(e,i){let r;if(e.assumedRoleArn){let a=new Date().getTime(),t={RoleArn:e.assumedRoleArn,RoleSessionName:`${a}-${i}`.substring(0,64)},{fromTemporaryCredentials:s}=await import("@aws-sdk/credential-providers");r=s({params:t,clientConfig:e.region!==void 0?{region:e.region}:void 0})}return r}function G(e,i){let r;return e.outputPath?r=[e.outputPath]:e.outputPaths&&(r=e.outputPaths),r?ye(i,ke(r)):i}function ke(e){return function(i){for(let r of e)if(i.startsWith(r))return!0;return!1}}function ye(e,i){return Object.entries(e).reduce((r,[a,t])=>i(a)?{...r,[a]:t}:r,{})}async function be(e,i){try{e.ResourceProperties.Create=h(e.ResourceProperties.Create),e.ResourceProperties.Update=h(e.ResourceProperties.Update),e.ResourceProperties.Delete=h(e.ResourceProperties.Delete);let r={},a;switch(e.RequestType){case"Create":a=e.ResourceProperties.Create?.physicalResourceId?.id??e.ResourceProperties.Update?.physicalResourceId?.id??e.ResourceProperties.Delete?.physicalResourceId?.id??e.LogicalResourceId;break;case"Update":case"Delete":a=e.ResourceProperties[e.RequestType]?.physicalResourceId?.id??e.PhysicalResourceId;break}let t=e.ResourceProperties[e.RequestType],s=t?.logApiResponseData??!0;if(t){let o=new _.ApiCall(t.service,t.action),g=await V(o.v3PackageName,e.ResourceProperties.InstallLatestAwsSdk);console.log(JSON.stringify({...e,ResponseURL:"..."}));let P=await F(t,a),m={};try{let c=await o.invoke({sdkPackage:g,apiVersion:t.apiVersion,credentials:P,region:t.region,parameters:B(t.parameters,a),flattenResponse:!0});s&&console.log("API response",c),m.apiVersion=o.client.config.apiVersion,m.region=await o.client.config.region().catch(()=>{}),Object.assign(m,c),r=G(t,m)}catch(c){let f=c.name??c.constructor.name;if(!t.ignoreErrorCodesMatching||!new RegExp(t.ignoreErrorCodesMatching).test(f))throw c}t.physicalResourceId?.responsePath&&(a=m[t.physicalResourceId.responsePath])}await X(e,"SUCCESS","OK",a,r,s)}catch(r){console.log(r),await X(e,"FAILED",r.message||"Internal Error",i.logStreamName,{},!0)}}0&&(module.exports={handler}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.assets.json index 7ffeac735ce35..2271a2a98de09 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.assets.json @@ -1,20 +1,20 @@ { "version": "39.0.0", "files": { - "cde607091ceabfbfb56e643cd4a5647680cfaf19c63f4d59b3f4880df4a71c8d": { + "9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec": { "source": { - "path": "asset.cde607091ceabfbfb56e643cd4a5647680cfaf19c63f4d59b3f4880df4a71c8d", + "path": "asset.9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "cde607091ceabfbfb56e643cd4a5647680cfaf19c63f4d59b3f4880df4a71c8d.zip", + "objectKey": "9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "9030e444b772d2ae2503f26d888e95dd2ea466d071d10d169d5ae2da9f099031": { + "96c8b89f96091beabfd95c9461e5aece6677d31b9392142b7b83a30129b94d42": { "source": { "path": "log-group-events.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9030e444b772d2ae2503f26d888e95dd2ea466d071d10d169d5ae2da9f099031.json", + "objectKey": "96c8b89f96091beabfd95c9461e5aece6677d31b9392142b7b83a30129b94d42.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.template.json index 33cbe0673e27b..666ead547d6cb 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/log-group-events.template.json @@ -100,7 +100,7 @@ ] }, "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimerC63340B025F606BE\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": false + "InstallLatestAwsSdk": "false" }, "DependsOn": [ "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA" @@ -283,7 +283,7 @@ ] }, "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsCustomRule99E1EEF62FFABD78\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": false + "InstallLatestAwsSdk": "false" }, "DependsOn": [ "EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6CustomResourcePolicy361E9A96" @@ -414,7 +414,7 @@ ] }, "Delete": "{\"service\":\"CloudWatchLogs\",\"action\":\"deleteResourcePolicy\",\"parameters\":{\"policyName\":\"loggroupeventsEventsLogGroupPolicyloggroupeventsTimer37DF74C17EF314A8E\"},\"ignoreErrorCodesMatching\":\"ResourceNotFoundException\"}", - "InstallLatestAwsSdk": false + "InstallLatestAwsSdk": "false" }, "DependsOn": [ "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/manifest.json index 920b6016b73e8..77abc31a525aa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9030e444b772d2ae2503f26d888e95dd2ea466d071d10d169d5ae2da9f099031.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/96c8b89f96091beabfd95c9461e5aece6677d31b9392142b7b83a30129b94d42.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -58,6 +58,12 @@ "data": "TimerBF6F831F" } ], + "/log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -120,6 +126,12 @@ "data": "CustomRuleB1CBBADE" } ], + "/log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -144,6 +156,12 @@ "data": "Timer30894E3BB" } ], + "/log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17": [ + { + "type": "aws:cdk:warning", + "data": "installLatestAwsSdk was not specified, and defaults to true. You probably do not want this. Set the global context flag '@aws-cdk/customresources:installLatestAwsSdkDefault' to false to switch this behavior off project-wide, or set the property explicitly to true if you know you need to call APIs that are not in Lambda's built-in SDK version. [ack: @aws-cdk/custom-resources:installLatestAwsSdkNotSpecified]" + } + ], "/log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17/Resource/Default": [ { "type": "aws:cdk:logicalId", @@ -194,7 +212,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/106852c8e0fc570a21634644053cb39ee11e3af80576e3c9ef92746dda7f8b5b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dc31082d9bbea7e2a02c874799c27fcc09d8337e8784ba92420570aee42d833b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -211,10 +229,10 @@ "LogGroupDefaultTestDeployAssert353EE07A.assets" ], "metadata": { - "/LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents8b1c88915a4a579fffb75da7180f9f83/Default/Default": [ + "/LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents553bf9107bb038682ce514ab06253825/Default/Default": [ { "type": "aws:cdk:logicalId", - "data": "AwsApiCallEventBridgeputEvents8b1c88915a4a579fffb75da7180f9f83" + "data": "AwsApiCallEventBridgeputEvents553bf9107bb038682ce514ab06253825" } ], "/LogGroup/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ @@ -235,16 +253,16 @@ "data": "LatestNodeRuntimeMap" } ], - "/LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f/Default/Default": [ + "/LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f/Default/Default": [ { "type": "aws:cdk:logicalId", - "data": "AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f" + "data": "AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f" } ], - "/LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f/AssertionResults": [ + "/LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f/AssertionResults": [ { "type": "aws:cdk:logicalId", - "data": "AssertionResultsAwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f" + "data": "AssertionResultsAwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f" } ], "/LogGroup/DefaultTest/DeployAssert/BootstrapVersion": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/tree.json index 6d64767153c7b..e6088c7765700 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/logs/integ.log-group.js.snapshot/tree.json @@ -29,7 +29,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "log-group2": { @@ -53,7 +54,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "log-group-imported": { @@ -78,7 +80,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "imported-log-group": { @@ -86,7 +89,8 @@ "path": "log-group-events/imported-log-group", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Timer": { @@ -139,7 +143,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "EventsLogGroupPolicyloggroupeventsTimerC63340B0": { @@ -151,7 +156,8 @@ "path": "log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0/Provider", "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -169,7 +175,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "CustomResourcePolicy": { @@ -211,7 +218,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -241,7 +249,8 @@ "path": "log-group-events/AWS679f53fac002430cb0da5b7982bd2287/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -286,7 +295,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -306,7 +316,8 @@ "path": "log-group-events/AWS679f53fac002430cb0da5b7982bd2287/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -325,7 +336,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "cde607091ceabfbfb56e643cd4a5647680cfaf19c63f4d59b3f4880df4a71c8d.zip" + "s3Key": "9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec.zip" }, "handler": "index.handler", "role": { @@ -354,7 +365,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "CustomRule": { @@ -421,7 +433,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6": { @@ -433,7 +446,8 @@ "path": "log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6/Provider", "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -451,7 +465,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "CustomResourcePolicy": { @@ -493,7 +508,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -521,7 +537,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Timer3": { @@ -583,7 +600,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "EventsLogGroupPolicyloggroupeventsTimer37DF74C17": { @@ -595,7 +613,8 @@ "path": "log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17/Provider", "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -613,7 +632,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "CustomResourcePolicy": { @@ -655,7 +675,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -724,17 +745,17 @@ "id": "DeployAssert", "path": "LogGroup/DefaultTest/DeployAssert", "children": { - "AwsApiCallEventBridgeputEvents8b1c88915a4a579fffb75da7180f9f83": { - "id": "AwsApiCallEventBridgeputEvents8b1c88915a4a579fffb75da7180f9f83", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents8b1c88915a4a579fffb75da7180f9f83", + "AwsApiCallEventBridgeputEvents553bf9107bb038682ce514ab06253825": { + "id": "AwsApiCallEventBridgeputEvents553bf9107bb038682ce514ab06253825", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents553bf9107bb038682ce514ab06253825", "children": { "SdkProvider": { "id": "SdkProvider", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents8b1c88915a4a579fffb75da7180f9f83/SdkProvider", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents553bf9107bb038682ce514ab06253825/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents8b1c88915a4a579fffb75da7180f9f83/SdkProvider/AssertionsProvider", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents553bf9107bb038682ce514ab06253825/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", "version": "10.4.2" @@ -748,11 +769,11 @@ }, "Default": { "id": "Default", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents8b1c88915a4a579fffb75da7180f9f83/Default", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents553bf9107bb038682ce514ab06253825/Default", "children": { "Default": { "id": "Default", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents8b1c88915a4a579fffb75da7180f9f83/Default/Default", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents553bf9107bb038682ce514ab06253825/Default/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", "version": "0.0.0" @@ -761,7 +782,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -812,17 +834,17 @@ "version": "0.0.0" } }, - "AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f": { - "id": "AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f", + "AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f": { + "id": "AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f", "children": { "SdkProvider": { "id": "SdkProvider", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f/SdkProvider", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f/SdkProvider/AssertionsProvider", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", "version": "10.4.2" @@ -836,11 +858,11 @@ }, "Default": { "id": "Default", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f/Default", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f/Default", "children": { "Default": { "id": "Default", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f/Default/Default", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f/Default/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", "version": "0.0.0" @@ -849,12 +871,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "AssertionResults": { "id": "AssertionResults", - "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents7e31d8cb3bb49b7a66cfe8e835534b8f/AssertionResults", + "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEventsa43bd05484106e401947a763ca61a98f/AssertionResults", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", "version": "0.0.0" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.template.json index f969e88aa9e96..1eb8a625ed53d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.template.json @@ -31,7 +31,7 @@ ] } }, - "MyFunc1ServiceRoleDefaultPolicy3C5E9573": { + "MyFunc1inlinePolicyAddedToExecutionRole050337A59": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -47,7 +47,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "MyFunc1ServiceRoleDefaultPolicy3C5E9573", + "PolicyName": "MyFunc1inlinePolicyAddedToExecutionRole050337A59", "Roles": [ { "Ref": "MyFunc1ServiceRoleF96C5B5C" @@ -96,7 +96,6 @@ } }, "DependsOn": [ - "MyFunc1ServiceRoleDefaultPolicy3C5E9573", "MyFunc1ServiceRoleF96C5B5C" ] }, @@ -131,7 +130,7 @@ ] } }, - "MyFunc2ServiceRoleDefaultPolicyEF3319F6": { + "MyFunc2inlinePolicyAddedToExecutionRole0947C2F15": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -147,7 +146,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "MyFunc2ServiceRoleDefaultPolicyEF3319F6", + "PolicyName": "MyFunc2inlinePolicyAddedToExecutionRole0947C2F15", "Roles": [ { "Ref": "MyFunc2ServiceRole68E50443" @@ -193,7 +192,6 @@ } }, "DependsOn": [ - "MyFunc2ServiceRoleDefaultPolicyEF3319F6", "MyFunc2ServiceRole68E50443" ] }, @@ -228,7 +226,7 @@ ] } }, - "MyFunc3ServiceRoleDefaultPolicy449C4CBA": { + "MyFunc3inlinePolicyAddedToExecutionRole07587DBB8": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -244,7 +242,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "MyFunc3ServiceRoleDefaultPolicy449C4CBA", + "PolicyName": "MyFunc3inlinePolicyAddedToExecutionRole07587DBB8", "Roles": [ { "Ref": "MyFunc3ServiceRoleA69795ED" @@ -290,7 +288,6 @@ } }, "DependsOn": [ - "MyFunc3ServiceRoleDefaultPolicy449C4CBA", "MyFunc3ServiceRoleA69795ED" ] }, @@ -325,7 +322,7 @@ ] } }, - "MyFunc4ServiceRoleDefaultPolicy68C57CB2": { + "MyFunc4inlinePolicyAddedToExecutionRole092E86F7D": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -341,7 +338,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "MyFunc4ServiceRoleDefaultPolicy68C57CB2", + "PolicyName": "MyFunc4inlinePolicyAddedToExecutionRole092E86F7D", "Roles": [ { "Ref": "MyFunc4ServiceRole93C4DEFF" @@ -387,7 +384,6 @@ } }, "DependsOn": [ - "MyFunc4ServiceRoleDefaultPolicy68C57CB2", "MyFunc4ServiceRole93C4DEFF" ] }, @@ -422,7 +418,7 @@ ] } }, - "MyFunc5ServiceRoleDefaultPolicy96ABEA66": { + "MyFunc5inlinePolicyAddedToExecutionRole0431C1882": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -438,7 +434,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "MyFunc5ServiceRoleDefaultPolicy96ABEA66", + "PolicyName": "MyFunc5inlinePolicyAddedToExecutionRole0431C1882", "Roles": [ { "Ref": "MyFunc5ServiceRoleFE4CE92B" @@ -484,7 +480,6 @@ } }, "DependsOn": [ - "MyFunc5ServiceRoleDefaultPolicy96ABEA66", "MyFunc5ServiceRoleFE4CE92B" ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.template.json index ebd1caccd6896..8990748abe172 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.template.json @@ -31,7 +31,7 @@ ] } }, - "MyFunc1ServiceRoleDefaultPolicy3C5E9573": { + "MyFunc1inlinePolicyAddedToExecutionRole050337A59": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -47,7 +47,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "MyFunc1ServiceRoleDefaultPolicy3C5E9573", + "PolicyName": "MyFunc1inlinePolicyAddedToExecutionRole050337A59", "Roles": [ { "Ref": "MyFunc1ServiceRoleF96C5B5C" @@ -96,7 +96,6 @@ } }, "DependsOn": [ - "MyFunc1ServiceRoleDefaultPolicy3C5E9573", "MyFunc1ServiceRoleF96C5B5C" ] }, @@ -131,7 +130,7 @@ ] } }, - "MyFunc2ServiceRoleDefaultPolicyEF3319F6": { + "MyFunc2inlinePolicyAddedToExecutionRole0947C2F15": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -147,7 +146,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "MyFunc2ServiceRoleDefaultPolicyEF3319F6", + "PolicyName": "MyFunc2inlinePolicyAddedToExecutionRole0947C2F15", "Roles": [ { "Ref": "MyFunc2ServiceRole68E50443" @@ -193,7 +192,6 @@ } }, "DependsOn": [ - "MyFunc2ServiceRoleDefaultPolicyEF3319F6", "MyFunc2ServiceRole68E50443" ] }, @@ -228,7 +226,7 @@ ] } }, - "MyFunc3ServiceRoleDefaultPolicy449C4CBA": { + "MyFunc3inlinePolicyAddedToExecutionRole07587DBB8": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -244,7 +242,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "MyFunc3ServiceRoleDefaultPolicy449C4CBA", + "PolicyName": "MyFunc3inlinePolicyAddedToExecutionRole07587DBB8", "Roles": [ { "Ref": "MyFunc3ServiceRoleA69795ED" @@ -290,7 +288,6 @@ } }, "DependsOn": [ - "MyFunc3ServiceRoleDefaultPolicy449C4CBA", "MyFunc3ServiceRoleA69795ED" ] }, @@ -325,7 +322,7 @@ ] } }, - "MyFunc4ServiceRoleDefaultPolicy68C57CB2": { + "MyFunc4inlinePolicyAddedToExecutionRole092E86F7D": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -341,7 +338,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "MyFunc4ServiceRoleDefaultPolicy68C57CB2", + "PolicyName": "MyFunc4inlinePolicyAddedToExecutionRole092E86F7D", "Roles": [ { "Ref": "MyFunc4ServiceRole93C4DEFF" @@ -387,7 +384,6 @@ } }, "DependsOn": [ - "MyFunc4ServiceRoleDefaultPolicy68C57CB2", "MyFunc4ServiceRole93C4DEFF" ] }, @@ -422,7 +418,7 @@ ] } }, - "MyFunc5ServiceRoleDefaultPolicy96ABEA66": { + "MyFunc5inlinePolicyAddedToExecutionRole0431C1882": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -438,7 +434,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "MyFunc5ServiceRoleDefaultPolicy96ABEA66", + "PolicyName": "MyFunc5inlinePolicyAddedToExecutionRole0431C1882", "Roles": [ { "Ref": "MyFunc5ServiceRoleFE4CE92B" @@ -484,7 +480,6 @@ } }, "DependsOn": [ - "MyFunc5ServiceRoleDefaultPolicy96ABEA66", "MyFunc5ServiceRoleFE4CE92B" ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/manifest.json index 3e44f81e5b133..745cb60816ad1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/manifest.json @@ -43,7 +43,7 @@ "/Stack1/MyFunc1/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunc1ServiceRoleDefaultPolicy3C5E9573" + "data": "MyFunc1inlinePolicyAddedToExecutionRole050337A59" } ], "/Stack1/MyFunc1/Resource": [ @@ -61,7 +61,7 @@ "/Stack1/MyFunc2/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunc2ServiceRoleDefaultPolicyEF3319F6" + "data": "MyFunc2inlinePolicyAddedToExecutionRole0947C2F15" } ], "/Stack1/MyFunc2/Resource": [ @@ -79,7 +79,7 @@ "/Stack1/MyFunc3/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunc3ServiceRoleDefaultPolicy449C4CBA" + "data": "MyFunc3inlinePolicyAddedToExecutionRole07587DBB8" } ], "/Stack1/MyFunc3/Resource": [ @@ -97,7 +97,7 @@ "/Stack1/MyFunc4/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunc4ServiceRoleDefaultPolicy68C57CB2" + "data": "MyFunc4inlinePolicyAddedToExecutionRole092E86F7D" } ], "/Stack1/MyFunc4/Resource": [ @@ -115,7 +115,7 @@ "/Stack1/MyFunc5/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunc5ServiceRoleDefaultPolicy96ABEA66" + "data": "MyFunc5inlinePolicyAddedToExecutionRole0431C1882" } ], "/Stack1/MyFunc5/Resource": [ @@ -181,7 +181,7 @@ "/Stack2/MyFunc1/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunc1ServiceRoleDefaultPolicy3C5E9573" + "data": "MyFunc1inlinePolicyAddedToExecutionRole050337A59" } ], "/Stack2/MyFunc1/Resource": [ @@ -199,7 +199,7 @@ "/Stack2/MyFunc2/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunc2ServiceRoleDefaultPolicyEF3319F6" + "data": "MyFunc2inlinePolicyAddedToExecutionRole0947C2F15" } ], "/Stack2/MyFunc2/Resource": [ @@ -217,7 +217,7 @@ "/Stack2/MyFunc3/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunc3ServiceRoleDefaultPolicy449C4CBA" + "data": "MyFunc3inlinePolicyAddedToExecutionRole07587DBB8" } ], "/Stack2/MyFunc3/Resource": [ @@ -235,7 +235,7 @@ "/Stack2/MyFunc4/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunc4ServiceRoleDefaultPolicy68C57CB2" + "data": "MyFunc4inlinePolicyAddedToExecutionRole092E86F7D" } ], "/Stack2/MyFunc4/Resource": [ @@ -253,7 +253,7 @@ "/Stack2/MyFunc5/ServiceRole/DefaultPolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunc5ServiceRoleDefaultPolicy96ABEA66" + "data": "MyFunc5inlinePolicyAddedToExecutionRole0431C1882" } ], "/Stack2/MyFunc5/Resource": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/aws-cdk-lambda-1.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/aws-cdk-lambda-1.assets.json new file mode 100644 index 0000000000000..ad9c51a6f0f70 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/aws-cdk-lambda-1.assets.json @@ -0,0 +1,19 @@ +{ + "version": "39.0.0", + "files": { + "01aa4b400611081a4b66fea14086871711d5e9ea61b8882d34c339dd75887241": { + "source": { + "path": "aws-cdk-lambda-1.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "01aa4b400611081a4b66fea14086871711d5e9ea61b8882d34c339dd75887241.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/aws-cdk-lambda-1.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/aws-cdk-lambda-1.template.json new file mode 100644 index 0000000000000..ab4ccd0c8bac2 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/aws-cdk-lambda-1.template.json @@ -0,0 +1,165 @@ +{ + "Resources": { + "MyLambdaServiceRole4539ECB6": { + "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" + ] + ] + } + ] + } + }, + "MyLambdaCCE802FB": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "foo" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "MyLambdaServiceRole4539ECB6", + "Arn" + ] + }, + "Runtime": "nodejs18.x" + }, + "DependsOn": [ + "MyLambdaServiceRole4539ECB6" + ] + }, + "MyLambdainlinePolicyAddedToExecutionRole0E0144580": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "cognito:*", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "myUserPoolTestD44472FC", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyLambdainlinePolicyAddedToExecutionRole0E0144580", + "Roles": [ + { + "Ref": "MyLambdaServiceRole4539ECB6" + } + ] + } + }, + "myUserPoolTestFnCognito7EF64C97": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "MyLambdaCCE802FB", + "Arn" + ] + }, + "Principal": "cognito-idp.amazonaws.com", + "SourceArn": { + "Fn::GetAtt": [ + "myUserPoolTestD44472FC", + "Arn" + ] + } + } + }, + "myUserPoolTestD44472FC": { + "Type": "AWS::Cognito::UserPool", + "Properties": { + "AccountRecoverySetting": { + "RecoveryMechanisms": [ + { + "Name": "verified_phone_number", + "Priority": 1 + }, + { + "Name": "verified_email", + "Priority": 2 + } + ] + }, + "AdminCreateUserConfig": { + "AllowAdminCreateUserOnly": true + }, + "EmailVerificationMessage": "The verification code to your new account is {####}", + "EmailVerificationSubject": "Verify your new account", + "LambdaConfig": {}, + "SmsVerificationMessage": "The verification code to your new account is {####}", + "VerificationMessageTemplate": { + "DefaultEmailOption": "CONFIRM_WITH_CODE", + "EmailMessage": "The verification code to your new account is {####}", + "EmailSubject": "Verify your new account", + "SmsMessage": "The verification code to your new account is {####}" + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/cdk.out new file mode 100644 index 0000000000000..91e1a8b9901d5 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/integ.json new file mode 100644 index 0000000000000..be345e5c51d3e --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "39.0.0", + "testCases": { + "lambda-circular/DefaultTest": { + "stacks": [ + "aws-cdk-lambda-1" + ], + "assertionStack": "lambda-circular/DefaultTest/DeployAssert", + "assertionStackName": "lambdacircularDefaultTestDeployAssertEAADF4F8" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/lambdacircularDefaultTestDeployAssertEAADF4F8.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/lambdacircularDefaultTestDeployAssertEAADF4F8.assets.json new file mode 100644 index 0000000000000..34a921c0b3950 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/lambdacircularDefaultTestDeployAssertEAADF4F8.assets.json @@ -0,0 +1,19 @@ +{ + "version": "39.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "lambdacircularDefaultTestDeployAssertEAADF4F8.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/lambdacircularDefaultTestDeployAssertEAADF4F8.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/lambdacircularDefaultTestDeployAssertEAADF4F8.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/lambdacircularDefaultTestDeployAssertEAADF4F8.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/manifest.json new file mode 100644 index 0000000000000..7f66bbc42dee5 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/manifest.json @@ -0,0 +1,146 @@ +{ + "version": "39.0.0", + "artifacts": { + "aws-cdk-lambda-1.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-lambda-1.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-lambda-1": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-lambda-1.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/01aa4b400611081a4b66fea14086871711d5e9ea61b8882d34c339dd75887241.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-lambda-1.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-cdk-lambda-1.assets" + ], + "metadata": { + "/aws-cdk-lambda-1/MyLambda/ServiceRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambdaServiceRole4539ECB6" + } + ], + "/aws-cdk-lambda-1/MyLambda/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambdaCCE802FB" + } + ], + "/aws-cdk-lambda-1/MyLambda/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambdainlinePolicyAddedToExecutionRole0E0144580" + } + ], + "/aws-cdk-lambda-1/myUserPoolTest/FnCognito": [ + { + "type": "aws:cdk:logicalId", + "data": "myUserPoolTestFnCognito7EF64C97" + } + ], + "/aws-cdk-lambda-1/myUserPoolTest/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "myUserPoolTestD44472FC" + } + ], + "/aws-cdk-lambda-1/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-lambda-1/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ], + "MyLambdaPolicyEEA76B97": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambdaPolicyEEA76B97", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ] + }, + "displayName": "aws-cdk-lambda-1" + }, + "lambdacircularDefaultTestDeployAssertEAADF4F8.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "lambdacircularDefaultTestDeployAssertEAADF4F8.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "lambdacircularDefaultTestDeployAssertEAADF4F8": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "lambdacircularDefaultTestDeployAssertEAADF4F8.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "lambdacircularDefaultTestDeployAssertEAADF4F8.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "lambdacircularDefaultTestDeployAssertEAADF4F8.assets" + ], + "metadata": { + "/lambda-circular/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/lambda-circular/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "lambda-circular/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/tree.json new file mode 100644 index 0000000000000..23d980e37f95a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.js.snapshot/tree.json @@ -0,0 +1,318 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-lambda-1": { + "id": "aws-cdk-lambda-1", + "path": "aws-cdk-lambda-1", + "children": { + "MyLambda": { + "id": "MyLambda", + "path": "aws-cdk-lambda-1/MyLambda", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-cdk-lambda-1/MyLambda/ServiceRole", + "children": { + "ImportServiceRole": { + "id": "ImportServiceRole", + "path": "aws-cdk-lambda-1/MyLambda/ServiceRole/ImportServiceRole", + "constructInfo": { + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-lambda-1/MyLambda/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "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" + ] + ] + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-lambda-1/MyLambda/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Function", + "aws:cdk:cloudformation:props": { + "code": { + "zipFile": "foo" + }, + "handler": "index.handler", + "role": { + "Fn::GetAtt": [ + "MyLambdaServiceRole4539ECB6", + "Arn" + ] + }, + "runtime": "nodejs18.x" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-lambda-1/MyLambda/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-lambda-1/MyLambda/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "cognito:*", + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "myUserPoolTestD44472FC", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyLambdainlinePolicyAddedToExecutionRole0E0144580", + "roles": [ + { + "Ref": "MyLambdaServiceRole4539ECB6" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" + } + }, + "myUserPoolTest": { + "id": "myUserPoolTest", + "path": "aws-cdk-lambda-1/myUserPoolTest", + "children": { + "FnCognito": { + "id": "FnCognito", + "path": "aws-cdk-lambda-1/myUserPoolTest/FnCognito", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Lambda::Permission", + "aws:cdk:cloudformation:props": { + "action": "lambda:InvokeFunction", + "functionName": { + "Fn::GetAtt": [ + "MyLambdaCCE802FB", + "Arn" + ] + }, + "principal": "cognito-idp.amazonaws.com", + "sourceArn": { + "Fn::GetAtt": [ + "myUserPoolTestD44472FC", + "Arn" + ] + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-lambda-1/myUserPoolTest/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Cognito::UserPool", + "aws:cdk:cloudformation:props": { + "accountRecoverySetting": { + "recoveryMechanisms": [ + { + "name": "verified_phone_number", + "priority": 1 + }, + { + "name": "verified_email", + "priority": 2 + } + ] + }, + "adminCreateUserConfig": { + "allowAdminCreateUserOnly": true + }, + "emailVerificationMessage": "The verification code to your new account is {####}", + "emailVerificationSubject": "Verify your new account", + "lambdaConfig": { + "fn": { + "Fn::GetAtt": [ + "MyLambdaCCE802FB", + "Arn" + ] + } + }, + "smsVerificationMessage": "The verification code to your new account is {####}", + "verificationMessageTemplate": { + "defaultEmailOption": "CONFIRM_WITH_CODE", + "emailMessage": "The verification code to your new account is {####}", + "emailSubject": "Verify your new account", + "smsMessage": "The verification code to your new account is {####}" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cognito.UserPool", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-lambda-1/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-lambda-1/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "lambda-circular": { + "id": "lambda-circular", + "path": "lambda-circular", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "lambda-circular/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "lambda-circular/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "lambda-circular/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "lambda-circular/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "lambda-circular/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.4.2" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.ts new file mode 100644 index 0000000000000..c9e817b3af3dc --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-circular-test.ts @@ -0,0 +1,38 @@ +import * as iam from 'aws-cdk-lib/aws-iam'; +import * as cdk from 'aws-cdk-lib'; +import * as lambda from 'aws-cdk-lib/aws-lambda'; +import { STANDARD_NODEJS_RUNTIME } from '../../config'; +import { UserPool } from 'aws-cdk-lib/aws-cognito'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'aws-cdk-lambda-1'); + +const fn = new lambda.Function(stack, 'MyLambda', { + code: new lambda.InlineCode('foo'), + handler: 'index.handler', + runtime: STANDARD_NODEJS_RUNTIME, +}); + +const userPool = new UserPool(stack, 'myUserPoolTest', { + lambdaTriggers: { + fn, + }, +}); + +const cognitoPolicy = new iam.PolicyStatement({ + actions: ['cognito:*'], + resources: [userPool.userPoolArn], +}); + +fn.addToRolePolicy(cognitoPolicy); + +/** + * The purpose of this test is to ensure there is not a circular dependency between the resources. + * If you edit the snapshot, use yarn integ --update-on-failure to update the snapshot. + * Since only CFN will show the circular depndency error. + */ +new IntegTest(app, 'lambda-circular', { + testCases: [stack], +}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/aws-cdk-lambda-1.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/aws-cdk-lambda-1.assets.json index 77386dc0c7512..dd124b77a368c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/aws-cdk-lambda-1.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/aws-cdk-lambda-1.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "a37d3ef54c18e7738fe5dc008504591bd3b1f14c6a09ee91eac6d55f7ca5ba5f": { "source": { @@ -14,7 +14,7 @@ } } }, - "d5186e951f469ea8e615892ba5e275c8d10861c611945ad7f91447b00da5ad60": { + "7557db017e172540900b6b3422042f6a23323d004d999613775e56ac929feec3": { "source": { "path": "aws-cdk-lambda-1.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d5186e951f469ea8e615892ba5e275c8d10861c611945ad7f91447b00da5ad60.json", + "objectKey": "7557db017e172540900b6b3422042f6a23323d004d999613775e56ac929feec3.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/aws-cdk-lambda-1.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/aws-cdk-lambda-1.template.json index dea3c1531706b..dfdfd08d1859a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/aws-cdk-lambda-1.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/aws-cdk-lambda-1.template.json @@ -31,27 +31,6 @@ ] } }, - "MyLambdaServiceRoleDefaultPolicy5BBC6F68": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "Roles": [ - { - "Ref": "MyLambdaServiceRole4539ECB6" - } - ] - } - }, "MyLambdaCCE802FB": { "Type": "AWS::Lambda::Function", "Properties": { @@ -69,10 +48,30 @@ "Runtime": "nodejs18.x" }, "DependsOn": [ - "MyLambdaServiceRoleDefaultPolicy5BBC6F68", "MyLambdaServiceRole4539ECB6" ] }, + "MyLambdainlinePolicyAddedToExecutionRole0E0144580": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "*", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyLambdainlinePolicyAddedToExecutionRole0E0144580", + "Roles": [ + { + "Ref": "MyLambdaServiceRole4539ECB6" + } + ] + } + }, "MyLambdaFunctionUrlC2055677": { "Type": "AWS::Lambda::Url", "Properties": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/integ.json index 9accee5b3ffe1..7413e3e733e03 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "integ.lambda": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/manifest.json index 97556db4ae034..8fa88d14200a0 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "aws-cdk-lambda-1.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d5186e951f469ea8e615892ba5e275c8d10861c611945ad7f91447b00da5ad60.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7557db017e172540900b6b3422042f6a23323d004d999613775e56ac929feec3.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -40,16 +40,16 @@ "data": "MyLambdaServiceRole4539ECB6" } ], - "/aws-cdk-lambda-1/MyLambda/ServiceRole/DefaultPolicy/Resource": [ + "/aws-cdk-lambda-1/MyLambda/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaServiceRoleDefaultPolicy5BBC6F68" + "data": "MyLambdaCCE802FB" } ], - "/aws-cdk-lambda-1/MyLambda/Resource": [ + "/aws-cdk-lambda-1/MyLambda/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaCCE802FB" + "data": "MyLambdainlinePolicyAddedToExecutionRole0E0144580" } ], "/aws-cdk-lambda-1/MyLambda/FunctionUrl/Resource": [ @@ -91,7 +91,7 @@ "/aws-cdk-lambda-1/MySnapStartLambda": [ { "type": "aws:cdk:warning", - "data": "SnapStart only support published Lambda versions. Ignore if function already have published versions [ack: @aws-cdk/aws-lambda:snapStartRequirePublish]" + "data": "SnapStart only supports published Lambda versions. Ignore if function already has published versions. [ack: @aws-cdk/aws-lambda:snapStartRequirePublish]" } ], "/aws-cdk-lambda-1/MySnapStartLambda/ServiceRole/Resource": [ @@ -109,7 +109,7 @@ "/aws-cdk-lambda-1/MySnapStartLambdaArm": [ { "type": "aws:cdk:warning", - "data": "SnapStart only support published Lambda versions. Ignore if function already have published versions [ack: @aws-cdk/aws-lambda:snapStartRequirePublish]" + "data": "SnapStart only supports published Lambda versions. Ignore if function already has published versions. [ack: @aws-cdk/aws-lambda:snapStartRequirePublish]" } ], "/aws-cdk-lambda-1/MySnapStartLambdaArm/ServiceRole/Resource": [ @@ -135,6 +135,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "MyLambdaPolicyEEA76B97": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambdaPolicyEEA76B97", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-cdk-lambda-1" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/tree.json index 62e11bab692b9..629763a9fcefc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.js.snapshot/tree.json @@ -62,45 +62,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-lambda-1/MyLambda/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-lambda-1/MyLambda/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "roles": [ - { - "Ref": "MyLambdaServiceRole4539ECB6" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -132,6 +93,45 @@ "version": "0.0.0" } }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-lambda-1/MyLambda/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-lambda-1/MyLambda/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "*", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyLambdainlinePolicyAddedToExecutionRole0E0144580", + "roles": [ + { + "Ref": "MyLambdaServiceRole4539ECB6" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, "FunctionUrl": { "id": "FunctionUrl", "path": "aws-cdk-lambda-1/MyLambda/FunctionUrl", @@ -579,7 +579,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/aws-cdk-lambda-pce-1.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/aws-cdk-lambda-pce-1.assets.json index 30a43d759d25d..d0e4b2791e33a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/aws-cdk-lambda-pce-1.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/aws-cdk-lambda-pce-1.assets.json @@ -1,7 +1,7 @@ { - "version": "34.0.0", + "version": "39.0.0", "files": { - "94eb787de5b73b68d1daa3b92361b24a2e5dae708997ec2f1bea10f616a099c2": { + "31d9cae6a8887857ad183b56854ee22afad3351f5dbc2079af1766c174e99b2f": { "source": { "path": "aws-cdk-lambda-pce-1.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "94eb787de5b73b68d1daa3b92361b24a2e5dae708997ec2f1bea10f616a099c2.json", + "objectKey": "31d9cae6a8887857ad183b56854ee22afad3351f5dbc2079af1766c174e99b2f.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/aws-cdk-lambda-pce-1.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/aws-cdk-lambda-pce-1.template.json index 8522928e1fac3..794f025ac2a43 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/aws-cdk-lambda-pce-1.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/aws-cdk-lambda-pce-1.template.json @@ -31,27 +31,6 @@ ] } }, - "MyLambdaAliasPCEServiceRoleDefaultPolicyE7418D56": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyLambdaAliasPCEServiceRoleDefaultPolicyE7418D56", - "Roles": [ - { - "Ref": "MyLambdaAliasPCEServiceRoleF7C9F212" - } - ] - } - }, "MyLambdaAliasPCED0B8D751": { "Type": "AWS::Lambda::Function", "Properties": { @@ -69,10 +48,30 @@ "Runtime": "nodejs18.x" }, "DependsOn": [ - "MyLambdaAliasPCEServiceRoleDefaultPolicyE7418D56", "MyLambdaAliasPCEServiceRoleF7C9F212" ] }, + "MyLambdaAliasPCEinlinePolicyAddedToExecutionRole0F563738B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "*", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyLambdaAliasPCEinlinePolicyAddedToExecutionRole0F563738B", + "Roles": [ + { + "Ref": "MyLambdaAliasPCEServiceRoleF7C9F212" + } + ] + } + }, "MyLambdaAliasPCECurrentVersion072335D3abd7022526e1eae404a6f2a50ba64569": { "Type": "AWS::Lambda::Version", "Properties": { @@ -140,27 +139,6 @@ ] } }, - "MyLambdaVersionPCEServiceRoleDefaultPolicy229A1552": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyLambdaVersionPCEServiceRoleDefaultPolicy229A1552", - "Roles": [ - { - "Ref": "MyLambdaVersionPCEServiceRole2ACFB73E" - } - ] - } - }, "MyLambdaVersionPCEA3A0D86B": { "Type": "AWS::Lambda::Function", "Properties": { @@ -178,10 +156,30 @@ "Runtime": "nodejs18.x" }, "DependsOn": [ - "MyLambdaVersionPCEServiceRoleDefaultPolicy229A1552", "MyLambdaVersionPCEServiceRole2ACFB73E" ] }, + "MyLambdaVersionPCEinlinePolicyAddedToExecutionRole0C74308E8": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "*", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyLambdaVersionPCEinlinePolicyAddedToExecutionRole0C74308E8", + "Roles": [ + { + "Ref": "MyLambdaVersionPCEServiceRole2ACFB73E" + } + ] + } + }, "MyLambdaVersionPCECurrentVersion27FC3932e3372865403c1e027068d9691afe3f3f": { "Type": "AWS::Lambda::Version", "Properties": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/cdk.out index 2313ab5436501..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"34.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/integ.json index 23a607683af70..e5a3b7448b08e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "39.0.0", "testCases": { "integ.lambda.prov.concurrent": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/manifest.json index 4ebe7fdb25398..337ab9845e665 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "39.0.0", "artifacts": { "aws-cdk-lambda-pce-1.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-cdk-lambda-pce-1.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/94eb787de5b73b68d1daa3b92361b24a2e5dae708997ec2f1bea10f616a099c2.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/31d9cae6a8887857ad183b56854ee22afad3351f5dbc2079af1766c174e99b2f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -39,16 +40,16 @@ "data": "MyLambdaAliasPCEServiceRoleF7C9F212" } ], - "/aws-cdk-lambda-pce-1/MyLambdaAliasPCE/ServiceRole/DefaultPolicy/Resource": [ + "/aws-cdk-lambda-pce-1/MyLambdaAliasPCE/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaAliasPCEServiceRoleDefaultPolicyE7418D56" + "data": "MyLambdaAliasPCED0B8D751" } ], - "/aws-cdk-lambda-pce-1/MyLambdaAliasPCE/Resource": [ + "/aws-cdk-lambda-pce-1/MyLambdaAliasPCE/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaAliasPCED0B8D751" + "data": "MyLambdaAliasPCEinlinePolicyAddedToExecutionRole0F563738B" } ], "/aws-cdk-lambda-pce-1/MyLambdaAliasPCE/CurrentVersion/Resource": [ @@ -75,16 +76,16 @@ "data": "MyLambdaVersionPCEServiceRole2ACFB73E" } ], - "/aws-cdk-lambda-pce-1/MyLambdaVersionPCE/ServiceRole/DefaultPolicy/Resource": [ + "/aws-cdk-lambda-pce-1/MyLambdaVersionPCE/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaVersionPCEServiceRoleDefaultPolicy229A1552" + "data": "MyLambdaVersionPCEA3A0D86B" } ], - "/aws-cdk-lambda-pce-1/MyLambdaVersionPCE/Resource": [ + "/aws-cdk-lambda-pce-1/MyLambdaVersionPCE/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaVersionPCEA3A0D86B" + "data": "MyLambdaVersionPCEinlinePolicyAddedToExecutionRole0C74308E8" } ], "/aws-cdk-lambda-pce-1/MyLambdaVersionPCE/CurrentVersion/Resource": [ @@ -117,19 +118,19 @@ "data": "CheckBootstrapVersion" } ], - "MyLambdaAliasPCECurrentVersion072335D34a3f83f8218b6b94346920ff28a940e4": [ + "MyLambdaAliasPCEServiceRoleDefaultPolicyE7418D56": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaAliasPCECurrentVersion072335D34a3f83f8218b6b94346920ff28a940e4", + "data": "MyLambdaAliasPCEServiceRoleDefaultPolicyE7418D56", "trace": [ "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" ] } ], - "MyLambdaVersionPCECurrentVersion27FC39322c322873dbc351359405806a77875357": [ + "MyLambdaVersionPCEServiceRoleDefaultPolicy229A1552": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaVersionPCECurrentVersion27FC39322c322873dbc351359405806a77875357", + "data": "MyLambdaVersionPCEServiceRoleDefaultPolicy229A1552", "trace": [ "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" ] diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/tree.json index 5cdbe1b7a5d65..a46ba7608f653 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.prov.concurrent.js.snapshot/tree.json @@ -62,45 +62,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-lambda-pce-1/MyLambdaAliasPCE/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-lambda-pce-1/MyLambdaAliasPCE/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "MyLambdaAliasPCEServiceRoleDefaultPolicyE7418D56", - "roles": [ - { - "Ref": "MyLambdaAliasPCEServiceRoleF7C9F212" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -132,6 +93,45 @@ "version": "0.0.0" } }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-lambda-pce-1/MyLambdaAliasPCE/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-lambda-pce-1/MyLambdaAliasPCE/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "*", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyLambdaAliasPCEinlinePolicyAddedToExecutionRole0F563738B", + "roles": [ + { + "Ref": "MyLambdaAliasPCEServiceRoleF7C9F212" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, "CurrentVersion": { "id": "CurrentVersion", "path": "aws-cdk-lambda-pce-1/MyLambdaAliasPCE/CurrentVersion", @@ -280,45 +280,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-lambda-pce-1/MyLambdaVersionPCE/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-lambda-pce-1/MyLambdaVersionPCE/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "MyLambdaVersionPCEServiceRoleDefaultPolicy229A1552", - "roles": [ - { - "Ref": "MyLambdaVersionPCEServiceRole2ACFB73E" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -350,6 +311,45 @@ "version": "0.0.0" } }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-lambda-pce-1/MyLambdaVersionPCE/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-lambda-pce-1/MyLambdaVersionPCE/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "*", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyLambdaVersionPCEinlinePolicyAddedToExecutionRole0C74308E8", + "roles": [ + { + "Ref": "MyLambdaVersionPCEServiceRole2ACFB73E" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, "CurrentVersion": { "id": "CurrentVersion", "path": "aws-cdk-lambda-pce-1/MyLambdaVersionPCE/CurrentVersion", @@ -471,7 +471,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/cdk-integ-cluster-snapshot.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/cdk-integ-cluster-snapshot.assets.json index 7a18d77f7ef7c..3a17d204f0210 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/cdk-integ-cluster-snapshot.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/cdk-integ-cluster-snapshot.assets.json @@ -27,7 +27,7 @@ } } }, - "94a049b3839eccda570b3c06d2537684d417f05038c6400eed1ecd5120ba59a6": { + "7d7a91a0bd9ac4768d2d2984d4f77488355cfa4b7749ed02dfbc86550929b07e": { "source": { "path": "cdk-integ-cluster-snapshot.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "94a049b3839eccda570b3c06d2537684d417f05038c6400eed1ecd5120ba59a6.json", + "objectKey": "7d7a91a0bd9ac4768d2d2984d4f77488355cfa4b7749ed02dfbc86550929b07e.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/cdk-integ-cluster-snapshot.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/cdk-integ-cluster-snapshot.template.json index c211fcbbcf7e2..0ee396b89fcc3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/cdk-integ-cluster-snapshot.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/cdk-integ-cluster-snapshot.template.json @@ -541,7 +541,29 @@ ] } }, - "SnapshoterOnEventHandlerServiceRoleDefaultPolicyAF0DFD57": { + "SnapshoterOnEventHandlerDF82DF85": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "7531d12b1fd853bba70fda1369698d729b1ef9986621d19d7cbdbf9648a32ba5.zip" + }, + "Handler": "index.onEventHandler", + "Role": { + "Fn::GetAtt": [ + "SnapshoterOnEventHandlerServiceRole7F84B26D", + "Arn" + ] + }, + "Runtime": "nodejs18.x" + }, + "DependsOn": [ + "SnapshoterOnEventHandlerServiceRole7F84B26D" + ] + }, + "SnapshoterOnEventHandlerinlinePolicyAddedToExecutionRole0AEE7BA05": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -601,7 +623,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "SnapshoterOnEventHandlerServiceRoleDefaultPolicyAF0DFD57", + "PolicyName": "SnapshoterOnEventHandlerinlinePolicyAddedToExecutionRole0AEE7BA05", "Roles": [ { "Ref": "SnapshoterOnEventHandlerServiceRole7F84B26D" @@ -609,29 +631,6 @@ ] } }, - "SnapshoterOnEventHandlerDF82DF85": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7531d12b1fd853bba70fda1369698d729b1ef9986621d19d7cbdbf9648a32ba5.zip" - }, - "Handler": "index.onEventHandler", - "Role": { - "Fn::GetAtt": [ - "SnapshoterOnEventHandlerServiceRole7F84B26D", - "Arn" - ] - }, - "Runtime": "nodejs18.x" - }, - "DependsOn": [ - "SnapshoterOnEventHandlerServiceRoleDefaultPolicyAF0DFD57", - "SnapshoterOnEventHandlerServiceRole7F84B26D" - ] - }, "SnapshoterIsCompleteHandlerServiceRole40F5F1A8": { "Type": "AWS::IAM::Role", "Properties": { @@ -663,7 +662,29 @@ ] } }, - "SnapshoterIsCompleteHandlerServiceRoleDefaultPolicyA43EB222": { + "SnapshoterIsCompleteHandler93DE2591": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "7531d12b1fd853bba70fda1369698d729b1ef9986621d19d7cbdbf9648a32ba5.zip" + }, + "Handler": "index.isCompleteHandler", + "Role": { + "Fn::GetAtt": [ + "SnapshoterIsCompleteHandlerServiceRole40F5F1A8", + "Arn" + ] + }, + "Runtime": "nodejs18.x" + }, + "DependsOn": [ + "SnapshoterIsCompleteHandlerServiceRole40F5F1A8" + ] + }, + "SnapshoterIsCompleteHandlerinlinePolicyAddedToExecutionRole0847096B9": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -720,7 +741,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "SnapshoterIsCompleteHandlerServiceRoleDefaultPolicyA43EB222", + "PolicyName": "SnapshoterIsCompleteHandlerinlinePolicyAddedToExecutionRole0847096B9", "Roles": [ { "Ref": "SnapshoterIsCompleteHandlerServiceRole40F5F1A8" @@ -728,29 +749,6 @@ ] } }, - "SnapshoterIsCompleteHandler93DE2591": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "7531d12b1fd853bba70fda1369698d729b1ef9986621d19d7cbdbf9648a32ba5.zip" - }, - "Handler": "index.isCompleteHandler", - "Role": { - "Fn::GetAtt": [ - "SnapshoterIsCompleteHandlerServiceRole40F5F1A8", - "Arn" - ] - }, - "Runtime": "nodejs18.x" - }, - "DependsOn": [ - "SnapshoterIsCompleteHandlerServiceRoleDefaultPolicyA43EB222", - "SnapshoterIsCompleteHandlerServiceRole40F5F1A8" - ] - }, "SnapshoterSnapshotProviderframeworkonEventServiceRole29C21F76": { "Type": "AWS::IAM::Role", "Properties": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/manifest.json index 85d92ea1c8187..6a1cc1407fc05 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/94a049b3839eccda570b3c06d2537684d417f05038c6400eed1ecd5120ba59a6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7d7a91a0bd9ac4768d2d2984d4f77488355cfa4b7749ed02dfbc86550929b07e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -208,16 +208,16 @@ "data": "SnapshoterOnEventHandlerServiceRole7F84B26D" } ], - "/cdk-integ-cluster-snapshot/Snapshoter/OnEventHandler/ServiceRole/DefaultPolicy/Resource": [ + "/cdk-integ-cluster-snapshot/Snapshoter/OnEventHandler/Resource": [ { "type": "aws:cdk:logicalId", - "data": "SnapshoterOnEventHandlerServiceRoleDefaultPolicyAF0DFD57" + "data": "SnapshoterOnEventHandlerDF82DF85" } ], - "/cdk-integ-cluster-snapshot/Snapshoter/OnEventHandler/Resource": [ + "/cdk-integ-cluster-snapshot/Snapshoter/OnEventHandler/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "SnapshoterOnEventHandlerDF82DF85" + "data": "SnapshoterOnEventHandlerinlinePolicyAddedToExecutionRole0AEE7BA05" } ], "/cdk-integ-cluster-snapshot/Snapshoter/IsCompleteHandler/ServiceRole/Resource": [ @@ -226,16 +226,16 @@ "data": "SnapshoterIsCompleteHandlerServiceRole40F5F1A8" } ], - "/cdk-integ-cluster-snapshot/Snapshoter/IsCompleteHandler/ServiceRole/DefaultPolicy/Resource": [ + "/cdk-integ-cluster-snapshot/Snapshoter/IsCompleteHandler/Resource": [ { "type": "aws:cdk:logicalId", - "data": "SnapshoterIsCompleteHandlerServiceRoleDefaultPolicyA43EB222" + "data": "SnapshoterIsCompleteHandler93DE2591" } ], - "/cdk-integ-cluster-snapshot/Snapshoter/IsCompleteHandler/Resource": [ + "/cdk-integ-cluster-snapshot/Snapshoter/IsCompleteHandler/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "SnapshoterIsCompleteHandler93DE2591" + "data": "SnapshoterIsCompleteHandlerinlinePolicyAddedToExecutionRole0847096B9" } ], "/cdk-integ-cluster-snapshot/Snapshoter/SnapshotProvider/framework-onEvent/ServiceRole/Resource": [ @@ -417,6 +417,24 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "SnapshoterOnEventHandlerServiceRoleDefaultPolicyAF0DFD57": [ + { + "type": "aws:cdk:logicalId", + "data": "SnapshoterOnEventHandlerServiceRoleDefaultPolicyAF0DFD57", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "SnapshoterIsCompleteHandlerServiceRoleDefaultPolicyA43EB222": [ + { + "type": "aws:cdk:logicalId", + "data": "SnapshoterIsCompleteHandlerServiceRoleDefaultPolicyA43EB222", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "cdk-integ-cluster-snapshot" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/tree.json index b14e6db405b9e..35de7aab9b5bb 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-rds/test/integ.cluster-snapshot.js.snapshot/tree.json @@ -84,7 +84,8 @@ "path": "cdk-integ-cluster-snapshot/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -199,7 +200,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PublicSubnet2": { @@ -251,7 +253,8 @@ "path": "cdk-integ-cluster-snapshot/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -318,7 +321,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -370,7 +374,8 @@ "path": "cdk-integ-cluster-snapshot/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -437,7 +442,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet2": { @@ -489,7 +495,8 @@ "path": "cdk-integ-cluster-snapshot/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -556,7 +563,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -600,7 +608,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cluster": { @@ -636,7 +645,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_rds.SubnetGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SecurityGroup": { @@ -670,7 +680,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "AuroraMySqlDatabaseClusterEngineDefaultParameterGroup": { @@ -678,7 +689,8 @@ "path": "cdk-integ-cluster-snapshot/Cluster/AuroraMySqlDatabaseClusterEngineDefaultParameterGroup", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Secret": { @@ -742,13 +754,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_rds.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -808,7 +822,8 @@ "path": "cdk-integ-cluster-snapshot/Cluster/Instance1Wrapper", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Instance1": { @@ -837,7 +852,8 @@ "path": "cdk-integ-cluster-snapshot/Cluster/Instance2Wrapper", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Instance2": { @@ -864,7 +880,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_rds.DatabaseCluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Snapshoter": { @@ -884,7 +901,8 @@ "path": "cdk-integ-cluster-snapshot/Snapshoter/OnEventHandler/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -925,97 +943,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "cdk-integ-cluster-snapshot/Snapshoter/OnEventHandler/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "cdk-integ-cluster-snapshot/Snapshoter/OnEventHandler/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "rds:CreateDBClusterSnapshot", - "rds:DeleteDBClusterSnapshot" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":rds:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster-snapshot:cdk-integ-cluster-snapshot" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":rds:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster:", - { - "Ref": "ClusterEB0386A7" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "policyName": "SnapshoterOnEventHandlerServiceRoleDefaultPolicyAF0DFD57", - "roles": [ - { - "Ref": "SnapshoterOnEventHandlerServiceRole7F84B26D" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1035,7 +968,8 @@ "path": "cdk-integ-cluster-snapshot/Snapshoter/OnEventHandler/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1070,11 +1004,99 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "cdk-integ-cluster-snapshot/Snapshoter/OnEventHandler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-integ-cluster-snapshot/Snapshoter/OnEventHandler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "rds:CreateDBClusterSnapshot", + "rds:DeleteDBClusterSnapshot" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":rds:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster-snapshot:cdk-integ-cluster-snapshot" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":rds:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "SnapshoterOnEventHandlerinlinePolicyAddedToExecutionRole0AEE7BA05", + "roles": [ + { + "Ref": "SnapshoterOnEventHandlerServiceRole7F84B26D" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IsCompleteHandler": { @@ -1090,7 +1112,8 @@ "path": "cdk-integ-cluster-snapshot/Snapshoter/IsCompleteHandler/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1131,94 +1154,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "cdk-integ-cluster-snapshot/Snapshoter/IsCompleteHandler/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "cdk-integ-cluster-snapshot/Snapshoter/IsCompleteHandler/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "rds:DescribeDBClusterSnapshots", - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":rds:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster-snapshot:cdk-integ-cluster-snapshot" - ] - ] - }, - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":rds:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster:", - { - "Ref": "ClusterEB0386A7" - } - ] - ] - } - ] - } - ], - "Version": "2012-10-17" - }, - "policyName": "SnapshoterIsCompleteHandlerServiceRoleDefaultPolicyA43EB222", - "roles": [ - { - "Ref": "SnapshoterIsCompleteHandlerServiceRole40F5F1A8" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1247,11 +1188,96 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "cdk-integ-cluster-snapshot/Snapshoter/IsCompleteHandler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-integ-cluster-snapshot/Snapshoter/IsCompleteHandler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "rds:DescribeDBClusterSnapshots", + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":rds:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster-snapshot:cdk-integ-cluster-snapshot" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":rds:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "SnapshoterIsCompleteHandlerinlinePolicyAddedToExecutionRole0847096B9", + "roles": [ + { + "Ref": "SnapshoterIsCompleteHandlerServiceRole40F5F1A8" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SnapshotProvider": { @@ -1271,7 +1297,8 @@ "path": "cdk-integ-cluster-snapshot/Snapshoter/SnapshotProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1397,13 +1424,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1423,7 +1452,8 @@ "path": "cdk-integ-cluster-snapshot/Snapshoter/SnapshotProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1491,7 +1521,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "framework-isComplete": { @@ -1507,7 +1538,8 @@ "path": "cdk-integ-cluster-snapshot/Snapshoter/SnapshotProvider/framework-isComplete/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1626,13 +1658,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1652,7 +1686,8 @@ "path": "cdk-integ-cluster-snapshot/Snapshoter/SnapshotProvider/framework-isComplete/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1717,7 +1752,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "framework-onTimeout": { @@ -1733,7 +1769,8 @@ "path": "cdk-integ-cluster-snapshot/Snapshoter/SnapshotProvider/framework-onTimeout/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1852,13 +1889,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1878,7 +1917,8 @@ "path": "cdk-integ-cluster-snapshot/Snapshoter/SnapshotProvider/framework-onTimeout/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1943,7 +1983,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "waiter-state-machine": { @@ -1959,7 +2000,8 @@ "path": "cdk-integ-cluster-snapshot/Snapshoter/SnapshotProvider/waiter-state-machine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2080,13 +2122,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LogGroup": { @@ -2122,7 +2166,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2209,7 +2254,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -2259,7 +2305,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_rds.SubnetGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SecurityGroup": { @@ -2332,7 +2379,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "AuroraMySqlDatabaseClusterEngineDefaultParameterGroup": { @@ -2340,7 +2388,8 @@ "path": "cdk-integ-cluster-snapshot/FromSnapshot/AuroraMySqlDatabaseClusterEngineDefaultParameterGroup", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SnapshotSecret": { @@ -2433,13 +2482,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.RotationSchedule", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Policy": { @@ -2493,13 +2544,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.ResourcePolicy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_rds.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2553,7 +2606,8 @@ "path": "cdk-integ-cluster-snapshot/FromSnapshot/Instance1Wrapper", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Instance1": { @@ -2582,7 +2636,8 @@ "path": "cdk-integ-cluster-snapshot/FromSnapshot/Instance2Wrapper", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Instance2": { @@ -2641,7 +2696,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SARMapping": { @@ -2729,7 +2785,8 @@ "path": "cdk-integ-cluster-snapshot/FromSnapshot/RotationSingleUser/RotationLambda", "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.FunctionBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -2741,7 +2798,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_rds.DatabaseClusterFromSnapshot", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "BootstrapVersion": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/manifest.json index bfdccbe5621a2..752ac54a8f12a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1eb23f0c1530d4e1359cc854e58c0261b628724a0b142381d7d1b28f13bc9ca8.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6c9f52443089a027b0bd86eb3d28fdd6e167a227301e45c975187301d9dc6ddc.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -85,10 +85,13 @@ "/test-bucket-deployments-1/DeployWithInvalidation/AwsCliLayer/Resource": [ { "type": "aws:cdk:logicalId", - "data": "DeployWithInvalidationAwsCliLayerDEDD5787", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" - ] + "data": "DeployWithInvalidationAwsCliLayerDEDD5787" + } + ], + "/test-bucket-deployments-1/DeployWithInvalidation/CustomResourceHandler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DeployWithInvalidationCustomResourceHandlerinlinePolicyAddedToExecutionRole053D7D0A3" } ], "/test-bucket-deployments-1/DeployWithInvalidation/CustomResource/Default": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/test-bucket-deployments-1.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/test-bucket-deployments-1.assets.json index a3de1eb54b20f..8b397fca0736b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/test-bucket-deployments-1.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/test-bucket-deployments-1.assets.json @@ -53,7 +53,7 @@ } } }, - "1eb23f0c1530d4e1359cc854e58c0261b628724a0b142381d7d1b28f13bc9ca8": { + "6c9f52443089a027b0bd86eb3d28fdd6e167a227301e45c975187301d9dc6ddc": { "source": { "path": "test-bucket-deployments-1.template.json", "packaging": "file" @@ -61,7 +61,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1eb23f0c1530d4e1359cc854e58c0261b628724a0b142381d7d1b28f13bc9ca8.json", + "objectKey": "6c9f52443089a027b0bd86eb3d28fdd6e167a227301e45c975187301d9dc6ddc.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/test-bucket-deployments-1.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/test-bucket-deployments-1.template.json index 1d8df4818afbb..546a8a21ac957 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/test-bucket-deployments-1.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/test-bucket-deployments-1.template.json @@ -214,6 +214,30 @@ "Description": "/opt/awscli/aws" } }, + "DeployWithInvalidationCustomResourceHandlerinlinePolicyAddedToExecutionRole053D7D0A3": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "cloudfront:CreateInvalidation", + "cloudfront:GetInvalidation" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DeployWithInvalidationCustomResourceHandlerinlinePolicyAddedToExecutionRole053D7D0A3", + "Roles": [ + { + "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" + } + ] + } + }, "DeployWithInvalidationCustomResourceE3FF7455": { "Type": "Custom::CDKBucketDeployment", "Properties": { @@ -360,14 +384,6 @@ ] } ] - }, - { - "Action": [ - "cloudfront:CreateInvalidation", - "cloudfront:GetInvalidation" - ], - "Effect": "Allow", - "Resource": "*" } ], "Version": "2012-10-17" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/tree.json index 0b78a3aeeb06a..695316ec38b8a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-s3-deployment/test/integ.bucket-deployment-cloudfront.js.snapshot/tree.json @@ -102,7 +102,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "AutoDeleteObjectsCustomResource": { @@ -120,13 +121,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LatestNodeRuntimeMap": { @@ -234,7 +237,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CloudFrontWebDistribution", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "DeployWithInvalidation": { @@ -262,7 +266,8 @@ "path": "test-bucket-deployments-1/DeployWithInvalidation/AwsCliLayer/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -294,15 +299,62 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.lambda_layer_awscli.AwsCliLayer", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "CustomResourceHandler": { "id": "CustomResourceHandler", "path": "test-bucket-deployments-1/DeployWithInvalidation/CustomResourceHandler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "test-bucket-deployments-1/DeployWithInvalidation/CustomResourceHandler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "test-bucket-deployments-1/DeployWithInvalidation/CustomResourceHandler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "cloudfront:CreateInvalidation", + "cloudfront:GetInvalidation" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "DeployWithInvalidationCustomResourceHandlerinlinePolicyAddedToExecutionRole053D7D0A3", + "roles": [ + { + "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756CServiceRole89A01265" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Asset1": { @@ -322,7 +374,8 @@ "path": "test-bucket-deployments-1/DeployWithInvalidation/Asset1/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -346,7 +399,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -368,7 +422,8 @@ "path": "test-bucket-deployments-1/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -499,14 +554,6 @@ ] } ] - }, - { - "Action": [ - "cloudfront:CreateInvalidation", - "cloudfront:GetInvalidation" - ], - "Effect": "Allow", - "Resource": "*" } ], "Version": "2012-10-17" @@ -527,13 +574,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -553,7 +602,8 @@ "path": "test-bucket-deployments-1/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -603,7 +653,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "BootstrapVersion": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdk-integ-secret-lambda-rotation.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdk-integ-secret-lambda-rotation.assets.json index 1ff07329c759a..7536da60a6572 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdk-integ-secret-lambda-rotation.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdk-integ-secret-lambda-rotation.assets.json @@ -1,7 +1,7 @@ { - "version": "34.0.0", + "version": "39.0.0", "files": { - "dc90d37690ac7b3f65298669ac91e7fd063d66752c781aab7febf755ae8694bf": { + "3d4e1f549965bae3bf9693d144eaf07c48793440a0aef2a164e5edff57de72ea": { "source": { "path": "cdk-integ-secret-lambda-rotation.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dc90d37690ac7b3f65298669ac91e7fd063d66752c781aab7febf755ae8694bf.json", + "objectKey": "3d4e1f549965bae3bf9693d144eaf07c48793440a0aef2a164e5edff57de72ea.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdk-integ-secret-lambda-rotation.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdk-integ-secret-lambda-rotation.template.json index 658bd5c501b9f..9acf4e4f6b9f4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdk-integ-secret-lambda-rotation.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdk-integ-secret-lambda-rotation.template.json @@ -216,39 +216,6 @@ ] } }, - "LambdaServiceRoleDefaultPolicyDAE46E21": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "secretsmanager:DescribeSecret", - "secretsmanager:GetSecretValue", - "secretsmanager:PutSecretValue", - "secretsmanager:UpdateSecretVersionStage" - ], - "Effect": "Allow", - "Resource": { - "Ref": "SecretA720EF05" - } - }, - { - "Action": "secretsmanager:GetRandomPassword", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "LambdaServiceRoleDefaultPolicyDAE46E21", - "Roles": [ - { - "Ref": "LambdaServiceRoleA8ED4D3B" - } - ] - } - }, "LambdaD247545B": { "Type": "AWS::Lambda::Function", "Properties": { @@ -265,7 +232,6 @@ "Runtime": "nodejs18.x" }, "DependsOn": [ - "LambdaServiceRoleDefaultPolicyDAE46E21", "LambdaServiceRoleA8ED4D3B" ] }, @@ -281,6 +247,55 @@ }, "Principal": "secretsmanager.amazonaws.com" } + }, + "LambdainlinePolicyAddedToExecutionRole06CEA97D1": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "secretsmanager:DescribeSecret", + "secretsmanager:GetSecretValue", + "secretsmanager:PutSecretValue", + "secretsmanager:UpdateSecretVersionStage" + ], + "Effect": "Allow", + "Resource": { + "Ref": "SecretA720EF05" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "LambdainlinePolicyAddedToExecutionRole06CEA97D1", + "Roles": [ + { + "Ref": "LambdaServiceRoleA8ED4D3B" + } + ] + } + }, + "LambdainlinePolicyAddedToExecutionRole1629BC4CB": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "secretsmanager:GetRandomPassword", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "LambdainlinePolicyAddedToExecutionRole1629BC4CB", + "Roles": [ + { + "Ref": "LambdaServiceRoleA8ED4D3B" + } + ] + } } }, "Parameters": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdk.out index 2313ab5436501..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"34.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdkintegsecretlambdarotationtestDefaultTestDeployAssert65AE5426.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdkintegsecretlambdarotationtestDefaultTestDeployAssert65AE5426.assets.json index 7def35f8b0cb0..c90a255b40dd3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdkintegsecretlambdarotationtestDefaultTestDeployAssert65AE5426.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/cdkintegsecretlambdarotationtestDefaultTestDeployAssert65AE5426.assets.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/integ.json index b0efdefe34eda..fc7face495e5c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "39.0.0", "testCases": { "cdk-integ-secret-lambda-rotation-test/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/manifest.json index f257469dc3319..4d11f3535b335 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "39.0.0", "artifacts": { "cdk-integ-secret-lambda-rotation.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "cdk-integ-secret-lambda-rotation.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dc90d37690ac7b3f65298669ac91e7fd063d66752c781aab7febf755ae8694bf.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3d4e1f549965bae3bf9693d144eaf07c48793440a0aef2a164e5edff57de72ea.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -63,12 +64,6 @@ "data": "LambdaServiceRoleA8ED4D3B" } ], - "/cdk-integ-secret-lambda-rotation/Lambda/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "LambdaServiceRoleDefaultPolicyDAE46E21" - } - ], "/cdk-integ-secret-lambda-rotation/Lambda/Resource": [ { "type": "aws:cdk:logicalId", @@ -81,6 +76,18 @@ "data": "LambdaInvokeN0a2GKfZP0JmDqDEVhhu6A0TUv3NyNbk4YMFKNc69846677" } ], + "/cdk-integ-secret-lambda-rotation/Lambda/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdainlinePolicyAddedToExecutionRole06CEA97D1" + } + ], + "/cdk-integ-secret-lambda-rotation/Lambda/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdainlinePolicyAddedToExecutionRole1629BC4CB" + } + ], "/cdk-integ-secret-lambda-rotation/BootstrapVersion": [ { "type": "aws:cdk:logicalId", @@ -92,6 +99,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "LambdaServiceRoleDefaultPolicyDAE46E21": [ + { + "type": "aws:cdk:logicalId", + "data": "LambdaServiceRoleDefaultPolicyDAE46E21", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "cdk-integ-secret-lambda-rotation" @@ -109,6 +125,7 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "cdkintegsecretlambdarotationtestDefaultTestDeployAssert65AE5426.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/tree.json index d20587d644344..e8c9efee881ed 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-secretsmanager/test/integ.lambda-rotation.js.snapshot/tree.json @@ -312,57 +312,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "cdk-integ-secret-lambda-rotation/Lambda/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "cdk-integ-secret-lambda-rotation/Lambda/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "secretsmanager:DescribeSecret", - "secretsmanager:GetSecretValue", - "secretsmanager:PutSecretValue", - "secretsmanager:UpdateSecretVersionStage" - ], - "Effect": "Allow", - "Resource": { - "Ref": "SecretA720EF05" - } - }, - { - "Action": "secretsmanager:GetRandomPassword", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "LambdaServiceRoleDefaultPolicyDAE46E21", - "roles": [ - { - "Ref": "LambdaServiceRoleA8ED4D3B" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -414,6 +363,91 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "cdk-integ-secret-lambda-rotation/Lambda/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-integ-secret-lambda-rotation/Lambda/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "secretsmanager:DescribeSecret", + "secretsmanager:GetSecretValue", + "secretsmanager:PutSecretValue", + "secretsmanager:UpdateSecretVersionStage" + ], + "Effect": "Allow", + "Resource": { + "Ref": "SecretA720EF05" + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "LambdainlinePolicyAddedToExecutionRole06CEA97D1", + "roles": [ + { + "Ref": "LambdaServiceRoleA8ED4D3B" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "cdk-integ-secret-lambda-rotation/Lambda/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-integ-secret-lambda-rotation/Lambda/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "secretsmanager:GetRandomPassword", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "LambdainlinePolicyAddedToExecutionRole1629BC4CB", + "roles": [ + { + "Ref": "LambdaServiceRoleA8ED4D3B" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -456,7 +490,7 @@ "path": "cdk-integ-secret-lambda-rotation-test/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.4.2" } }, "DeployAssert": { @@ -502,7 +536,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/doc/doc-style.css b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/doc/doc-style.css new file mode 100644 index 0000000000000..2019a1b7659c6 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/doc/doc-style.css @@ -0,0 +1,403 @@ +/* + +Original highlight.js style (c) Ivan Sagalaev + +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} +/* Base color: saturation 0; */ +.hljs, +.hljs-subst { + color: #444; +} +.hljs-comment { + color: #888888; +} +.hljs-keyword, +.hljs-attribute, +.hljs-selector-tag, +.hljs-meta-keyword, +.hljs-doctag, +.hljs-name { + font-weight: bold; +} +/* User color: hue: 0 */ +.hljs-type, +.hljs-string, +.hljs-number, +.hljs-selector-id, +.hljs-selector-class, +.hljs-quote, +.hljs-template-tag, +.hljs-deletion { + color: #880000; +} +.hljs-title, +.hljs-section { + color: #880000; + font-weight: bold; +} +.hljs-regexp, +.hljs-symbol, +.hljs-variable, +.hljs-template-variable, +.hljs-link, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #BC6060; +} +/* Language color: hue: 90; */ +.hljs-literal { + color: #78A960; +} +.hljs-built_in, +.hljs-bullet, +.hljs-code, +.hljs-addition { + color: #397300; +} +/* Meta color: hue: 200 */ +.hljs-meta { + color: #1f7199; +} +.hljs-meta-string { + color: #4d99bf; +} +/* Misc effects */ +.hljs-emphasis { + font-style: italic; +} +.hljs-strong { + font-weight: bold; +} +body { + font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; + font-size: 15px; + line-height: 22px; + margin: 0; + padding: 0; + background: #ffffff; + color: #4d4d4d; +} +p, +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0 0 15px 0; +} +h1 { + margin-top: 40px; +} +a { + color: #880000; +} +a:visited { + color: #880000; +} +#tree, +#headings { + position: absolute; + top: 30px; + left: 0; + bottom: 0; + width: 290px; + padding: 10px 0; + overflow: auto; +} +#sidebar_wrapper { + position: fixed; + top: 0; + left: 0; + bottom: 0; + width: 0; + overflow: hidden; + background: #e7e7e7; +} +#sidebar_switch { + position: absolute; + top: 0; + left: 0; + width: 290px; + height: 29px; + border-bottom: 1px solid; + background: #e2e2e2; + border-bottom-color: #d6d6d6; +} +#sidebar_switch span { + display: block; + float: left; + width: 50%; + text-align: center; + line-height: 29px; + cursor: pointer; + color: #4b4b4b; +} +#sidebar_switch span:hover { + background: #e7e7e7; +} +#sidebar_switch .selected { + font-weight: bold; + background: #ededed; + color: #444; +} +.slidey #sidebar_wrapper { + -webkit-transition: width 250ms linear; + -moz-transition: width 250ms linear; + -ms-transition: width 250ms linear; + -o-transition: width 250ms linear; + transition: width 250ms linear; +} +.sidebar #sidebar_wrapper { + width: 290px; +} +#tree .nodename { + text-indent: 12px; + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAg0lEQVQYlWNIS0tbAcSK////Z8CHGTIzM7+mp6d/ASouwqswKyvrO1DRfyg+CcRaxCgE4Z9A3AjEbIQUgjHQOQvwKgS6+ffChQt3AiUDcCqsra29d/v27R6ghCVWN2ZnZ/9YuXLlRqBAPBALYvVMR0fHmQcPHrQBOUZ4gwfqFj5CAQ4Al6wLIYDwo9QAAAAASUVORK5CYII="); + background-repeat: no-repeat; + background-position: left center; + cursor: pointer; +} +#tree .open > .nodename { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAlElEQVQYlWNIS0tbCsT/8eCN////Z2B49OhRfHZ29jdsioDiP27evJkNVggkONeuXbscm8Jly5atA8rzwRSCsG5DQ8MtZEU1NTUPgOLGUHm4QgaQFVlZWT9BijIzM39fuHChDCaHohBkBdCq9SCF8+bN2wHkC+FSCMLGkyZNOvb9+3dbNHEMhSDsDsRMxCjEiolWCADeUBHgU/IGQQAAAABJRU5ErkJggg=="); + background-position: left 7px; +} +#tree .dir, +#tree .file { + position: relative; + min-height: 20px; + line-height: 20px; + padding-left: 12px; +} +#tree .dir > .children, +#tree .file > .children { + display: none; +} +#tree .dir.open > .children, +#tree .file.open > .children { + display: block; +} +#tree .file { + padding-left: 24px; + display: block; + text-decoration: none; + color: #444; +} +#tree > .dir { + padding-left: 0; +} +#headings .heading a { + text-decoration: none; + padding-left: 10px; + display: block; + color: #444; +} +#headings .h1 { + padding-left: 0; + margin-top: 10px; + font-size: 1.3em; +} +#headings .h2 { + padding-left: 10px; + margin-top: 8px; + font-size: 1.1em; +} +#headings .h3 { + padding-left: 20px; + margin-top: 5px; + font-size: 1em; +} +#headings .h4 { + padding-left: 30px; + margin-top: 3px; + font-size: 0.9em; +} +#headings .h5 { + padding-left: 40px; + margin-top: 1px; + font-size: 0.8em; +} +#headings .h6 { + padding-left: 50px; + font-size: 0.75em; +} +#sidebar-toggle { + position: fixed; + top: 0; + left: 0; + width: 5px; + bottom: 0; + z-index: 2; + cursor: pointer; + background: #dfdfdf; +} +#sidebar-toggle:hover { + width: 10px; + background: #d6d6d6; +} +.slidey #sidebar-toggle, +.slidey #container { + -webkit-transition: all 250ms linear; + -moz-transition: all 250ms linear; + -ms-transition: all 250ms linear; + -o-transition: all 250ms linear; + transition: all 250ms linear; +} +.sidebar #sidebar-toggle { + left: 290px; +} +#container { + position: fixed; + left: 5px; + right: 0; + top: 0; + bottom: 0; + overflow: auto; +} +.sidebar #container { + left: 295px; +} +.no-sidebar #sidebar_wrapper, +.no-sidebar #sidebar-toggle { + display: none; +} +.no-sidebar #container { + left: 0; +} +#page { + padding-top: 40px; +} +table td { + border: 0; + outline: 0; +} +.docs.markdown { + padding: 10px 50px; +} +td.docs { + max-width: 450px; + min-width: 450px; + min-height: 5px; + padding: 10px 25px 1px 50px; + overflow-x: hidden; + vertical-align: top; + text-align: left; +} +.docs pre { + margin: 15px 0 15px; + padding: 5px; + padding-left: 10px; + border: 1px solid #d6d6d6; + background: #F0F0F0; + font-size: 12px; + overflow: auto; +} +.docs pre.code_stats { + font-size: 60%; +} +.docs p tt, +.docs li tt, +.docs p code, +.docs li code { + border: 1px solid #d6d6d6; + font-size: 12px; + padding: 0 0.2em; + background: #e7e7e7; +} +.dox { + border-top: 1px solid #dddddd; + padding-top: 10px; + padding-bottom: 10px; +} +.dox .details { + padding: 10px; + background: #F0F0F0; + border: 1px solid #d6d6d6; + margin-bottom: 10px; +} +.dox .dox_tag_title { + font-weight: bold; +} +.dox .dox_tag_detail { + margin-left: 10px; +} +.dox .dox_tag_detail span { + margin-right: 5px; +} +.dox .dox_type { + font-style: italic; +} +.dox .dox_tag_name { + font-weight: bold; +} +.pilwrap { + position: relative; + padding-top: 1px; +} +.pilwrap .pilcrow { + font: 12px Arial; + text-decoration: none; + color: #454545; + position: absolute; + left: -20px; + padding: 1px 2px; + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -ms-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + color: #555555; +} +.pilwrap .pilcrow:before { + content: '\b6'; +} +.pilwrap:hover .pilcrow { + opacity: 1; +} +td.code { + padding: 8px 15px 8px 25px; + width: 100%; + vertical-align: top; + border-left: 1px solid #d6d6d6; + background: #F0F0F0; +} +.background { + border-left: 1px solid #d6d6d6; + position: absolute; + z-index: -1; + top: 0; + right: 0; + bottom: 0; + left: 525px; + background: #F0F0F0; +} +pre, +tt, +code { + font-size: 12px; + line-height: 18px; + font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; + margin: 0; + padding: 0; + white-space: pre-wrap; + background: #F0F0F0; +} +.line-num { + display: inline-block; + width: 50px; + text-align: right; + opacity: 0.3; + margin-left: -20px; + text-decoration: none; + color: #888888; +} +.line-num:before { + content: attr(data-line); +} diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/SfnTasksEcsEc2RunTaskTestDefaultTestDeployAssert2569343D.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/SfnTasksEcsEc2RunTaskTestDefaultTestDeployAssert2569343D.assets.json index 38b1294146007..1e381354514cb 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/SfnTasksEcsEc2RunTaskTestDefaultTestDeployAssert2569343D.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/SfnTasksEcsEc2RunTaskTestDefaultTestDeployAssert2569343D.assets.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/aws-sfn-tasks-ecs-run-task-ref-task-definition.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/aws-sfn-tasks-ecs-run-task-ref-task-definition.assets.json index 349582502b090..d149f68de5baa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/aws-sfn-tasks-ecs-run-task-ref-task-definition.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/aws-sfn-tasks-ecs-run-task-ref-task-definition.assets.json @@ -1,7 +1,7 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { - "a04c65eb154cc930d6f8ea8a3d18f4216f96457a1d86647792aa47f6e2cecbe7": { + "a9d4a2d21b3079e3fe2580d57cb6294c40a19f611a77f11b6690190908353350": { "source": { "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a04c65eb154cc930d6f8ea8a3d18f4216f96457a1d86647792aa47f6e2cecbe7.json", + "objectKey": "a9d4a2d21b3079e3fe2580d57cb6294c40a19f611a77f11b6690190908353350.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/aws-sfn-tasks-ecs-run-task-ref-task-definition.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/aws-sfn-tasks-ecs-run-task-ref-task-definition.template.json index 7cce5cb92eb14..76c17457232e2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/aws-sfn-tasks-ecs-run-task-ref-task-definition.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/aws-sfn-tasks-ecs-run-task-ref-task-definition.template.json @@ -664,7 +664,71 @@ ] } }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33": { + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "Ec2ClusterEE43E89D" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + ] + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawssfntasksecsruntaskreftaskdefinitionEc2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic31C4EDE486F3D901": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" + } + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic4795E0F6": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" + } + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole0C4190B7C": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole0C4190B7C", + "Roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole18817D25E": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole18817D25E", + "Roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole274ABEFAA": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole274ABEFAA", + "Roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole35049FE26": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole35049FE26", "Roles": [ { "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" @@ -751,69 +861,38 @@ ] } }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31": { - "Type": "AWS::Lambda::Function", + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole46BD5E1C5": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "Ec2ClusterEE43E89D" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "Ec2ClusterEE43E89D", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole46BD5E1C5", + "Roles": [ { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup" + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" - ] - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawssfntasksecsruntaskreftaskdefinitionEc2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic31C4EDE486F3D901": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic4795E0F6": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - } + ] } }, "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/cdk.out index c6e612584e352..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"38.0.1"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/integ.json index 0864fef8f0a95..783a7a0c2868c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "testCases": { "SfnTasksEcsEc2RunTaskTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/manifest.json index 30d933317eb14..29145e690d48d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "artifacts": { "aws-sfn-tasks-ecs-run-task-ref-task-definition.assets": { "type": "cdk:asset-manifest", @@ -16,10 +16,9 @@ "templateFile": "aws-sfn-tasks-ecs-run-task-ref-task-definition.template.json", "terminationProtection": false, "validateOnSynth": false, - "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a04c65eb154cc930d6f8ea8a3d18f4216f96457a1d86647792aa47f6e2cecbe7.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a9d4a2d21b3079e3fe2580d57cb6294c40a19f611a77f11b6690190908353350.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -35,6 +34,27 @@ "aws-sfn-tasks-ecs-run-task-ref-task-definition.assets" ], "metadata": { + "/aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]", + "trace": [ + "Annotations.addMessage (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:135:29)", + "Annotations.addWarningV2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:66:18)", + "Cluster.handleCanContainersAccessInstanceRoleForAL2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:581:47)", + "Cluster.configureAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:486:26)", + "Cluster.addAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:452:14)", + "Cluster.addCapacity (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:405:14)", + "Object. (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js:21:9)", + "Module._compile (node:internal/modules/cjs/loader:1256:14)", + "Module._extensions..js (node:internal/modules/cjs/loader:1310:10)", + "Module.load (node:internal/modules/cjs/loader:1119:32)", + "Module._load (node:internal/modules/cjs/loader:960:12)", + "Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)", + "node:internal/main/run_main_module:23:47" + ] + } + ], "/aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -221,12 +241,6 @@ "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" } ], - "/aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33" - } - ], "/aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -245,6 +259,36 @@ "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic4795E0F6" } ], + "/aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole0C4190B7C" + } + ], + "/aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole18817D25E" + } + ], + "/aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole274ABEFAA" + } + ], + "/aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole35049FE26" + } + ], + "/aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole46BD5E1C5" + } + ], "/aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", @@ -347,7 +391,6 @@ "templateFile": "SfnTasksEcsEc2RunTaskTestDefaultTestDeployAssert2569343D.template.json", "terminationProtection": false, "validateOnSynth": false, - "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/tree.json index 3a1cdfcc6ce6d..c93def0e42c0a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task-ref-definition.js.snapshot/tree.json @@ -1060,111 +1060,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupASGC5A6D4C0" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", - "roles": [ - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1266,6 +1161,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole0C4190B7C", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupASGC5A6D4C0" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole18817D25E", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "Ec2ClusterEE43E89D", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole274ABEFAA", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "Ec2ClusterEE43E89D", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole35049FE26", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-run-task-ref-task-definition/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "Ec2ClusterEE43E89D", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole46BD5E1C5", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1276,7 +1428,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -2052,7 +2204,7 @@ "path": "SfnTasksEcsEc2RunTaskTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -2098,7 +2250,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/SfnTasksEcsEc2RunTaskTestDefaultTestDeployAssert2569343D.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/SfnTasksEcsEc2RunTaskTestDefaultTestDeployAssert2569343D.assets.json index d6f156a9e088c..1e381354514cb 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/SfnTasksEcsEc2RunTaskTestDefaultTestDeployAssert2569343D.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/SfnTasksEcsEc2RunTaskTestDefaultTestDeployAssert2569343D.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-run-task.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-run-task.assets.json index 3ea93a51b4a29..f64734d613358 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-run-task.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-run-task.assets.json @@ -1,7 +1,7 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "034d7f988da203540ca02686cfe2cc037bc70239c1f4d051a369c99f8fa0fac1": { + "54ae870115932a3f4ab76abfff09bad03acc8638c2db227120594052f36ad389": { "source": { "path": "aws-sfn-tasks-ecs-run-task.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "034d7f988da203540ca02686cfe2cc037bc70239c1f4d051a369c99f8fa0fac1.json", + "objectKey": "54ae870115932a3f4ab76abfff09bad03acc8638c2db227120594052f36ad389.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-run-task.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-run-task.template.json index f696732ceecda..105e3cc9cf770 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-run-task.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/aws-sfn-tasks-ecs-run-task.template.json @@ -664,7 +664,71 @@ ] } }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33": { + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "Ec2ClusterEE43E89D" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + ] + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawssfntasksecsruntaskEc2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7B5DFDEB44D2982": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" + } + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic4795E0F6": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" + } + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole0C4190B7C": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole0C4190B7C", + "Roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole18817D25E": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole18817D25E", + "Roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole274ABEFAA": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole274ABEFAA", + "Roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole35049FE26": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole35049FE26", "Roles": [ { "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" @@ -751,69 +861,38 @@ ] } }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31": { - "Type": "AWS::Lambda::Function", + "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole46BD5E1C5": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "Ec2ClusterEE43E89D" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "Ec2ClusterEE43E89D", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole46BD5E1C5", + "Roles": [ { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup" + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" - ] - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawssfntasksecsruntaskEc2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7B5DFDEB44D2982": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - } - } - }, - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic4795E0F6": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionE0DEFB31", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30" - } + ] } }, "Ec2ClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopicF7263B30": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/integ.json index db253efdd3d04..0f1da5f5f922f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "SfnTasksEcsEc2RunTaskTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/manifest.json index 53c3cd6139c3f..145d166421c06 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "aws-sfn-tasks-ecs-run-task.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/034d7f988da203540ca02686cfe2cc037bc70239c1f4d051a369c99f8fa0fac1.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/54ae870115932a3f4ab76abfff09bad03acc8638c2db227120594052f36ad389.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -34,6 +34,27 @@ "aws-sfn-tasks-ecs-run-task.assets" ], "metadata": { + "/aws-sfn-tasks-ecs-run-task/Ec2Cluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]", + "trace": [ + "Annotations.addMessage (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:135:29)", + "Annotations.addWarningV2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:66:18)", + "Cluster.handleCanContainersAccessInstanceRoleForAL2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:581:47)", + "Cluster.configureAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:486:26)", + "Cluster.addAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:452:14)", + "Cluster.addCapacity (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:405:14)", + "Object. (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js:31:9)", + "Module._compile (node:internal/modules/cjs/loader:1256:14)", + "Module._extensions..js (node:internal/modules/cjs/loader:1310:10)", + "Module.load (node:internal/modules/cjs/loader:1119:32)", + "Module._load (node:internal/modules/cjs/loader:960:12)", + "Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)", + "node:internal/main/run_main_module:23:47" + ] + } + ], "/aws-sfn-tasks-ecs-run-task/Ec2Cluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -220,12 +241,6 @@ "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" } ], - "/aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33" - } - ], "/aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -244,6 +259,36 @@ "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic4795E0F6" } ], + "/aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole0C4190B7C" + } + ], + "/aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole18817D25E" + } + ], + "/aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole274ABEFAA" + } + ], + "/aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole35049FE26" + } + ], + "/aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole46BD5E1C5" + } + ], "/aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/tree.json index c79ff6d13fd7e..4828e9ef73cc5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-run-task.js.snapshot/tree.json @@ -1060,111 +1060,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupASGC5A6D4C0" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "Ec2ClusterEE43E89D", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicy638C9E33", - "roles": [ - { - "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -1266,6 +1161,263 @@ "fqn": "aws-cdk-lib.aws_sns.Subscription", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole0C4190B7C", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupASGC5A6D4C0" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole18817D25E", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "Ec2ClusterEE43E89D", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole274ABEFAA", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "Ec2ClusterEE43E89D", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole35049FE26", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-run-task/Ec2Cluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "Ec2ClusterEE43E89D", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole46BD5E1C5", + "roles": [ + { + "Ref": "Ec2ClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole23116FA3" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -1276,7 +1428,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1765,7 +1917,7 @@ "id": "Run", "path": "aws-sfn-tasks-ecs-run-task/Run", "constructInfo": { - "fqn": "aws-cdk-lib.aws_stepfunctions.TaskStateBase", + "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.EcsRunTask", "version": "0.0.0" } }, @@ -2107,7 +2259,7 @@ "path": "SfnTasksEcsEc2RunTaskTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -2153,7 +2305,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/SfnTasksEcsEc2TaskTestDefaultTestDeployAssert9E1A388C.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/SfnTasksEcsEc2TaskTestDefaultTestDeployAssert9E1A388C.assets.json index be6172954b1a6..10cbcbeb48a33 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/SfnTasksEcsEc2TaskTestDefaultTestDeployAssert9E1A388C.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/SfnTasksEcsEc2TaskTestDefaultTestDeployAssert9E1A388C.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-sfn-tasks-ecs-task.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-sfn-tasks-ecs-task.assets.json index 7b20bcee09ac9..0d18ea3e42a29 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-sfn-tasks-ecs-task.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-sfn-tasks-ecs-task.assets.json @@ -1,7 +1,7 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "3def9ee7b59a962a2c1b87f53788e50585c78f8b28084882a58d0b6796594f37": { + "aef5a0cc0f73d79d8b11f4894059de6f5c6914855417419ae9dd9f9ba39c2e8f": { "source": { "path": "aws-sfn-tasks-ecs-task.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3def9ee7b59a962a2c1b87f53788e50585c78f8b28084882a58d0b6796594f37.json", + "objectKey": "aef5a0cc0f73d79d8b11f4894059de6f5c6914855417419ae9dd9f9ba39c2e8f.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-sfn-tasks-ecs-task.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-sfn-tasks-ecs-task.template.json index 5f3399c06dfee..2001f400229bb 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-sfn-tasks-ecs-task.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/aws-sfn-tasks-ecs-task.template.json @@ -664,7 +664,71 @@ ] } }, - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyB91C5343": { + "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionE3D5BEE8": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" + }, + "Environment": { + "Variables": { + "CLUSTER": { + "Ref": "FargateCluster7CCD5F93" + } + } + }, + "Handler": "index.lambda_handler", + "Role": { + "Fn::GetAtt": [ + "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32", + "Arn" + ] + }, + "Runtime": "python3.9", + "Tags": [ + { + "Key": "Name", + "Value": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup" + } + ], + "Timeout": 310 + }, + "DependsOn": [ + "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" + ] + }, + "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawssfntasksecstaskFargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic9B632D133CB839DE": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionE3D5BEE8", + "Arn" + ] + }, + "Principal": "sns.amazonaws.com", + "SourceArn": { + "Ref": "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic49146C10" + } + } + }, + "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic37856E82": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": { + "Fn::GetAtt": [ + "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionE3D5BEE8", + "Arn" + ] + }, + "Protocol": "lambda", + "TopicArn": { + "Ref": "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic49146C10" + } + } + }, + "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole07DEB0033": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -678,7 +742,23 @@ ], "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole07DEB0033", + "Roles": [ + { + "Ref": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" + } + ] + } + }, + "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19C1F9F76": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "autoscaling:CompleteLifecycleAction", "Effect": "Allow", @@ -705,13 +785,27 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19C1F9F76", + "Roles": [ + { + "Ref": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" + } + ] + } + }, + "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole204A3CD4E": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" + "ecs:DescribeTasks" ], "Condition": { "ArnEquals": { @@ -725,7 +819,23 @@ }, "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole204A3CD4E", + "Roles": [ + { + "Ref": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" + } + ] + } + }, + "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole344578453": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "ecs:ListContainerInstances", @@ -743,7 +853,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyB91C5343", + "PolicyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole344578453", "Roles": [ { "Ref": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" @@ -751,69 +861,38 @@ ] } }, - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionE3D5BEE8": { - "Type": "AWS::Lambda::Function", + "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole465531B88": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "ZipFile": "import boto3, json, os, time\n\necs = boto3.client('ecs')\nautoscaling = boto3.client('autoscaling')\n\n\ndef lambda_handler(event, context):\n print(json.dumps(dict(event, ResponseURL='...')))\n cluster = os.environ['CLUSTER']\n snsTopicArn = event['Records'][0]['Sns']['TopicArn']\n lifecycle_event = json.loads(event['Records'][0]['Sns']['Message'])\n instance_id = lifecycle_event.get('EC2InstanceId')\n if not instance_id:\n print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...')))\n return\n\n instance_arn = container_instance_arn(cluster, instance_id)\n print('Instance %s has container instance ARN %s' % (lifecycle_event['EC2InstanceId'], instance_arn))\n\n if not instance_arn:\n return\n\n task_arns = container_instance_task_arns(cluster, instance_arn)\n\n if task_arns:\n print('Instance ARN %s has task ARNs %s' % (instance_arn, ', '.join(task_arns)))\n\n while has_tasks(cluster, instance_arn, task_arns):\n time.sleep(10)\n\n try:\n print('Terminating instance %s' % instance_id)\n autoscaling.complete_lifecycle_action(\n LifecycleActionResult='CONTINUE',\n **pick(lifecycle_event, 'LifecycleHookName', 'LifecycleActionToken', 'AutoScalingGroupName'))\n except Exception as e:\n # Lifecycle action may have already completed.\n print(str(e))\n\n\ndef container_instance_arn(cluster, instance_id):\n \"\"\"Turn an instance ID into a container instance ARN.\"\"\"\n arns = ecs.list_container_instances(cluster=cluster, filter='ec2InstanceId==' + instance_id)['containerInstanceArns']\n if not arns:\n return None\n return arns[0]\n\ndef container_instance_task_arns(cluster, instance_arn):\n \"\"\"Fetch tasks for a container instance ARN.\"\"\"\n arns = ecs.list_tasks(cluster=cluster, containerInstance=instance_arn)['taskArns']\n return arns\n\ndef has_tasks(cluster, instance_arn, task_arns):\n \"\"\"Return True if the instance is running tasks for the given cluster.\"\"\"\n instances = ecs.describe_container_instances(cluster=cluster, containerInstances=[instance_arn])['containerInstances']\n if not instances:\n return False\n instance = instances[0]\n\n if instance['status'] == 'ACTIVE':\n # Start draining, then try again later\n set_container_instance_to_draining(cluster, instance_arn)\n return True\n\n task_count = None\n\n if task_arns:\n # Fetch details for tasks running on the container instance\n tasks = ecs.describe_tasks(cluster=cluster, tasks=task_arns)['tasks']\n if tasks:\n # Consider any non-stopped tasks as running\n task_count = sum(task['lastStatus'] != 'STOPPED' for task in tasks) + instance['pendingTasksCount']\n\n if not task_count:\n # Fallback to instance task counts if detailed task information is unavailable\n task_count = instance['runningTasksCount'] + instance['pendingTasksCount']\n\n print('Instance %s has %s tasks' % (instance_arn, task_count))\n\n return task_count > 0\n\ndef set_container_instance_to_draining(cluster, instance_arn):\n ecs.update_container_instances_state(\n cluster=cluster,\n containerInstances=[instance_arn], status='DRAINING')\n\n\ndef pick(dct, *keys):\n \"\"\"Pick a subset of a dict.\"\"\"\n return {k: v for k, v in dct.items() if k in keys}\n" - }, - "Environment": { - "Variables": { - "CLUSTER": { - "Ref": "FargateCluster7CCD5F93" + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "FargateCluster7CCD5F93", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" } - } - }, - "Handler": "index.lambda_handler", - "Role": { - "Fn::GetAtt": [ - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32", - "Arn" - ] + ], + "Version": "2012-10-17" }, - "Runtime": "python3.9", - "Tags": [ + "PolicyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole465531B88", + "Roles": [ { - "Key": "Name", - "Value": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup" + "Ref": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" } - ], - "Timeout": 310 - }, - "DependsOn": [ - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyB91C5343", - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" - ] - }, - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionAllowInvokeawssfntasksecstaskFargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic9B632D133CB839DE": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionE3D5BEE8", - "Arn" - ] - }, - "Principal": "sns.amazonaws.com", - "SourceArn": { - "Ref": "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic49146C10" - } - } - }, - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic37856E82": { - "Type": "AWS::SNS::Subscription", - "Properties": { - "Endpoint": { - "Fn::GetAtt": [ - "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionE3D5BEE8", - "Arn" - ] - }, - "Protocol": "lambda", - "TopicArn": { - "Ref": "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic49146C10" - } + ] } }, "FargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic49146C10": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/integ.json index a5c6cf6de5fc7..a58e5573ec596 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "SfnTasksEcsEc2TaskTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/manifest.json index 04674b3f108a4..0b205265d5222 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "aws-sfn-tasks-ecs-task.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3def9ee7b59a962a2c1b87f53788e50585c78f8b28084882a58d0b6796594f37.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/aef5a0cc0f73d79d8b11f4894059de6f5c6914855417419ae9dd9f9ba39c2e8f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -34,6 +34,27 @@ "aws-sfn-tasks-ecs-task.assets" ], "metadata": { + "/aws-sfn-tasks-ecs-task/FargateCluster": [ + { + "type": "aws:cdk:warning", + "data": "Blocking container access to instance role will be deprecated. Use the @aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature feature flagto keep this feature temporarily. See https://github.com/aws/aws-cdk/discussions/32609 [ack: @aws-cdk/aws-ecs:deprecatedImdsBlocking]", + "trace": [ + "Annotations.addMessage (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:135:29)", + "Annotations.addWarningV2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:66:18)", + "Cluster.handleCanContainersAccessInstanceRoleForAL2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:581:47)", + "Cluster.configureAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:486:26)", + "Cluster.addAutoScalingGroup (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:452:14)", + "Cluster.addCapacity (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-ecs/lib/cluster.js:405:14)", + "Object. (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js:30:9)", + "Module._compile (node:internal/modules/cjs/loader:1256:14)", + "Module._extensions..js (node:internal/modules/cjs/loader:1310:10)", + "Module.load (node:internal/modules/cjs/loader:1119:32)", + "Module._load (node:internal/modules/cjs/loader:960:12)", + "Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)", + "node:internal/main/run_main_module:23:47" + ] + } + ], "/aws-sfn-tasks-ecs-task/FargateCluster/Resource": [ { "type": "aws:cdk:logicalId", @@ -220,12 +241,6 @@ "data": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" } ], - "/aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyB91C5343" - } - ], "/aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/Resource": [ { "type": "aws:cdk:logicalId", @@ -244,6 +259,36 @@ "data": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionTopic37856E82" } ], + "/aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole07DEB0033" + } + ], + "/aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19C1F9F76" + } + ], + "/aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole204A3CD4E" + } + ], + "/aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole344578453" + } + ], + "/aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole465531B88" + } + ], "/aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Topic/Resource": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/tree.json index e7fd27ef01173..449d19ee72cfe 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.ec2-task.js.snapshot/tree.json @@ -20,8 +20,8 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", + "version": "0.0.0" } }, "Vpc": { @@ -47,8 +47,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", + "version": "0.0.0" } }, "PublicSubnet1": { @@ -91,16 +91,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-sfn-tasks-ecs-task/FargateCluster/Vpc/PublicSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -121,8 +121,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -140,8 +140,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -160,8 +160,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -180,8 +180,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -208,14 +208,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PublicSubnet2": { @@ -258,16 +258,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-sfn-tasks-ecs-task/FargateCluster/Vpc/PublicSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -288,8 +288,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -307,8 +307,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -327,8 +327,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } }, "EIP": { @@ -347,8 +347,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", + "version": "0.0.0" } }, "NATGateway": { @@ -375,14 +375,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", + "version": "0.0.0" } }, "PrivateSubnet1": { @@ -425,16 +425,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-sfn-tasks-ecs-task/FargateCluster/Vpc/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -455,8 +455,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -474,8 +474,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -494,14 +494,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "PrivateSubnet2": { @@ -544,16 +544,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", + "version": "0.0.0" } }, "Acl": { "id": "Acl", "path": "aws-sfn-tasks-ecs-task/FargateCluster/Vpc/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "RouteTable": { @@ -574,8 +574,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", + "version": "0.0.0" } }, "RouteTableAssociation": { @@ -593,8 +593,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", + "version": "0.0.0" } }, "DefaultRoute": { @@ -613,14 +613,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", + "version": "0.0.0" } }, "IGW": { @@ -638,8 +638,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", + "version": "0.0.0" } }, "VPCGW": { @@ -657,14 +657,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.Vpc", + "version": "0.0.0" } }, "DefaultAutoScalingGroup": { @@ -701,14 +701,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", + "version": "0.0.0" } }, "InstanceRole": { @@ -719,8 +719,8 @@ "id": "ImportInstanceRole", "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/InstanceRole/ImportInstanceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -750,8 +750,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -820,20 +820,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "InstanceProfile": { @@ -850,16 +850,16 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnInstanceProfile", + "version": "0.0.0" } }, "ImportedInstanceProfile": { "id": "ImportedInstanceProfile", "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/ImportedInstanceProfile", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "LaunchTemplate": { @@ -945,14 +945,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.CfnLaunchTemplate", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ec2.LaunchTemplate", + "version": "0.0.0" } }, "ASG": { @@ -992,8 +992,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", + "version": "0.0.0" } }, "DrainECSHook": { @@ -1012,8 +1012,8 @@ "id": "ImportServiceRole", "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/ImportServiceRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1057,119 +1057,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "ec2:DescribeHosts", - "ec2:DescribeInstanceAttribute", - "ec2:DescribeInstanceStatus", - "ec2:DescribeInstances" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "autoscaling:CompleteLifecycleAction", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":autoscaling:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":autoScalingGroup:*:autoScalingGroupName/", - { - "Ref": "FargateClusterDefaultAutoScalingGroupASG36A4948F" - } - ] - ] - } - }, - { - "Action": [ - "ecs:DescribeContainerInstances", - "ecs:DescribeTasks", - "ecs:ListTasks", - "ecs:UpdateContainerInstancesState" - ], - "Condition": { - "ArnEquals": { - "ecs:cluster": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - } - }, - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "ecs:ListContainerInstances", - "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "FargateCluster7CCD5F93", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyB91C5343", - "roles": [ - { - "Ref": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" - } - ] - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" - } - } - }, - "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1206,8 +1101,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", + "version": "0.0.0" } }, "AllowInvoke:awssfntasksecstaskFargateClusterDefaultAutoScalingGroupLifecycleHookDrainHookTopic9B632D13": { @@ -1230,8 +1125,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", + "version": "0.0.0" } }, "Topic": { @@ -1257,26 +1152,283 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Subscription", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ec2:DescribeHosts", + "ec2:DescribeInstanceAttribute", + "ec2:DescribeInstanceStatus", + "ec2:DescribeInstances" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole07DEB0033", + "roles": [ + { + "Ref": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "autoscaling:CompleteLifecycleAction", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":autoscaling:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":autoScalingGroup:*:autoScalingGroupName/", + { + "Ref": "FargateClusterDefaultAutoScalingGroupASG36A4948F" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole19C1F9F76", + "roles": [ + { + "Ref": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:DescribeContainerInstances", + "ecs:DescribeTasks" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "FargateCluster7CCD5F93", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole204A3CD4E", + "roles": [ + { + "Ref": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-3": { + "id": "inlinePolicyAddedToExecutionRole-3", + "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-3/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListContainerInstances", + "ecs:SubmitContainerStateChange", + "ecs:SubmitTaskStateChange" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "FargateCluster7CCD5F93", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole344578453", + "roles": [ + { + "Ref": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-4": { + "id": "inlinePolicyAddedToExecutionRole-4", + "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/DrainECSHook/Function/inlinePolicyAddedToExecutionRole-4/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "ecs:ListTasks", + "ecs:UpdateContainerInstancesState" + ], + "Condition": { + "ArnEquals": { + "ecs:cluster": { + "Fn::GetAtt": [ + "FargateCluster7CCD5F93", + "Arn" + ] + } + } + }, + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole465531B88", + "roles": [ + { + "Ref": "FargateClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole7FEDCD32" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_lambda.Function", + "version": "0.0.0" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LifecycleHookDrainHook": { @@ -1302,14 +1454,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.CfnTopic", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_sns.Topic", + "version": "0.0.0" } }, "Role": { @@ -1320,8 +1472,8 @@ "id": "ImportRole", "path": "aws-sfn-tasks-ecs-task/FargateCluster/DefaultAutoScalingGroup/LifecycleHookDrainHook/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1351,8 +1503,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1386,20 +1538,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1426,42 +1578,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.CfnLifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.LifecycleHook", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_autoscaling.AutoScalingGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Cluster", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "aws-sfn-tasks-ecs-task/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "aws-sfn-tasks-ecs-task/SsmParameterValue:--aws--service--ecs--optimized-ami--amazon-linux-2--recommended--image_id:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "TaskDef": { @@ -1476,8 +1628,8 @@ "id": "ImportTaskRole", "path": "aws-sfn-tasks-ecs-task/TaskDef/TaskRole/ImportTaskRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1501,14 +1653,14 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1559,8 +1711,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", + "version": "0.0.0" } }, "Container": { @@ -1575,22 +1727,22 @@ "id": "Staging", "path": "aws-sfn-tasks-ecs-task/TaskDef/Container/AssetImage/Staging", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.AssetStaging", + "version": "0.0.0" } }, "Repository": { "id": "Repository", "path": "aws-sfn-tasks-ecs-task/TaskDef/Container/AssetImage/Repository", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecr.RepositoryBase", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecr_assets.DockerImageAsset", + "version": "0.0.0" } }, "LogGroup": { @@ -1605,20 +1757,20 @@ "aws:cdk:cloudformation:props": {} }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_logs.LogGroup", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", + "version": "0.0.0" } }, "ExecutionRole": { @@ -1629,8 +1781,8 @@ "id": "ImportExecutionRole", "path": "aws-sfn-tasks-ecs-task/TaskDef/ExecutionRole/ImportExecutionRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1654,8 +1806,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1731,42 +1883,42 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_ecs.Ec2TaskDefinition", + "version": "0.0.0" } }, "Start": { "id": "Start", "path": "aws-sfn-tasks-ecs-task/Start", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_stepfunctions.Pass", + "version": "0.0.0" } }, "Run": { "id": "Run", "path": "aws-sfn-tasks-ecs-task/Run", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_stepfunctions.Task", + "version": "0.0.0" } }, "StateMachine": { @@ -1781,8 +1933,8 @@ "id": "ImportRole", "path": "aws-sfn-tasks-ecs-task/StateMachine/Role/ImportRole", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Resource", + "version": "0.0.0" } }, "Resource": { @@ -1806,8 +1958,8 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnRole", + "version": "0.0.0" } }, "DefaultPolicy": { @@ -1895,20 +2047,20 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_iam.Role", + "version": "0.0.0" } }, "Resource": { @@ -1949,36 +2101,36 @@ } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", + "version": "0.0.0" } }, "BootstrapVersion": { "id": "BootstrapVersion", "path": "aws-sfn-tasks-ecs-task/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "aws-sfn-tasks-ecs-task/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } }, "SfnTasksEcsEc2TaskTest": { @@ -1994,7 +2146,7 @@ "path": "SfnTasksEcsEc2TaskTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -2005,22 +2157,22 @@ "id": "BootstrapVersion", "path": "SfnTasksEcsEc2TaskTest/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" } }, "CheckBootstrapVersion": { "id": "CheckBootstrapVersion", "path": "SfnTasksEcsEc2TaskTest/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" } } }, @@ -2040,13 +2192,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { - "fqn": "constructs.Construct", - "version": "10.3.0" + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/asset.d87af9b5acc567118fa529d3d3b763098200a6446a5ca64aea987729efd52534/Dockerfile b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/asset.d87af9b5acc567118fa529d3d3b763098200a6446a5ca64aea987729efd52534/Dockerfile deleted file mode 100644 index 23cf9b3e22f5d..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/asset.d87af9b5acc567118fa529d3d3b763098200a6446a5ca64aea987729efd52534/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM public.ecr.aws/docker/library/python:3.12 -ADD index.py . -CMD [ "python3", "./index.py" ] diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/asset.d87af9b5acc567118fa529d3d3b763098200a6446a5ca64aea987729efd52534/index.py b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/asset.d87af9b5acc567118fa529d3d3b763098200a6446a5ca64aea987729efd52534/index.py deleted file mode 100644 index 730f1be5ad06e..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/ecs/integ.fargate-run-task.js.snapshot/asset.d87af9b5acc567118fa529d3d3b763098200a6446a5ca64aea987729efd52534/index.py +++ /dev/null @@ -1,5 +0,0 @@ -import os -import pprint - -print('Hello from ECS!') -pprint.pprint(dict(os.environ)) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run.assets.json index 9be57fbfadfa0..eea815760f848 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run.assets.json @@ -1,93 +1,93 @@ { - "version": "36.0.5", + "version": "39.0.0", "files": { - "22de69e75b55e15d4d49905d8a4901edd66d1367f617c2a01ac6e86ca2b7eb84": { + "93d96d34e0d3cd20eb082652b91012b131bdc34fcf2bc16eb4170e04772fddb1": { "source": { - "path": "asset.22de69e75b55e15d4d49905d8a4901edd66d1367f617c2a01ac6e86ca2b7eb84.zip", + "path": "asset.93d96d34e0d3cd20eb082652b91012b131bdc34fcf2bc16eb4170e04772fddb1.zip", "packaging": "file" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "22de69e75b55e15d4d49905d8a4901edd66d1367f617c2a01ac6e86ca2b7eb84.zip", + "objectKey": "93d96d34e0d3cd20eb082652b91012b131bdc34fcf2bc16eb4170e04772fddb1.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "1eaf141d4012ab0977a33bdf864ebbc6aa869a607e97fab6cd231fe6ef503aec": { + "aea9e78c19375cc11788e490fdd0d8d90a99fc5509f3ade872bff74980f89265": { "source": { - "path": "asset.1eaf141d4012ab0977a33bdf864ebbc6aa869a607e97fab6cd231fe6ef503aec", + "path": "asset.aea9e78c19375cc11788e490fdd0d8d90a99fc5509f3ade872bff74980f89265", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1eaf141d4012ab0977a33bdf864ebbc6aa869a607e97fab6cd231fe6ef503aec.zip", + "objectKey": "aea9e78c19375cc11788e490fdd0d8d90a99fc5509f3ade872bff74980f89265.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6": { + "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6": { "source": { - "path": "asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6", + "path": "asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip", + "objectKey": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "abc70c90ded969d12235ca11768293cb20557cff54518518480c0d9fb344a098": { + "fba306965da4b2680dd8b4e6916610efe237162f913f22b10146f647b3f6bce4": { "source": { - "path": "asset.abc70c90ded969d12235ca11768293cb20557cff54518518480c0d9fb344a098", + "path": "asset.fba306965da4b2680dd8b4e6916610efe237162f913f22b10146f647b3f6bce4", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "abc70c90ded969d12235ca11768293cb20557cff54518518480c0d9fb344a098.zip", + "objectKey": "fba306965da4b2680dd8b4e6916610efe237162f913f22b10146f647b3f6bce4.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961": { + "f24ba5e516d9d80b64bc7b0f406eedd12c36b20e7461f3e7719b7ffbdad72410": { "source": { - "path": "asset.3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip", + "path": "asset.f24ba5e516d9d80b64bc7b0f406eedd12c36b20e7461f3e7719b7ffbdad72410.zip", "packaging": "file" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip", + "objectKey": "f24ba5e516d9d80b64bc7b0f406eedd12c36b20e7461f3e7719b7ffbdad72410.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "7e5f48d1e79c915595d938c932b6f0101715a162780d01a55845367e014fbcda": { + "e35d06c04a5f086530cad7876451b9fbd93ded1d4940950bb104fb78dd322310": { "source": { - "path": "asset.7e5f48d1e79c915595d938c932b6f0101715a162780d01a55845367e014fbcda.zip", + "path": "asset.e35d06c04a5f086530cad7876451b9fbd93ded1d4940950bb104fb78dd322310.zip", "packaging": "file" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7e5f48d1e79c915595d938c932b6f0101715a162780d01a55845367e014fbcda.zip", + "objectKey": "e35d06c04a5f086530cad7876451b9fbd93ded1d4940950bb104fb78dd322310.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "746da84b10e215c552e68b6d2061024e4429f0386f43a35ef5e4d2940655692e": { + "9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec": { "source": { - "path": "asset.746da84b10e215c552e68b6d2061024e4429f0386f43a35ef5e4d2940655692e", + "path": "asset.9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "746da84b10e215c552e68b6d2061024e4429f0386f43a35ef5e4d2940655692e.zip", + "objectKey": "9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -105,7 +105,7 @@ } } }, - "89a0adef78ece6c87a85a286e4270dac2a3299c7ececf29729771b28beea0859": { + "edb40f36bcdaff1624a243a2f8a0a146ec98e55d2cdaf9f0a5b8d1af1d0b1edf": { "source": { "path": "awsstepfunctionstasksemrcontainersstartjobrunawscdkawseksClusterResourceProviderD9D7D7CE.nested.template.json", "packaging": "file" @@ -113,12 +113,12 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "89a0adef78ece6c87a85a286e4270dac2a3299c7ececf29729771b28beea0859.json", + "objectKey": "edb40f36bcdaff1624a243a2f8a0a146ec98e55d2cdaf9f0a5b8d1af1d0b1edf.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "db17d4f429860e38ff73349adc27c59c00dc5c6f8a7a98370e215e5d679569b3": { + "c5f1be918f6d699d0df40ce7a14be6bcd9fde7461f74cc5cf5d93afd284cb0e9": { "source": { "path": "awsstepfunctionstasksemrcontainersstartjobrunawscdkawseksKubectlProvider1BB62B22.nested.template.json", "packaging": "file" @@ -126,12 +126,12 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "db17d4f429860e38ff73349adc27c59c00dc5c6f8a7a98370e215e5d679569b3.json", + "objectKey": "c5f1be918f6d699d0df40ce7a14be6bcd9fde7461f74cc5cf5d93afd284cb0e9.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "02c3da8d3964f06cfd3a98138ef852e08aeb1c22b2758fe2860ce633f655201b": { + "777e859a0952a9ead9388e0f36f5aa357bca32ffcf4a671671ec66fac60506de": { "source": { "path": "aws-stepfunctions-tasks-emr-containers-start-job-run.template.json", "packaging": "file" @@ -139,7 +139,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "02c3da8d3964f06cfd3a98138ef852e08aeb1c22b2758fe2860ce633f655201b.json", + "objectKey": "777e859a0952a9ead9388e0f36f5aa357bca32ffcf4a671671ec66fac60506de.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run.template.json index d3ba47e5ee30f..b505c7070dc41 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/aws-stepfunctions-tasks-emr-containers-start-job-run.template.json @@ -1053,7 +1053,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/89a0adef78ece6c87a85a286e4270dac2a3299c7ececf29729771b28beea0859.json" + "/edb40f36bcdaff1624a243a2f8a0a146ec98e55d2cdaf9f0a5b8d1af1d0b1edf.json" ] ] } @@ -1100,7 +1100,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/db17d4f429860e38ff73349adc27c59c00dc5c6f8a7a98370e215e5d679569b3.json" + "/c5f1be918f6d699d0df40ce7a14be6bcd9fde7461f74cc5cf5d93afd284cb0e9.json" ] ] } @@ -1257,11 +1257,86 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip" + "S3Key": "f24ba5e516d9d80b64bc7b0f406eedd12c36b20e7461f3e7719b7ffbdad72410.zip" }, "Description": "/opt/awscli/aws" } }, + "StartaJobRunCallUpdateRoleTrustPolicyinlinePolicyAddedToExecutionRole06B56B67D": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "eks:DescribeCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":eks:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster/", + { + "Fn::GetAtt": [ + "StartaJobRunGetEksClusterInfoD0E31373", + "virtualCluster.containerProvider.id" + ] + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "StartaJobRunCallUpdateRoleTrustPolicyinlinePolicyAddedToExecutionRole06B56B67D", + "Roles": [ + { + "Ref": "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleF99BDB4C" + } + ] + } + }, + "StartaJobRunCallUpdateRoleTrustPolicyinlinePolicyAddedToExecutionRole10015039B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "iam:GetRole", + "iam:UpdateAssumeRolePolicy" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "StartaJobRunJobExecutionRole157B6BE1", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "StartaJobRunCallUpdateRoleTrustPolicyinlinePolicyAddedToExecutionRole10015039B", + "Roles": [ + { + "Ref": "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleF99BDB4C" + } + ] + } + }, "StartaJobRunCustomResourceProviderframeworkonEventServiceRole1D6E2464": { "Type": "AWS::IAM::Role", "Properties": { @@ -1342,7 +1417,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-stepfunctions-tasks-emr-containers-start-job-run/Start a Job Run/CustomResourceProvider)", "Environment": { @@ -1444,7 +1519,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "746da84b10e215c552e68b6d2061024e4429f0386f43a35ef5e4d2940655692e.zip" + "S3Key": "9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec.zip" }, "Handler": "index.handler", "Role": { @@ -1499,65 +1574,6 @@ ] } }, - "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleDefaultPolicy87B52EEA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "eks:DescribeCluster", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":eks:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster/", - { - "Fn::GetAtt": [ - "StartaJobRunGetEksClusterInfoD0E31373", - "virtualCluster.containerProvider.id" - ] - } - ] - ] - } - }, - { - "Action": [ - "iam:GetRole", - "iam:UpdateAssumeRolePolicy" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "StartaJobRunJobExecutionRole157B6BE1", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleDefaultPolicy87B52EEA", - "Roles": [ - { - "Ref": "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleF99BDB4C" - } - ] - } - }, "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CB6182A5B": { "Type": "AWS::Lambda::Function", "Properties": { @@ -1584,7 +1600,6 @@ "Timeout": 30 }, "DependsOn": [ - "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleDefaultPolicy87B52EEA", "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleF99BDB4C" ] }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunawscdkawseksClusterResourceProviderD9D7D7CE.nested.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunawscdkawseksClusterResourceProviderD9D7D7CE.nested.template.json index 3ce329fef7647..0bc673a4e0cda 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunawscdkawseksClusterResourceProviderD9D7D7CE.nested.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunawscdkawseksClusterResourceProviderD9D7D7CE.nested.template.json @@ -7,7 +7,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "22de69e75b55e15d4d49905d8a4901edd66d1367f617c2a01ac6e86ca2b7eb84.zip" + "S3Key": "93d96d34e0d3cd20eb082652b91012b131bdc34fcf2bc16eb4170e04772fddb1.zip" }, "Description": "/opt/nodejs/node_modules/proxy-agent" } @@ -50,7 +50,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "1eaf141d4012ab0977a33bdf864ebbc6aa869a607e97fab6cd231fe6ef503aec.zip" + "S3Key": "aea9e78c19375cc11788e490fdd0d8d90a99fc5509f3ade872bff74980f89265.zip" }, "Description": "onEvent handler for EKS cluster resource provider", "Environment": { @@ -123,7 +123,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "1eaf141d4012ab0977a33bdf864ebbc6aa869a607e97fab6cd231fe6ef503aec.zip" + "S3Key": "aea9e78c19375cc11788e490fdd0d8d90a99fc5509f3ade872bff74980f89265.zip" }, "Description": "isComplete handler for EKS cluster resource provider", "Environment": { @@ -265,7 +265,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.ClusterResourceProvider/Provider)", "Environment": { @@ -410,7 +410,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - isComplete (aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.ClusterResourceProvider/Provider)", "Environment": { @@ -552,7 +552,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onTimeout (aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.ClusterResourceProvider/Provider)", "Environment": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunawscdkawseksKubectlProvider1BB62B22.nested.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunawscdkawseksKubectlProvider1BB62B22.nested.template.json index 72be7a11fc1c6..c08a512d30c2d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunawscdkawseksKubectlProvider1BB62B22.nested.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunawscdkawseksKubectlProvider1BB62B22.nested.template.json @@ -7,7 +7,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "abc70c90ded969d12235ca11768293cb20557cff54518518480c0d9fb344a098.zip" + "S3Key": "fba306965da4b2680dd8b4e6916610efe237162f913f22b10146f647b3f6bce4.zip" }, "Description": "onEvent handler for EKS kubectl resource provider", "Environment": { @@ -54,7 +54,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip" + "S3Key": "f24ba5e516d9d80b64bc7b0f406eedd12c36b20e7461f3e7719b7ffbdad72410.zip" }, "Description": "/opt/awscli/aws" } @@ -66,7 +66,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "7e5f48d1e79c915595d938c932b6f0101715a162780d01a55845367e014fbcda.zip" + "S3Key": "e35d06c04a5f086530cad7876451b9fbd93ded1d4940950bb104fb78dd322310.zip" }, "Description": "/opt/kubectl/kubectl and /opt/helm/helm" } @@ -163,7 +163,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.KubectlProvider/Provider)", "Environment": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunintegDefaultTestDeployAssertD11471F0.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunintegDefaultTestDeployAssertD11471F0.assets.json index 3a94314ea79d9..f69c2318fe945 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunintegDefaultTestDeployAssertD11471F0.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/awsstepfunctionstasksemrcontainersstartjobrunintegDefaultTestDeployAssertD11471F0.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/cdk.out index bd5311dc372de..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.5"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/integ.json index bae045c4c1e8b..9a81415b00dbe 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "testCases": { "aws-stepfunctions-tasks-emr-containers-start-job-run-integ/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/manifest.json index 65a3f0fb3ebb2..875c489b808cc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "artifacts": { "aws-stepfunctions-tasks-emr-containers-start-job-run.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/02c3da8d3964f06cfd3a98138ef852e08aeb1c22b2758fe2860ce633f655201b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/777e859a0952a9ead9388e0f36f5aa357bca32ffcf4a671671ec66fac60506de.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -37,7 +37,19 @@ "/aws-stepfunctions-tasks-emr-containers-start-job-run/integration-test-eks-cluster": [ { "type": "aws:cdk:warning", - "data": "You created a cluster with Kubernetes Version 1.30 without specifying the kubectlLayer property. This may cause failures as the kubectl version provided with aws-cdk-lib is 1.20, which is only guaranteed to be compatible with Kubernetes versions 1.19-1.21. Please provide a kubectlLayer from @aws-cdk/lambda-layer-kubectl-v30. [ack: @aws-cdk/aws-eks:clusterKubectlLayerNotSpecified]" + "data": "You created a cluster with Kubernetes Version 1.30 without specifying the kubectlLayer property. The property will become required instead of optional in 2025 Jan. Please update your CDK code to provide a kubectlLayer. [ack: @aws-cdk/aws-eks:clusterKubectlLayerNotSpecified]", + "trace": [ + "Annotations.addMessage (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:135:29)", + "Annotations.addWarningV2 (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/core/lib/annotations.js:66:18)", + "new Cluster (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/aws-cdk-lib/aws-eks/lib/cluster.js:522:43)", + "Object. (/Volumes/workplace/Documents/workplace/aws-cdk-lib/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js:22:20)", + "Module._compile (node:internal/modules/cjs/loader:1256:14)", + "Module._extensions..js (node:internal/modules/cjs/loader:1310:10)", + "Module.load (node:internal/modules/cjs/loader:1119:32)", + "Module._load (node:internal/modules/cjs/loader:960:12)", + "Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)", + "node:internal/main/run_main_module:23:47" + ] } ], "/aws-stepfunctions-tasks-emr-containers-start-job-run/integration-test-eks-cluster/DefaultVpc/Resource": [ @@ -274,6 +286,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.ClusterResourceProvider/OnEventHandler": [ + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 0 + } + ], "/aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.ClusterResourceProvider/OnEventHandler/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", @@ -286,6 +304,12 @@ "data": "OnEventHandler42BEBAE0" } ], + "/aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.ClusterResourceProvider/IsCompleteHandler": [ + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 0 + } + ], "/aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.ClusterResourceProvider/IsCompleteHandler/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", @@ -400,6 +424,12 @@ "data": "awscdkawseksClusterResourceProviderNestedStackawscdkawseksClusterResourceProviderNestedStackResource9827C454" } ], + "/aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.KubectlProvider/Handler": [ + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 2 + } + ], "/aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.KubectlProvider/Handler/Resource": [ { "type": "aws:cdk:logicalId", @@ -514,6 +544,18 @@ "data": "StartaJobRunawsclilayer110EEF0B" } ], + "/aws-stepfunctions-tasks-emr-containers-start-job-run/Start a Job Run/Call Update-Role-Trust-Policy/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "StartaJobRunCallUpdateRoleTrustPolicyinlinePolicyAddedToExecutionRole06B56B67D" + } + ], + "/aws-stepfunctions-tasks-emr-containers-start-job-run/Start a Job Run/Call Update-Role-Trust-Policy/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "StartaJobRunCallUpdateRoleTrustPolicyinlinePolicyAddedToExecutionRole10015039B" + } + ], "/aws-stepfunctions-tasks-emr-containers-start-job-run/Start a Job Run/CustomResourceProvider/framework-onEvent/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", @@ -548,6 +590,10 @@ { "type": "aws:cdk:is-custom-resource-handler-singleton", "data": true + }, + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 0 } ], "/aws-stepfunctions-tasks-emr-containers-start-job-run/AWS679f53fac002430cb0da5b7982bd2287/ServiceRole/Resource": [ @@ -566,6 +612,10 @@ { "type": "aws:cdk:is-custom-resource-handler-singleton", "data": true + }, + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 2 } ], "/aws-stepfunctions-tasks-emr-containers-start-job-run/SingletonLambda8693BB64968944B69AAFB0CC9EB8757C/ServiceRole/Resource": [ @@ -574,12 +624,6 @@ "data": "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleF99BDB4C" } ], - "/aws-stepfunctions-tasks-emr-containers-start-job-run/SingletonLambda8693BB64968944B69AAFB0CC9EB8757C/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleDefaultPolicy87B52EEA" - } - ], "/aws-stepfunctions-tasks-emr-containers-start-job-run/SingletonLambda8693BB64968944B69AAFB0CC9EB8757C/Resource": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/tree.json index 121c13c58b01f..f4364b824306e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/emrcontainers/integ.start-job-run.js.snapshot/tree.json @@ -1119,7 +1119,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "KubectlReadyBarrier": { @@ -1421,7 +1421,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "22de69e75b55e15d4d49905d8a4901edd66d1367f617c2a01ac6e86ca2b7eb84.zip" + "s3Key": "93d96d34e0d3cd20eb082652b91012b131bdc34fcf2bc16eb4170e04772fddb1.zip" }, "description": "/opt/nodejs/node_modules/proxy-agent" } @@ -1542,7 +1542,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "1eaf141d4012ab0977a33bdf864ebbc6aa869a607e97fab6cd231fe6ef503aec.zip" + "s3Key": "aea9e78c19375cc11788e490fdd0d8d90a99fc5509f3ade872bff74980f89265.zip" }, "description": "onEvent handler for EKS cluster resource provider", "environment": { @@ -1682,7 +1682,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "1eaf141d4012ab0977a33bdf864ebbc6aa869a607e97fab6cd231fe6ef503aec.zip" + "s3Key": "aea9e78c19375cc11788e490fdd0d8d90a99fc5509f3ade872bff74980f89265.zip" }, "description": "isComplete handler for EKS cluster resource provider", "environment": { @@ -1913,7 +1913,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.ClusterResourceProvider/Provider)", "environment": { @@ -2142,7 +2142,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - isComplete (aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.ClusterResourceProvider/Provider)", "environment": { @@ -2368,7 +2368,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onTimeout (aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.ClusterResourceProvider/Provider)", "environment": { @@ -2721,7 +2721,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/89a0adef78ece6c87a85a286e4270dac2a3299c7ececf29729771b28beea0859.json" + "/edb40f36bcdaff1624a243a2f8a0a146ec98e55d2cdaf9f0a5b8d1af1d0b1edf.json" ] ] } @@ -2735,7 +2735,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "@aws-cdk--aws-eks.KubectlProvider": { @@ -2782,7 +2782,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "abc70c90ded969d12235ca11768293cb20557cff54518518480c0d9fb344a098.zip" + "s3Key": "fba306965da4b2680dd8b4e6916610efe237162f913f22b10146f647b3f6bce4.zip" }, "description": "onEvent handler for EKS kubectl resource provider", "environment": { @@ -2873,7 +2873,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip" + "s3Key": "f24ba5e516d9d80b64bc7b0f406eedd12c36b20e7461f3e7719b7ffbdad72410.zip" }, "description": "/opt/awscli/aws" } @@ -2929,7 +2929,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "7e5f48d1e79c915595d938c932b6f0101715a162780d01a55845367e014fbcda.zip" + "s3Key": "e35d06c04a5f086530cad7876451b9fbd93ded1d4940950bb104fb78dd322310.zip" }, "description": "/opt/kubectl/kubectl and /opt/helm/helm" } @@ -3134,7 +3134,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-stepfunctions-tasks-emr-containers-start-job-run/@aws-cdk--aws-eks.KubectlProvider/Provider)", "environment": { @@ -3298,7 +3298,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/db17d4f429860e38ff73349adc27c59c00dc5c6f8a7a98370e215e5d679569b3.json" + "/c5f1be918f6d699d0df40ce7a14be6bcd9fde7461f74cc5cf5d93afd284cb0e9.json" ] ] } @@ -3312,7 +3312,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "Virtual Cluster": { @@ -3554,7 +3554,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip" + "s3Key": "f24ba5e516d9d80b64bc7b0f406eedd12c36b20e7461f3e7719b7ffbdad72410.zip" }, "description": "/opt/awscli/aws" } @@ -3573,6 +3573,119 @@ "Call Update-Role-Trust-Policy": { "id": "Call Update-Role-Trust-Policy", "path": "aws-stepfunctions-tasks-emr-containers-start-job-run/Start a Job Run/Call Update-Role-Trust-Policy", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-stepfunctions-tasks-emr-containers-start-job-run/Start a Job Run/Call Update-Role-Trust-Policy/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-tasks-emr-containers-start-job-run/Start a Job Run/Call Update-Role-Trust-Policy/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "eks:DescribeCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":eks:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster/", + { + "Fn::GetAtt": [ + "StartaJobRunGetEksClusterInfoD0E31373", + "virtualCluster.containerProvider.id" + ] + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "StartaJobRunCallUpdateRoleTrustPolicyinlinePolicyAddedToExecutionRole06B56B67D", + "roles": [ + { + "Ref": "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleF99BDB4C" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-stepfunctions-tasks-emr-containers-start-job-run/Start a Job Run/Call Update-Role-Trust-Policy/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-tasks-emr-containers-start-job-run/Start a Job Run/Call Update-Role-Trust-Policy/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "iam:GetRole", + "iam:UpdateAssumeRolePolicy" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "StartaJobRunJobExecutionRole157B6BE1", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "StartaJobRunCallUpdateRoleTrustPolicyinlinePolicyAddedToExecutionRole10015039B", + "roles": [ + { + "Ref": "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleF99BDB4C" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", "version": "0.0.0" @@ -3739,7 +3852,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-stepfunctions-tasks-emr-containers-start-job-run/Start a Job Run/CustomResourceProvider)", "environment": { @@ -3917,7 +4030,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "746da84b10e215c552e68b6d2061024e4429f0386f43a35ef5e4d2940655692e.zip" + "s3Key": "9e8936ba1db43e0919ba2fc8265d50686eeaca82830c471ff8b7b0672c5970ec.zip" }, "handler": "index.handler", "role": { @@ -4003,83 +4116,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-stepfunctions-tasks-emr-containers-start-job-run/SingletonLambda8693BB64968944B69AAFB0CC9EB8757C/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-stepfunctions-tasks-emr-containers-start-job-run/SingletonLambda8693BB64968944B69AAFB0CC9EB8757C/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "eks:DescribeCluster", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":eks:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster/", - { - "Fn::GetAtt": [ - "StartaJobRunGetEksClusterInfoD0E31373", - "virtualCluster.containerProvider.id" - ] - } - ] - ] - } - }, - { - "Action": [ - "iam:GetRole", - "iam:UpdateAssumeRolePolicy" - ], - "Effect": "Allow", - "Resource": { - "Fn::GetAtt": [ - "StartaJobRunJobExecutionRole157B6BE1", - "Arn" - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleDefaultPolicy87B52EEA", - "roles": [ - { - "Ref": "SingletonLambda8693BB64968944B69AAFB0CC9EB8757CServiceRoleF99BDB4C" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -4402,7 +4438,7 @@ "path": "aws-stepfunctions-tasks-emr-containers-start-job-run-integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -4448,7 +4484,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json index bf59bc7f1378d..ff4f6154be6a6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json @@ -1,20 +1,20 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a": { + "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd": { "source": { - "path": "asset.eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.bundle", + "path": "asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.zip", + "objectKey": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "72f7fd9f46b02f7a077ddde998d403f7fb607962a2f8c13a26dc7a95dbfe614f": { + "7bc8ea0dac46b9b2a2e4b5768d0e5ed2e334f4bcd17e7a2ab717ccf8cd3561b0": { "source": { "path": "IntegTestDefaultTestDeployAssertE3E7D2A4.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "72f7fd9f46b02f7a077ddde998d403f7fb607962a2f8c13a26dc7a95dbfe614f.json", + "objectKey": "7bc8ea0dac46b9b2a2e4b5768d0e5ed2e334f4bcd17e7a2ab717ccf8cd3561b0.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json index 168fd87d93cc4..3e2b97a67e637 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json @@ -29,7 +29,7 @@ "outputPaths": [ "executionArn" ], - "salt": "1720059038624" + "salt": "1738543252747" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -109,7 +109,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -154,7 +154,7 @@ } }, "flattenResponse": "false", - "salt": "1720059038627" + "salt": "1738543252748" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -333,7 +333,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.isComplete", @@ -383,7 +383,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.onTimeout", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/asset.eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.bundle/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle/index.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/asset.eafc02f6925151c95ac6a6ae81a3e36d4cf4e77db52eec8e467ce2a69454a41a.bundle/index.js rename to packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle/index.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/aws-stepfunctions-aws-sdk-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/aws-stepfunctions-aws-sdk-integ.assets.json index 1f008ff08268a..377bb3b46106c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/aws-stepfunctions-aws-sdk-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/aws-stepfunctions-aws-sdk-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "ea123b4e391a9f352cc5dadc2250aab676981408fc6ccb0efb0d106bbd933ae3": { "source": { @@ -14,7 +14,7 @@ } } }, - "00f1e8d3dbe179026634af217c5e7d2fc89e9c541112c54ce5ec8d2f63d68b88": { + "c37dbd70555c90b9d033e6236ed8171038130b4d09dea18d73b59b629bd856d7": { "source": { "path": "aws-stepfunctions-aws-sdk-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "00f1e8d3dbe179026634af217c5e7d2fc89e9c541112c54ce5ec8d2f63d68b88.json", + "objectKey": "c37dbd70555c90b9d033e6236ed8171038130b4d09dea18d73b59b629bd856d7.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/aws-stepfunctions-aws-sdk-integ.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/aws-stepfunctions-aws-sdk-integ.template.json index 7da5142b23397..188fa8ad6281a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/aws-stepfunctions-aws-sdk-integ.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/aws-stepfunctions-aws-sdk-integ.template.json @@ -1,129 +1,26 @@ { - "Mappings": { - "LatestNodeRuntimeMap": { - "af-south-1": { - "value": "nodejs20.x" - }, - "ap-east-1": { - "value": "nodejs20.x" - }, - "ap-northeast-1": { - "value": "nodejs20.x" - }, - "ap-northeast-2": { - "value": "nodejs20.x" - }, - "ap-northeast-3": { - "value": "nodejs20.x" - }, - "ap-south-1": { - "value": "nodejs20.x" - }, - "ap-south-2": { - "value": "nodejs20.x" - }, - "ap-southeast-1": { - "value": "nodejs20.x" - }, - "ap-southeast-2": { - "value": "nodejs20.x" - }, - "ap-southeast-3": { - "value": "nodejs20.x" - }, - "ap-southeast-4": { - "value": "nodejs20.x" - }, - "ap-southeast-5": { - "value": "nodejs20.x" - }, - "ap-southeast-7": { - "value": "nodejs20.x" - }, - "ca-central-1": { - "value": "nodejs20.x" - }, - "ca-west-1": { - "value": "nodejs20.x" - }, - "cn-north-1": { - "value": "nodejs20.x" - }, - "cn-northwest-1": { - "value": "nodejs20.x" - }, - "eu-central-1": { - "value": "nodejs20.x" - }, - "eu-central-2": { - "value": "nodejs20.x" - }, - "eu-isoe-west-1": { - "value": "nodejs18.x" - }, - "eu-north-1": { - "value": "nodejs20.x" - }, - "eu-south-1": { - "value": "nodejs20.x" - }, - "eu-south-2": { - "value": "nodejs20.x" - }, - "eu-west-1": { - "value": "nodejs20.x" - }, - "eu-west-2": { - "value": "nodejs20.x" - }, - "eu-west-3": { - "value": "nodejs20.x" - }, - "il-central-1": { - "value": "nodejs20.x" - }, - "me-central-1": { - "value": "nodejs20.x" - }, - "me-south-1": { - "value": "nodejs20.x" - }, - "mx-central-1": { - "value": "nodejs20.x" - }, - "sa-east-1": { - "value": "nodejs20.x" - }, - "us-east-1": { - "value": "nodejs20.x" - }, - "us-east-2": { - "value": "nodejs20.x" - }, - "us-gov-east-1": { - "value": "nodejs20.x" - }, - "us-gov-west-1": { - "value": "nodejs20.x" - }, - "us-iso-east-1": { - "value": "nodejs18.x" - }, - "us-iso-west-1": { - "value": "nodejs18.x" - }, - "us-isob-east-1": { - "value": "nodejs18.x" - }, - "us-west-1": { - "value": "nodejs20.x" - }, - "us-west-2": { - "value": "nodejs20.x" - } - } - }, "Resources": { + "CreateTableHandlerinlinePolicyAddedToExecutionRole06EB26CC6": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "dynamodb:createTable", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CreateTableHandlerinlinePolicyAddedToExecutionRole06EB26CC6", + "Roles": [ + { + "Ref": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" + } + ] + } + }, "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520": { "Type": "AWS::IAM::Role", "Properties": { @@ -155,25 +52,80 @@ ] } }, - "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRoleDefaultPolicy63AE5FEF": { + "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eF7430F4F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "ea123b4e391a9f352cc5dadc2250aab676981408fc6ccb0efb0d106bbd933ae3.zip" + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520", + "Arn" + ] + }, + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, + "Timeout": 30 + }, + "DependsOn": [ + "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" + ] + }, + "DescribeTableHandlerinlinePolicyAddedToExecutionRole0F385789E": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { "Statement": [ { - "Action": [ - "appconfig:listApplications", - "dynamodb:createTable" - ], + "Action": "dynamodb:describeTable", "Effect": "Allow", - "Resource": "*" - }, + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:eu-west-1:", + { + "Ref": "AWS::AccountId" + }, + ":table/TestTableaws-stepfunctions-aws-sdk-integ" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DescribeTableHandlerinlinePolicyAddedToExecutionRole0F385789E", + "Roles": [ + { + "Ref": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" + } + ] + } + }, + "PutItemHandlerinlinePolicyAddedToExecutionRole0323C40ED": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { - "Action": [ - "dynamodb:deleteTable", - "dynamodb:describeTable", - "dynamodb:putItem" - ], + "Action": "dynamodb:putItem", "Effect": "Allow", "Resource": { "Fn::Join": [ @@ -195,7 +147,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRoleDefaultPolicy63AE5FEF", + "PolicyName": "PutItemHandlerinlinePolicyAddedToExecutionRole0323C40ED", "Roles": [ { "Ref": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" @@ -203,37 +155,62 @@ ] } }, - "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eF7430F4F": { - "Type": "AWS::Lambda::Function", + "DeleteTableHandlerinlinePolicyAddedToExecutionRole0C57B41D5": { + "Type": "AWS::IAM::Policy", "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "ea123b4e391a9f352cc5dadc2250aab676981408fc6ccb0efb0d106bbd933ae3.zip" - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520", - "Arn" - ] + "PolicyDocument": { + "Statement": [ + { + "Action": "dynamodb:deleteTable", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:eu-west-1:", + { + "Ref": "AWS::AccountId" + }, + ":table/TestTableaws-stepfunctions-aws-sdk-integ" + ] + ] + } + } + ], + "Version": "2012-10-17" }, - "Runtime": { - "Fn::FindInMap": [ - "LatestNodeRuntimeMap", + "PolicyName": "DeleteTableHandlerinlinePolicyAddedToExecutionRole0C57B41D5", + "Roles": [ + { + "Ref": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" + } + ] + } + }, + "ListApplicationsHandlerinlinePolicyAddedToExecutionRole092B5F1DA": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { - "Ref": "AWS::Region" - }, - "value" - ] + "Action": "appconfig:listApplications", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" }, - "Timeout": 30 - }, - "DependsOn": [ - "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRoleDefaultPolicy63AE5FEF", - "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" - ] + "PolicyName": "ListApplicationsHandlerinlinePolicyAddedToExecutionRole092B5F1DA", + "Roles": [ + { + "Ref": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" + } + ] + } }, "StateMachineRoleB840431D": { "Type": "AWS::IAM::Role", @@ -359,6 +336,130 @@ "DeletionPolicy": "Delete" } }, + "Mappings": { + "LatestNodeRuntimeMap": { + "af-south-1": { + "value": "nodejs20.x" + }, + "ap-east-1": { + "value": "nodejs20.x" + }, + "ap-northeast-1": { + "value": "nodejs20.x" + }, + "ap-northeast-2": { + "value": "nodejs20.x" + }, + "ap-northeast-3": { + "value": "nodejs20.x" + }, + "ap-south-1": { + "value": "nodejs20.x" + }, + "ap-south-2": { + "value": "nodejs20.x" + }, + "ap-southeast-1": { + "value": "nodejs20.x" + }, + "ap-southeast-2": { + "value": "nodejs20.x" + }, + "ap-southeast-3": { + "value": "nodejs20.x" + }, + "ap-southeast-4": { + "value": "nodejs20.x" + }, + "ap-southeast-5": { + "value": "nodejs20.x" + }, + "ap-southeast-7": { + "value": "nodejs20.x" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "ca-west-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs20.x" + }, + "cn-northwest-1": { + "value": "nodejs20.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.x" + }, + "eu-isoe-west-1": { + "value": "nodejs18.x" + }, + "eu-north-1": { + "value": "nodejs20.x" + }, + "eu-south-1": { + "value": "nodejs20.x" + }, + "eu-south-2": { + "value": "nodejs20.x" + }, + "eu-west-1": { + "value": "nodejs20.x" + }, + "eu-west-2": { + "value": "nodejs20.x" + }, + "eu-west-3": { + "value": "nodejs20.x" + }, + "il-central-1": { + "value": "nodejs20.x" + }, + "me-central-1": { + "value": "nodejs20.x" + }, + "me-south-1": { + "value": "nodejs20.x" + }, + "mx-central-1": { + "value": "nodejs20.x" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs20.x" + }, + "us-gov-west-1": { + "value": "nodejs20.x" + }, + "us-iso-east-1": { + "value": "nodejs18.x" + }, + "us-iso-west-1": { + "value": "nodejs18.x" + }, + "us-isob-east-1": { + "value": "nodejs18.x" + }, + "us-west-1": { + "value": "nodejs20.x" + }, + "us-west-2": { + "value": "nodejs20.x" + } + } + }, "Outputs": { "ExportsOutputRefStateMachine2E01A3A5BA46F753": { "Value": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/integ.json index 7806b46d9ee85..6817009d336e8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "IntegTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/manifest.json index cce6a94cc7219..4256579d95d0b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "aws-stepfunctions-aws-sdk-integ.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/00f1e8d3dbe179026634af217c5e7d2fc89e9c541112c54ce5ec8d2f63d68b88.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c37dbd70555c90b9d033e6236ed8171038130b4d09dea18d73b59b629bd856d7.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -34,28 +34,94 @@ "aws-stepfunctions-aws-sdk-integ.assets" ], "metadata": { + "/aws-stepfunctions-aws-sdk-integ/CreateTable/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "CreateTableHandlerinlinePolicyAddedToExecutionRole06EB26CC6" + } + ], "/aws-stepfunctions-aws-sdk-integ/LatestNodeRuntimeMap": [ { "type": "aws:cdk:logicalId", "data": "LatestNodeRuntimeMap" } ], + "/aws-stepfunctions-aws-sdk-integ/CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7e": [ + { + "type": "aws:cdk:is-custom-resource-handler-singleton", + "data": true + }, + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 0 + }, + { + "type": "aws:cdk:is-custom-resource-handler-singleton", + "data": true + }, + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 0 + }, + { + "type": "aws:cdk:is-custom-resource-handler-singleton", + "data": true + }, + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 0 + }, + { + "type": "aws:cdk:is-custom-resource-handler-singleton", + "data": true + }, + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 0 + }, + { + "type": "aws:cdk:is-custom-resource-handler-singleton", + "data": true + }, + { + "type": "aws:cdk:is-custom-resource-handler-runtime-family", + "data": 0 + } + ], "/aws-stepfunctions-aws-sdk-integ/CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7e/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", "data": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" } ], - "/aws-stepfunctions-aws-sdk-integ/CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7e/ServiceRole/DefaultPolicy/Resource": [ + "/aws-stepfunctions-aws-sdk-integ/CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7e/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eF7430F4F" + } + ], + "/aws-stepfunctions-aws-sdk-integ/DescribeTable/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRoleDefaultPolicy63AE5FEF" + "data": "DescribeTableHandlerinlinePolicyAddedToExecutionRole0F385789E" } ], - "/aws-stepfunctions-aws-sdk-integ/CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7e/Resource": [ + "/aws-stepfunctions-aws-sdk-integ/PutItem/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eF7430F4F" + "data": "PutItemHandlerinlinePolicyAddedToExecutionRole0323C40ED" + } + ], + "/aws-stepfunctions-aws-sdk-integ/DeleteTable/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DeleteTableHandlerinlinePolicyAddedToExecutionRole0C57B41D5" + } + ], + "/aws-stepfunctions-aws-sdk-integ/ListApplications/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ListApplicationsHandlerinlinePolicyAddedToExecutionRole092B5F1DA" } ], "/aws-stepfunctions-aws-sdk-integ/StateMachine/Role/Resource": [ @@ -93,6 +159,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRoleDefaultPolicy63AE5FEF": [ + { + "type": "aws:cdk:logicalId", + "data": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRoleDefaultPolicy63AE5FEF", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-stepfunctions-aws-sdk-integ" @@ -114,7 +189,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/72f7fd9f46b02f7a077ddde998d403f7fb607962a2f8c13a26dc7a95dbfe614f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7bc8ea0dac46b9b2a2e4b5768d0e5ed2e334f4bcd17e7a2ab717ccf8cd3561b0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/tree.json index d2a28091e2d44..db6561c61250d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-stepfunctions-tasks/test/lambda/integ.call-aws-service-cross-region.js.snapshot/tree.json @@ -15,6 +15,47 @@ "Handler": { "id": "Handler", "path": "aws-stepfunctions-aws-sdk-integ/CreateTable/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-stepfunctions-aws-sdk-integ/CreateTable/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-aws-sdk-integ/CreateTable/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "dynamodb:createTable", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "CreateTableHandlerinlinePolicyAddedToExecutionRole06EB26CC6", + "roles": [ + { + "Ref": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", "version": "0.0.0" @@ -88,72 +129,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-stepfunctions-aws-sdk-integ/CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7e/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-stepfunctions-aws-sdk-integ/CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7e/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "appconfig:listApplications", - "dynamodb:createTable" - ], - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "dynamodb:deleteTable", - "dynamodb:describeTable", - "dynamodb:putItem" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:eu-west-1:", - { - "Ref": "AWS::AccountId" - }, - ":table/TestTableaws-stepfunctions-aws-sdk-integ" - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRoleDefaultPolicy63AE5FEF", - "roles": [ - { - "Ref": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -236,6 +211,62 @@ "Handler": { "id": "Handler", "path": "aws-stepfunctions-aws-sdk-integ/DescribeTable/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-stepfunctions-aws-sdk-integ/DescribeTable/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-aws-sdk-integ/DescribeTable/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "dynamodb:describeTable", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:eu-west-1:", + { + "Ref": "AWS::AccountId" + }, + ":table/TestTableaws-stepfunctions-aws-sdk-integ" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "DescribeTableHandlerinlinePolicyAddedToExecutionRole0F385789E", + "roles": [ + { + "Ref": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", "version": "0.0.0" @@ -254,6 +285,62 @@ "Handler": { "id": "Handler", "path": "aws-stepfunctions-aws-sdk-integ/PutItem/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-stepfunctions-aws-sdk-integ/PutItem/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-aws-sdk-integ/PutItem/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "dynamodb:putItem", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:eu-west-1:", + { + "Ref": "AWS::AccountId" + }, + ":table/TestTableaws-stepfunctions-aws-sdk-integ" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "PutItemHandlerinlinePolicyAddedToExecutionRole0323C40ED", + "roles": [ + { + "Ref": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", "version": "0.0.0" @@ -288,6 +375,62 @@ "Handler": { "id": "Handler", "path": "aws-stepfunctions-aws-sdk-integ/DeleteTable/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-stepfunctions-aws-sdk-integ/DeleteTable/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-aws-sdk-integ/DeleteTable/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "dynamodb:deleteTable", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:eu-west-1:", + { + "Ref": "AWS::AccountId" + }, + ":table/TestTableaws-stepfunctions-aws-sdk-integ" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "DeleteTableHandlerinlinePolicyAddedToExecutionRole0C57B41D5", + "roles": [ + { + "Ref": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", "version": "0.0.0" @@ -306,6 +449,47 @@ "Handler": { "id": "Handler", "path": "aws-stepfunctions-aws-sdk-integ/ListApplications/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-stepfunctions-aws-sdk-integ/ListApplications/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-stepfunctions-aws-sdk-integ/ListApplications/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "appconfig:listApplications", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ListApplicationsHandlerinlinePolicyAddedToExecutionRole092B5F1DA", + "roles": [ + { + "Ref": "CrossRegionAwsSdk8a0c93f3dbef4b71ac137aaf2048ce7eServiceRole5D981520" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", "version": "0.0.0" @@ -511,7 +695,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "BootstrapVersion": { @@ -549,7 +733,7 @@ "path": "IntegTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -569,7 +753,7 @@ "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsstartExecutionc5cc0786542148808c24d8ebf111c7aa/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, @@ -633,7 +817,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LatestNodeRuntimeMap": { @@ -657,7 +841,7 @@ "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution7e7cfa5e3c60aef760b5fbff9448d868/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, @@ -697,7 +881,7 @@ "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution7e7cfa5e3c60aef760b5fbff9448d868/WaitFor/IsCompleteProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "Invoke": { @@ -723,7 +907,7 @@ "path": "IntegTest/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution7e7cfa5e3c60aef760b5fbff9448d868/WaitFor/TimeoutProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "Invoke": { @@ -807,7 +991,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a": { @@ -841,7 +1025,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "BootstrapVersion": { @@ -883,7 +1067,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/MyStack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/MyStack.assets.json index 55caf082e7d14..77ccf70bc3592 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/MyStack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/MyStack.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "files": { "654051b03fb3684cba885b9015a42237db092a98a4fd2ffc75f07919dde1aca4": { "source": { @@ -14,20 +14,20 @@ } } }, - "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6": { + "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6": { "source": { - "path": "asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6", + "path": "asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip", + "objectKey": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "0c3131b847d4db816ed04a49102018fd29194df41b6799fefafa137e44121d44": { + "f8a07258c2df758a3ab7911eab5af52712b9fe08f5ca9474936bd58e8ac9c1ef": { "source": { "path": "MyStackawscdkawsdynamodbReplicaProvider4F7C92F8.nested.template.json", "packaging": "file" @@ -35,12 +35,12 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0c3131b847d4db816ed04a49102018fd29194df41b6799fefafa137e44121d44.json", + "objectKey": "f8a07258c2df758a3ab7911eab5af52712b9fe08f5ca9474936bd58e8ac9c1ef.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "739f80859474f29a40ee9eb5a9618dafbbf814541d36330fed86fe8d00445fd3": { + "31f9dcef69a720948cc2f2c28572bdaec57caafeb81043681f852d89ac879eae": { "source": { "path": "MyStack.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "739f80859474f29a40ee9eb5a9618dafbbf814541d36330fed86fe8d00445fd3.json", + "objectKey": "31f9dcef69a720948cc2f2c28572bdaec57caafeb81043681f852d89ac879eae.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/MyStack.template.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/MyStack.template.json index e3e513b92f5cb..51d1e704b2898 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/MyStack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/MyStack.template.json @@ -178,7 +178,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/0c3131b847d4db816ed04a49102018fd29194df41b6799fefafa137e44121d44.json" + "/f8a07258c2df758a3ab7911eab5af52712b9fe08f5ca9474936bd58e8ac9c1ef.json" ] ] } diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/MyStackawscdkawsdynamodbReplicaProvider4F7C92F8.nested.template.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/MyStackawscdkawsdynamodbReplicaProvider4F7C92F8.nested.template.json index 29b206b6b25db..879496978cff5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/MyStackawscdkawsdynamodbReplicaProvider4F7C92F8.nested.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/MyStackawscdkawsdynamodbReplicaProvider4F7C92F8.nested.template.json @@ -155,7 +155,30 @@ ] } }, - "OnEventHandlerServiceRoleDefaultPolicyC57085D4": { + "OnEventHandler42BEBAE0": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "654051b03fb3684cba885b9015a42237db092a98a4fd2ffc75f07919dde1aca4.zip" + }, + "Handler": "index.onEventHandler", + "Role": { + "Fn::GetAtt": [ + "OnEventHandlerServiceRole15A26729", + "Arn" + ] + }, + "Runtime": "nodejs18.x", + "Timeout": 300 + }, + "DependsOn": [ + "OnEventHandlerServiceRole15A26729" + ] + }, + "OnEventHandlerinlinePolicyAddedToExecutionRole05B1C3796": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -179,12 +202,44 @@ ] ] } - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "OnEventHandlerinlinePolicyAddedToExecutionRole05B1C3796", + "Roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "OnEventHandlerinlinePolicyAddedToExecutionRole187629D5C": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": "dynamodb:DescribeLimits", "Effect": "Allow", "Resource": "*" - }, + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "OnEventHandlerinlinePolicyAddedToExecutionRole187629D5C", + "Roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "OnEventHandlerinlinePolicyAddedToExecutionRole28650F749": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ { "Action": [ "dynamodb:DeleteTable", @@ -214,7 +269,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "OnEventHandlerServiceRoleDefaultPolicyC57085D4", + "PolicyName": "OnEventHandlerinlinePolicyAddedToExecutionRole28650F749", "Roles": [ { "Ref": "OnEventHandlerServiceRole15A26729" @@ -222,30 +277,6 @@ ] } }, - "OnEventHandler42BEBAE0": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "S3Bucket": { - "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" - }, - "S3Key": "654051b03fb3684cba885b9015a42237db092a98a4fd2ffc75f07919dde1aca4.zip" - }, - "Handler": "index.onEventHandler", - "Role": { - "Fn::GetAtt": [ - "OnEventHandlerServiceRole15A26729", - "Arn" - ] - }, - "Runtime": "nodejs18.x", - "Timeout": 300 - }, - "DependsOn": [ - "OnEventHandlerServiceRoleDefaultPolicyC57085D4", - "OnEventHandlerServiceRole15A26729" - ] - }, "IsCompleteHandlerServiceRole5810CC58": { "Type": "AWS::IAM::Role", "Properties": { @@ -407,7 +438,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "Environment": { @@ -552,7 +583,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - isComplete (MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "Environment": { @@ -694,7 +725,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onTimeout (MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "Environment": { diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b/cfn-response.js b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/cfn-response.js similarity index 77% rename from packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b/cfn-response.js rename to packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/cfn-response.js index 12f017f21494c..5a86242674505 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b/cfn-response.js +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/cfn-response.js @@ -103,4 +103,4 @@ function redactDataFromPayload(payload) { class Retry extends Error { } exports.Retry = Retry; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2ZuLXJlc3BvbnNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY2ZuLXJlc3BvbnNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQXdCQSx3Q0FtQ0M7QUFJRCxrQ0EyQ0M7QUFFRCxzREFZQztBQXhIRCw0QkFBNEI7QUFDNUIsK0JBQStCO0FBQy9CLDJC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y8gQ3JlYXRlIGEgZGVlcCBjb3B5IG9mIHRoZSBwYXlsb2FkIG9iamVjdFxuICBjb25zdCByZWRhY3RlZFBheWxvYWQ6IE9uRXZlbnRSZXNwb25zZSA9IEpTT04ucGFyc2UoSlNPTi5zdHJpbmdpZnkocGF5bG9hZCkpO1xuXG4gIC8vIFJlZGFjdCB0aGUgZGF0YSBpbiB0aGUgY29waWVkIHBheWxvYWQgb2JqZWN0XG4gIGlmIChyZWRhY3RlZFBheWxvYWQuRGF0YSkge1xuICAgIGNvbnN0IGtleXMgPSBPYmplY3Qua2V5cyhyZWRhY3RlZFBheWxvYWQuRGF0YSk7XG4gICAgZm9yIChjb25zdCBrZXkgb2Yga2V5cykge1xuICAgICAgcmVkYWN0ZWRQYXlsb2FkLkRhdGFba2V5XSA9ICcqKioqKic7XG4gICAgfVxuICB9XG4gIHJldHVybiByZWRhY3RlZFBheWxvYWQ7XG59XG5cbmV4cG9ydCBjbGFzcyBSZXRyeSBleHRlbmRzIEVycm9yIHsgfVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/consts.js b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/consts.js similarity index 100% rename from packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/consts.js rename to packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/consts.js diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b/framework.js b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/framework.js similarity index 100% rename from packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b/framework.js rename to packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/framework.js diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b/outbound.js b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/outbound.js similarity index 100% rename from packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b/outbound.js rename to packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/outbound.js diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b/util.js b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/util.js similarity index 100% rename from packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b/util.js rename to packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/util.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/framework.js b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/framework.js deleted file mode 100644 index 14b8fb6b643f6..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/framework.js +++ /dev/null @@ -1,184 +0,0 @@ -"use strict"; -/* eslint-disable max-len */ -/* eslint-disable no-console */ -const cfnResponse = require("./cfn-response"); -const consts = require("./consts"); -const outbound_1 = require("./outbound"); -const util_1 = require("./util"); -/** - * The main runtime entrypoint of the async custom resource lambda function. - * - * Any lifecycle event changes to the custom resources will invoke this handler, which will, in turn, - * interact with the user-defined `onEvent` and `isComplete` handlers. - * - * This function will always succeed. If an error occurs, it is logged but an error is not thrown. - * - * @param cfnRequest The cloudformation custom resource event. - */ -async function onEvent(cfnRequest) { - const sanitizedRequest = { ...cfnRequest, ResponseURL: '...' }; - (0, util_1.log)('onEventHandler', sanitizedRequest); - cfnRequest.ResourceProperties = cfnRequest.ResourceProperties || {}; - const onEventResult = await invokeUserFunction(consts.USER_ON_EVENT_FUNCTION_ARN_ENV, sanitizedRequest, cfnRequest.ResponseURL); - if (onEventResult?.NoEcho) { - (0, util_1.log)('redacted onEvent returned:', cfnResponse.redactDataFromPayload(onEventResult)); - } - else { - (0, util_1.log)('onEvent returned:', onEventResult); - } - // merge the request and the result from onEvent to form the complete resource event - // this also performs validation. - const resourceEvent = createResponseEvent(cfnRequest, onEventResult); - if (onEventResult?.NoEcho) { - (0, util_1.log)('readacted event:', cfnResponse.redactDataFromPayload(resourceEvent)); - } - else { - (0, util_1.log)('event:', resourceEvent); - } - // determine if this is an async provider based on whether we have an isComplete handler defined. - // if it is not defined, then we are basically ready to return a positive response. - if (!process.env[consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV]) { - return cfnResponse.submitResponse('SUCCESS', resourceEvent, { noEcho: resourceEvent.NoEcho }); - } - // ok, we are not complete, so kick off the waiter workflow - const waiter = { - stateMachineArn: (0, util_1.getEnv)(consts.WAITER_STATE_MACHINE_ARN_ENV), - name: resourceEvent.RequestId, - input: JSON.stringify(resourceEvent), - }; - (0, util_1.log)('starting waiter', { - stateMachineArn: (0, util_1.getEnv)(consts.WAITER_STATE_MACHINE_ARN_ENV), - name: resourceEvent.RequestId, - }); - // kick off waiter state machine - await (0, outbound_1.startExecution)(waiter); -} -// invoked a few times until `complete` is true or until it times out. -async function isComplete(event) { - const sanitizedRequest = { ...event, ResponseURL: '...' }; - if (event?.NoEcho) { - (0, util_1.log)('redacted isComplete request', cfnResponse.redactDataFromPayload(sanitizedRequest)); - } - else { - (0, util_1.log)('isComplete', sanitizedRequest); - } - const isCompleteResult = await invokeUserFunction(consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV, sanitizedRequest, event.ResponseURL); - if (event?.NoEcho) { - (0, util_1.log)('redacted user isComplete returned:', cfnResponse.redactDataFromPayload(isCompleteResult)); - } - else { - (0, util_1.log)('user isComplete returned:', isCompleteResult); - } - // if we are not complete, return false, and don't send a response back. - if (!isCompleteResult.IsComplete) { - if (isCompleteResult.Data && Object.keys(isCompleteResult.Data).length > 0) { - throw new Error('"Data" is not allowed if "IsComplete" is "False"'); - } - // This must be the full event, it will be deserialized in `onTimeout` to send the response to CloudFormation - throw new cfnResponse.Retry(JSON.stringify(event)); - } - const response = { - ...event, - ...isCompleteResult, - Data: { - ...event.Data, - ...isCompleteResult.Data, - }, - }; - await cfnResponse.submitResponse('SUCCESS', response, { noEcho: event.NoEcho }); -} -// invoked when completion retries are exhaused. -async function onTimeout(timeoutEvent) { - (0, util_1.log)('timeoutHandler', timeoutEvent); - const isCompleteRequest = JSON.parse(JSON.parse(timeoutEvent.Cause).errorMessage); - await cfnResponse.submitResponse('FAILED', isCompleteRequest, { - reason: 'Operation timed out', - }); -} -async function invokeUserFunction(functionArnEnv, sanitizedPayload, responseUrl) { - const functionArn = (0, util_1.getEnv)(functionArnEnv); - (0, util_1.log)(`executing user function ${functionArn} with payload`, sanitizedPayload); - // transient errors such as timeouts, throttling errors (429), and other - // errors that aren't caused by a bad request (500 series) are retried - // automatically by the JavaScript SDK. - const resp = await (0, outbound_1.invokeFunction)({ - FunctionName: functionArn, - // Cannot strip 'ResponseURL' here as this would be a breaking change even though the downstream CR doesn't need it - Payload: JSON.stringify({ ...sanitizedPayload, ResponseURL: responseUrl }), - }); - (0, util_1.log)('user function response:', resp, typeof (resp)); - // ParseJsonPayload is very defensive. It should not be possible for `Payload` - // to be anything other than a JSON encoded string (or intarray). Something weird is - // going on if that happens. Still, we should do our best to survive it. - const jsonPayload = (0, util_1.parseJsonPayload)(resp.Payload); - if (resp.FunctionError) { - (0, util_1.log)('user function threw an error:', resp.FunctionError); - const errorMessage = jsonPayload.errorMessage || 'error'; - // parse function name from arn - // arn:${Partition}:lambda:${Region}:${Account}:function:${FunctionName} - const arn = functionArn.split(':'); - const functionName = arn[arn.length - 1]; - // append a reference to the log group. - const message = [ - errorMessage, - '', - `Logs: /aws/lambda/${functionName}`, // cloudwatch log group - '', - ].join('\n'); - const e = new Error(message); - // the output that goes to CFN is what's in `stack`, not the error message. - // if we have a remote trace, construct a nice message with log group information - if (jsonPayload.trace) { - // skip first trace line because it's the message - e.stack = [message, ...jsonPayload.trace.slice(1)].join('\n'); - } - throw e; - } - return jsonPayload; -} -function createResponseEvent(cfnRequest, onEventResult) { - // - // validate that onEventResult always includes a PhysicalResourceId - onEventResult = onEventResult || {}; - // if physical ID is not returned, we have some defaults for you based - // on the request type. - const physicalResourceId = onEventResult.PhysicalResourceId || defaultPhysicalResourceId(cfnRequest); - // if we are in DELETE and physical ID was changed, it's an error. - if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { - throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}" during deletion`); - } - // if we are in UPDATE and physical ID was changed, it's a replacement (just log) - if (cfnRequest.RequestType === 'Update' && physicalResourceId !== cfnRequest.PhysicalResourceId) { - (0, util_1.log)(`UPDATE: changing physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}"`); - } - // merge request event and result event (result prevails). - return { - ...cfnRequest, - ...onEventResult, - PhysicalResourceId: physicalResourceId, - }; -} -/** - * Calculates the default physical resource ID based in case user handler did - * not return a PhysicalResourceId. - * - * For "CREATE", it uses the RequestId. - * For "UPDATE" and "DELETE" and returns the current PhysicalResourceId (the one provided in `event`). - */ -function defaultPhysicalResourceId(req) { - switch (req.RequestType) { - case 'Create': - return req.RequestId; - case 'Update': - case 'Delete': - return req.PhysicalResourceId; - default: - throw new Error(`Invalid "RequestType" in request "${JSON.stringify(req)}"`); - } -} -module.exports = { - [consts.FRAMEWORK_ON_EVENT_HANDLER_NAME]: cfnResponse.safeHandler(onEvent), - [consts.FRAMEWORK_IS_COMP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JldHVybiByZXEuUGh5c2ljYWxSZXNvdXJjZUlkO1xuXG4gICAgZGVmYXVsdDpcbiAgICAgIHRocm93IG5ldyBFcnJvcihgSW52YWxpZCBcIlJlcXVlc3RUeXBlXCIgaW4gcmVxdWVzdCBcIiR7SlNPTi5zdHJpbmdpZnkocmVxKX1cImApO1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/util.js b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/util.js deleted file mode 100644 index 55b2075a3efc6..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/util.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -/* eslint-disable no-console */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseJsonPayload = exports.withRetries = exports.log = exports.getEnv = void 0; -function getEnv(name) { - const value = process.env[name]; - if (!value) { - throw new Error(`The environment variable "${name}" is not defined`); - } - return value; -} -exports.getEnv = getEnv; -function log(title, ...args) { - console.log('[provider-framework]', title, ...args.map(x => typeof (x) === 'object' ? JSON.stringify(x, undefined, 2) : x)); -} -exports.log = log; -function withRetries(options, fn) { - return async (...xs) => { - let attempts = options.attempts; - let ms = options.sleep; - while (true) { - try { - return await fn(...xs); - } - catch (e) { - if (attempts-- <= 0) { - throw e; - } - await sleep(Math.floor(Math.random() * ms)); - ms *= 2; - } - } - }; -} -exports.withRetries = withRetries; -async function sleep(ms) { - return new Promise((ok) => setTimeout(ok, ms)); -} -function parseJsonPayload(payload) { - // sdk v3 returns payloads in Uint8Array, either it or a string or Buffer - // can be cast into a buffer and then decoded. - const text = new TextDecoder().decode(Buffer.from(payload ?? '')); - if (!text) { - return {}; - } - try { - return JSON.parse(text); - } - catch { - throw new Error(`return values from user-handlers must be JSON objects. got: "${text}"`); - } -} -exports.parseJsonPayload = parseJsonPayload; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInV0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtCQUErQjs7O0FBRS9CLFNBQWdCLE1BQU0sQ0FBQyxJQUFZO0lBQ2pDLE1BQU0sS0FBSyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDaEMsSUFBSSxDQUFDLEtBQUssRUFBRSxDQUFDO1FBQ1gsTUFBTSxJQUFJLEtBQUssQ0FBQyw2QkFBNkIsSUFBSSxrQkFBa0IsQ0FBQyxDQUFDO0lBQ3ZFLENBQUM7SUFDRCxPQUFPLEtBQUssQ0FBQztBQUNmLENBQUM7QUFORCx3QkFNQztBQUVELFNBQWdCLEdBQUcsQ0FBQyxLQUFVLEVBQUUsR0FBRyxJQUFXO0lBQzVDLE9BQU8sQ0FBQyxHQUFHLENBQUMsc0JBQXNCLEVBQUUsS0FBSyxFQUFFLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLE9BQU0sQ0FBQyxDQUFDLENBQUMsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxFQUFFLFNBQVMsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUM3SCxDQUFDO0FBRkQsa0JBRUM7QUFTRCxTQUFnQixXQU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ZmZXJcbiAgLy8gY2FuIGJlIGNhc3QgaW50byBhIGJ1ZmZlciBhbmQgdGhlbiBkZWNvZGVkLlxuICBjb25zdCB0ZXh0ID0gbmV3IFRleHREZWNvZGVyKCkuZGVjb2RlKEJ1ZmZlci5mcm9tKHBheWxvYWQgPz8gJycpKTtcbiAgaWYgKCF0ZXh0KSB7IHJldHVybiB7IH07IH1cbiAgdHJ5IHtcbiAgICByZXR1cm4gSlNPTi5wYXJzZSh0ZXh0KTtcbiAgfSBjYXRjaCB7XG4gICAgdGhyb3cgbmV3IEVycm9yKGByZXR1cm4gdmFsdWVzIGZyb20gdXNlci1oYW5kbGVycyBtdXN0IGJlIEpTT04gb2JqZWN0cy4gZ290OiBcIiR7dGV4dH1cImApO1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/cdk.out index bd5311dc372de..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.5"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/integ.json index 0c2d5a50fbbf0..3871617ad3938 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "testCases": { "integ-test-custom-resource-config-lambda-node-runtime/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/integtestcustomresourceconfiglambdanoderuntimeDefaultTestDeployAssertF01B3E2D.assets.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/integtestcustomresourceconfiglambdanoderuntimeDefaultTestDeployAssertF01B3E2D.assets.json index c7fa3ae928f5d..169bcb2bff11c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/integtestcustomresourceconfiglambdanoderuntimeDefaultTestDeployAssertF01B3E2D.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/integtestcustomresourceconfiglambdanoderuntimeDefaultTestDeployAssertF01B3E2D.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/manifest.json index 0120b5da0b8b8..88cb6348fa6f1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.5", + "version": "39.0.0", "artifacts": { "MyStack.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/739f80859474f29a40ee9eb5a9618dafbbf814541d36330fed86fe8d00445fd3.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/31f9dcef69a720948cc2f2c28572bdaec57caafeb81043681f852d89ac879eae.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -82,16 +82,28 @@ "data": "OnEventHandlerServiceRole15A26729" } ], - "/MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/ServiceRole/DefaultPolicy/Resource": [ + "/MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/Resource": [ { "type": "aws:cdk:logicalId", - "data": "OnEventHandlerServiceRoleDefaultPolicyC57085D4" + "data": "OnEventHandler42BEBAE0" } ], - "/MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/Resource": [ + "/MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "OnEventHandler42BEBAE0" + "data": "OnEventHandlerinlinePolicyAddedToExecutionRole05B1C3796" + } + ], + "/MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OnEventHandlerinlinePolicyAddedToExecutionRole187629D5C" + } + ], + "/MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-2/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "OnEventHandlerinlinePolicyAddedToExecutionRole28650F749" } ], "/MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/IsCompleteHandler": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/tree.json index 7f3079ab68a51..61012f75403d2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/tree.json @@ -46,7 +46,8 @@ "path": "MyStack/Table/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SourceTableAttachedManagedPolicy-MyStackawscdkawsdynamodbReplicaProviderOnEventHandlerServiceRoleD5938648": { @@ -62,7 +63,8 @@ "path": "MyStack/Table/SourceTableAttachedManagedPolicy-MyStackawscdkawsdynamodbReplicaProviderOnEventHandlerServiceRoleD5938648/Resource/ImportedResource", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -140,13 +142,14 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.ManagedPolicy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "SourceTableAttachedManagedPolicy-MyStackawscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRole16B7E1B4": { @@ -162,7 +165,8 @@ "path": "MyStack/Table/SourceTableAttachedManagedPolicy-MyStackawscdkawsdynamodbReplicaProviderIsCompleteHandlerServiceRole16B7E1B4/Resource/ImportedResource", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -221,13 +225,14 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.ManagedPolicy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "Replicaus-east-2": { @@ -245,7 +250,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "StackRegionNotEqualsus-east-2": { @@ -259,7 +265,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "@aws-cdk--aws-dynamodb.ReplicaProvider": { @@ -287,7 +294,8 @@ "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -328,96 +336,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "iam:CreateServiceLinkedRole", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":iam::", - { - "Ref": "AWS::AccountId" - }, - ":role/aws-service-role/replication.dynamodb.amazonaws.com/AWSServiceRoleForDynamoDBReplication" - ] - ] - } - }, - { - "Action": "dynamodb:DescribeLimits", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": [ - "dynamodb:DeleteTable", - "dynamodb:DeleteTableReplica" - ], - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:us-east-2:", - { - "Ref": "AWS::AccountId" - }, - ":table/", - { - "Ref": "referencetoMyStackTableA7B7AF97Ref" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "OnEventHandlerServiceRoleDefaultPolicyC57085D4", - "roles": [ - { - "Ref": "OnEventHandlerServiceRole15A26729" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -437,7 +361,8 @@ "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -481,11 +406,168 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "iam:CreateServiceLinkedRole", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":role/aws-service-role/replication.dynamodb.amazonaws.com/AWSServiceRoleForDynamoDBReplication" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "OnEventHandlerinlinePolicyAddedToExecutionRole05B1C3796", + "roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "dynamodb:DescribeLimits", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "OnEventHandlerinlinePolicyAddedToExecutionRole187629D5C", + "roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-2": { + "id": "inlinePolicyAddedToExecutionRole-2", + "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-2", + "children": { + "Resource": { + "id": "Resource", + "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/OnEventHandler/inlinePolicyAddedToExecutionRole-2/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:DeleteTable", + "dynamodb:DeleteTableReplica" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:us-east-2:", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Ref": "referencetoMyStackTableA7B7AF97Ref" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "OnEventHandlerinlinePolicyAddedToExecutionRole28650F749", + "roles": [ + { + "Ref": "OnEventHandlerServiceRole15A26729" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IsCompleteHandler": { @@ -501,7 +583,8 @@ "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/IsCompleteHandler/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -546,7 +629,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -566,7 +650,8 @@ "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/IsCompleteHandler/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -614,7 +699,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Provider": { @@ -634,7 +720,8 @@ "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -760,13 +847,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -786,7 +875,8 @@ "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -805,7 +895,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "environment": { @@ -854,7 +944,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "framework-isComplete": { @@ -870,7 +961,8 @@ "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-isComplete/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -989,13 +1081,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1015,7 +1109,8 @@ "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-isComplete/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1034,7 +1129,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - isComplete (MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "environment": { @@ -1080,7 +1175,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "framework-onTimeout": { @@ -1096,7 +1192,8 @@ "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-onTimeout/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1215,13 +1312,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1241,7 +1340,8 @@ "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/framework-onTimeout/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1260,7 +1360,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onTimeout (MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)", "environment": { @@ -1306,7 +1406,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "waiter-state-machine": { @@ -1322,7 +1423,8 @@ "path": "MyStack/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider/waiter-state-machine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1443,13 +1545,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LogGroup": { @@ -1485,7 +1589,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1626,7 +1731,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/0c3131b847d4db816ed04a49102018fd29194df41b6799fefafa137e44121d44.json" + "/f8a07258c2df758a3ab7911eab5af52712b9fe08f5ca9474936bd58e8ac9c1ef.json" ] ] } @@ -1640,7 +1745,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "nonCrLambda": { @@ -1656,7 +1761,8 @@ "path": "MyStack/nonCrLambda/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1701,7 +1807,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1731,7 +1838,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "BootstrapVersion": { @@ -1769,7 +1877,7 @@ "path": "integ-test-custom-resource-config-lambda-node-runtime/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1815,7 +1923,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/PipelineWithCustomStepStackOutputTestDefaultTestDeployAssert6C17E8C5.assets.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/PipelineWithCustomStepStackOutputTestDefaultTestDeployAssert6C17E8C5.assets.json index 165d175024f6c..03d1fc9df1c9c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/PipelineWithCustomStepStackOutputTestDefaultTestDeployAssert6C17E8C5.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/PipelineWithCustomStepStackOutputTestDefaultTestDeployAssert6C17E8C5.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/StackOutputPipelineStack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/StackOutputPipelineStack.assets.json index 48fdea9005b19..8400a3e6ca813 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/StackOutputPipelineStack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/StackOutputPipelineStack.assets.json @@ -1,7 +1,7 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { - "e63d39049c7ed56197529f9507a93449bbde94dd62b1d355685065831df14af2": { + "b959a8dc44ab7c5b285c13467b2ae679bf99bfa30db9e26eaae41afc44f2de4e": { "source": { "path": "StackOutputPipelineStack.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e63d39049c7ed56197529f9507a93449bbde94dd62b1d355685065831df14af2.json", + "objectKey": "b959a8dc44ab7c5b285c13467b2ae679bf99bfa30db9e26eaae41afc44f2de4e.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/StackOutputPipelineStack.template.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/StackOutputPipelineStack.template.json index 086e0f98c02b5..3976bca860b30 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/StackOutputPipelineStack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/StackOutputPipelineStack.template.json @@ -922,7 +922,26 @@ ] } }, - "PipelineAppStageCustomFunctionServiceRoleDefaultPolicy83E41829": { + "PipelineAppStageCustomFunction1C605D4D": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": "\n exports.handler = async (event) => {\n console.log('Hello world.')\n };\n " + }, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "PipelineAppStageCustomFunctionServiceRole3CD45B89", + "Arn" + ] + }, + "Runtime": "nodejs18.x" + }, + "DependsOn": [ + "PipelineAppStageCustomFunctionServiceRole3CD45B89" + ] + }, + "PipelineAppStageCustomFunctioninlinePolicyAddedToExecutionRole0ACB505FB": { "Type": "AWS::IAM::Policy", "Properties": { "PolicyDocument": { @@ -938,7 +957,7 @@ ], "Version": "2012-10-17" }, - "PolicyName": "PipelineAppStageCustomFunctionServiceRoleDefaultPolicy83E41829", + "PolicyName": "PipelineAppStageCustomFunctioninlinePolicyAddedToExecutionRole0ACB505FB", "Roles": [ { "Ref": "PipelineAppStageCustomFunctionServiceRole3CD45B89" @@ -946,26 +965,6 @@ ] } }, - "PipelineAppStageCustomFunction1C605D4D": { - "Type": "AWS::Lambda::Function", - "Properties": { - "Code": { - "ZipFile": "\n exports.handler = async (event) => {\n console.log('Hello world.')\n };\n " - }, - "Handler": "index.handler", - "Role": { - "Fn::GetAtt": [ - "PipelineAppStageCustomFunctionServiceRole3CD45B89", - "Arn" - ] - }, - "Runtime": "nodejs18.x" - }, - "DependsOn": [ - "PipelineAppStageCustomFunctionServiceRoleDefaultPolicy83E41829", - "PipelineAppStageCustomFunctionServiceRole3CD45B89" - ] - }, "PipelineAppStageCustomStepCodePipelineActionRoleE64091E3": { "Type": "AWS::IAM::Role", "Properties": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/assembly-StackOutputPipelineStack-AppStage/StackOutputPipelineStackAppStageStackB810E610.assets.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/assembly-StackOutputPipelineStack-AppStage/StackOutputPipelineStackAppStageStackB810E610.assets.json index 3dd4692f8c1ff..c60debc48b263 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/assembly-StackOutputPipelineStack-AppStage/StackOutputPipelineStackAppStageStackB810E610.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/assembly-StackOutputPipelineStack-AppStage/StackOutputPipelineStackAppStageStackB810E610.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "files": { "9990535320d190a5d21dd4894139418daf53e1f802d41a8187e5767814212f4f": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/assembly-StackOutputPipelineStack-AppStage/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/assembly-StackOutputPipelineStack-AppStage/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/assembly-StackOutputPipelineStack-AppStage/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/assembly-StackOutputPipelineStack-AppStage/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/assembly-StackOutputPipelineStack-AppStage/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/assembly-StackOutputPipelineStack-AppStage/manifest.json index fa30a82a725c9..5da1742d89f68 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/assembly-StackOutputPipelineStack-AppStage/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/assembly-StackOutputPipelineStack-AppStage/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "StackOutputPipelineStackAppStageStackB810E610.assets": { "type": "cdk:asset-manifest", diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/cdk.out index 1f0068d32659a..91e1a8b9901d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/integ.json index 7a5d27a4deafb..2bbab71f5d89c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "testCases": { "PipelineWithCustomStepStackOutputTest/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/manifest.json index b121f5d37cc5d..669d324c31625 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "39.0.0", "artifacts": { "assembly-StackOutputPipelineStack-AppStage": { "type": "cdk:cloud-assembly", @@ -25,7 +25,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e63d39049c7ed56197529f9507a93449bbde94dd62b1d355685065831df14af2.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b959a8dc44ab7c5b285c13467b2ae679bf99bfa30db9e26eaae41afc44f2de4e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -131,16 +131,16 @@ "data": "PipelineAppStageCustomFunctionServiceRole3CD45B89" } ], - "/StackOutputPipelineStack/Pipeline/Pipeline/AppStage/CustomFunction/ServiceRole/DefaultPolicy/Resource": [ + "/StackOutputPipelineStack/Pipeline/Pipeline/AppStage/CustomFunction/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PipelineAppStageCustomFunctionServiceRoleDefaultPolicy83E41829" + "data": "PipelineAppStageCustomFunction1C605D4D" } ], - "/StackOutputPipelineStack/Pipeline/Pipeline/AppStage/CustomFunction/Resource": [ + "/StackOutputPipelineStack/Pipeline/Pipeline/AppStage/CustomFunction/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "PipelineAppStageCustomFunction1C605D4D" + "data": "PipelineAppStageCustomFunctioninlinePolicyAddedToExecutionRole0ACB505FB" } ], "/StackOutputPipelineStack/Pipeline/Pipeline/AppStage/CustomStep/CodePipelineActionRole/Resource": [ @@ -178,6 +178,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "PipelineAppStageCustomFunctionServiceRoleDefaultPolicy83E41829": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineAppStageCustomFunctionServiceRoleDefaultPolicy83E41829", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "StackOutputPipelineStack" diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/tree.json index 04c81c8bd3412..61b3363f6814b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js.snapshot/tree.json @@ -27,7 +27,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecr.Repository", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Pipeline": { @@ -187,13 +188,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Role": { @@ -205,7 +208,8 @@ "path": "StackOutputPipelineStack/Pipeline/Pipeline/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -348,13 +352,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -616,7 +622,8 @@ "path": "StackOutputPipelineStack/Pipeline/Pipeline/Source/ECR/CodePipelineActionRole/ImportCodePipelineActionRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -734,13 +741,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "StackOutputPipelineStackPipeline381BF9FBSourceEventRule": { @@ -822,19 +831,20 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "EventsRole": { @@ -846,7 +856,8 @@ "path": "StackOutputPipelineStack/Pipeline/Pipeline/EventsRole/ImportEventsRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -932,13 +943,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Build": { @@ -962,7 +975,8 @@ "path": "StackOutputPipelineStack/Pipeline/Pipeline/Build/Synth/CdkBuildProject/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1149,13 +1163,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1199,19 +1215,20 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_codebuild.PipelineProject", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "AppStage": { @@ -1223,7 +1240,7 @@ "path": "StackOutputPipelineStack/Pipeline/Pipeline/AppStage/Stack.Prepare", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "Stack.Deploy": { @@ -1231,7 +1248,7 @@ "path": "StackOutputPipelineStack/Pipeline/Pipeline/AppStage/Stack.Deploy", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "CustomFunction": { @@ -1247,7 +1264,8 @@ "path": "StackOutputPipelineStack/Pipeline/Pipeline/AppStage/CustomFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1288,53 +1306,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "StackOutputPipelineStack/Pipeline/Pipeline/AppStage/CustomFunction/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "StackOutputPipelineStack/Pipeline/Pipeline/AppStage/CustomFunction/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "codepipeline:PutJobFailureResult", - "codepipeline:PutJobSuccessResult" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "PipelineAppStageCustomFunctionServiceRoleDefaultPolicy83E41829", - "roles": [ - { - "Ref": "PipelineAppStageCustomFunctionServiceRole3CD45B89" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1360,11 +1337,55 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "StackOutputPipelineStack/Pipeline/Pipeline/AppStage/CustomFunction/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "StackOutputPipelineStack/Pipeline/Pipeline/AppStage/CustomFunction/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "codepipeline:PutJobFailureResult", + "codepipeline:PutJobSuccessResult" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "PipelineAppStageCustomFunctioninlinePolicyAddedToExecutionRole0ACB505FB", + "roles": [ + { + "Ref": "PipelineAppStageCustomFunctionServiceRole3CD45B89" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "CustomStep": { @@ -1380,7 +1401,8 @@ "path": "StackOutputPipelineStack/Pipeline/Pipeline/AppStage/CustomStep/CodePipelineActionRole/ImportCodePipelineActionRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1485,25 +1507,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "MutableRolearn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}": { @@ -1511,7 +1535,8 @@ "path": "StackOutputPipelineStack/Pipeline/Pipeline/MutableRolearn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "arn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}": { @@ -1523,13 +1548,14 @@ "path": "StackOutputPipelineStack/Pipeline/Pipeline/arn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}/8389e75f-0810-4838-bf64-d6f85a95cf83", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "MutableRolearn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}": { @@ -1537,7 +1563,8 @@ "path": "StackOutputPipelineStack/Pipeline/Pipeline/MutableRolearn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "arn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}": { @@ -1545,13 +1572,15 @@ "path": "StackOutputPipelineStack/Pipeline/Pipeline/arn:${AWS::Partition}:iam::${AWS::AccountId}:role--cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_codepipeline.Pipeline", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "CodeBuildActionRole": { @@ -1563,7 +1592,8 @@ "path": "StackOutputPipelineStack/Pipeline/CodeBuildActionRole/ImportCodeBuildActionRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1641,13 +1671,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1735,7 +1767,7 @@ "path": "PipelineWithCustomStepStackOutputTest/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { @@ -1781,7 +1813,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/cfn-response.js b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/cfn-response.js similarity index 51% rename from packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/cfn-response.js rename to packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/cfn-response.js index a8c8eff4a5a61..5a86242674505 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/cfn-response.js +++ b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/cfn-response.js @@ -1,6 +1,9 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Retry = exports.redactDataFromPayload = exports.safeHandler = exports.includeStackTraces = exports.submitResponse = exports.MISSING_PHYSICAL_ID_MARKER = exports.CREATE_FAILED_PHYSICAL_ID_MARKER = void 0; +exports.Retry = exports.includeStackTraces = exports.MISSING_PHYSICAL_ID_MARKER = exports.CREATE_FAILED_PHYSICAL_ID_MARKER = void 0; +exports.submitResponse = submitResponse; +exports.safeHandler = safeHandler; +exports.redactDataFromPayload = redactDataFromPayload; /* eslint-disable max-len */ /* eslint-disable no-console */ const url = require("url"); @@ -42,7 +45,6 @@ async function submitResponse(status, event, options = {}) { }, }, responseBody); } -exports.submitResponse = submitResponse; exports.includeStackTraces = true; // for unit tests function safeHandler(block) { return async (event) => { @@ -86,7 +88,6 @@ function safeHandler(block) { } }; } -exports.safeHandler = safeHandler; function redactDataFromPayload(payload) { // Create a deep copy of the payload object const redactedPayload = JSON.parse(JSON.stringify(payload)); @@ -99,8 +100,7 @@ function redactDataFromPayload(payload) { } return redactedPayload; } -exports.redactDataFromPayload = redactDataFromPayload; class Retry extends Error { } exports.Retry = Retry; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2ZuLXJlc3BvbnNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOls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5jbHVkZVN0YWNrVHJhY2VzID8gZS5zdGFjayA6IGUubWVzc2FnZSxcbiAgICAgIH0pO1xuICAgIH1cbiAgfTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHJlZGFjdERhdGFGcm9tUGF5bG9hZChwYXlsb2FkOiBPbkV2ZW50UmVzcG9uc2UpIHtcbiAgLy8gQ3JlYXRlIGEgZGVlcCBjb3B5IG9mIHRoZSBwYXlsb2FkIG9iamVjdFxuICBjb25zdCByZWRhY3RlZFBheWxvYWQ6IE9uRXZlbnRSZXNwb25zZSA9IEpTT04ucGFyc2UoSlNPTi5zdHJpbmdpZnkocGF5bG9hZCkpO1xuXG4gIC8vIFJlZGFjdCB0aGUgZGF0YSBpbiB0aGUgY29waWVkIHBheWxvYWQgb2JqZWN0XG4gIGlmIChyZWRhY3RlZFBheWxvYWQuRGF0YSkge1xuICAgIGNvbnN0IGtleXMgPSBPYmplY3Qua2V5cyhyZWRhY3RlZFBheWxvYWQuRGF0YSk7XG4gICAgZm9yIChjb25zdCBrZXkgb2Yga2V5cykge1xuICAgICAgcmVkYWN0ZWRQYXlsb2FkLkRhdGFba2V5XSA9ICcqKioqKic7XG4gICAgfVxuICB9XG4gIHJldHVybiByZWRhY3RlZFBheWxvYWQ7XG59XG5cbmV4cG9ydCBjbGFzcyBSZXRyeSBleHRlbmRzIEVycm9yIHsgfVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b/consts.js b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/consts.js similarity index 100% rename from packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b/consts.js rename to packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/consts.js diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/framework.js b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/framework.js new file mode 100644 index 0000000000000..d381e7833f0b7 --- /dev/null +++ b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/framework.js @@ -0,0 +1,185 @@ +"use strict"; +/* eslint-disable max-len */ +/* eslint-disable no-console */ +const cfnResponse = require("./cfn-response"); +const consts = require("./consts"); +const outbound_1 = require("./outbound"); +const util_1 = require("./util"); +/** + * The main runtime entrypoint of the async custom resource lambda function. + * + * Any lifecycle event changes to the custom resources will invoke this handler, which will, in turn, + * interact with the user-defined `onEvent` and `isComplete` handlers. + * + * This function will always succeed. If an error occurs, it is logged but an error is not thrown. + * + * @param cfnRequest The cloudformation custom resource event. + */ +async function onEvent(cfnRequest) { + const sanitizedRequest = { ...cfnRequest, ResponseURL: '...' }; + (0, util_1.log)('onEventHandler', sanitizedRequest); + cfnRequest.ResourceProperties = cfnRequest.ResourceProperties || {}; + const onEventResult = await invokeUserFunction(consts.USER_ON_EVENT_FUNCTION_ARN_ENV, sanitizedRequest, cfnRequest.ResponseURL); + if (onEventResult?.NoEcho) { + (0, util_1.log)('redacted onEvent returned:', cfnResponse.redactDataFromPayload(onEventResult)); + } + else { + (0, util_1.log)('onEvent returned:', onEventResult); + } + // merge the request and the result from onEvent to form the complete resource event + // this also performs validation. + const resourceEvent = createResponseEvent(cfnRequest, onEventResult); + const sanitizedEvent = { ...resourceEvent, ResponseURL: '...' }; + if (onEventResult?.NoEcho) { + (0, util_1.log)('readacted event:', cfnResponse.redactDataFromPayload(sanitizedEvent)); + } + else { + (0, util_1.log)('event:', sanitizedEvent); + } + // determine if this is an async provider based on whether we have an isComplete handler defined. + // if it is not defined, then we are basically ready to return a positive response. + if (!process.env[consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV]) { + return cfnResponse.submitResponse('SUCCESS', resourceEvent, { noEcho: resourceEvent.NoEcho }); + } + // ok, we are not complete, so kick off the waiter workflow + const waiter = { + stateMachineArn: (0, util_1.getEnv)(consts.WAITER_STATE_MACHINE_ARN_ENV), + name: resourceEvent.RequestId, + input: JSON.stringify(resourceEvent), + }; + (0, util_1.log)('starting waiter', { + stateMachineArn: (0, util_1.getEnv)(consts.WAITER_STATE_MACHINE_ARN_ENV), + name: resourceEvent.RequestId, + }); + // kick off waiter state machine + await (0, outbound_1.startExecution)(waiter); +} +// invoked a few times until `complete` is true or until it times out. +async function isComplete(event) { + const sanitizedRequest = { ...event, ResponseURL: '...' }; + if (event?.NoEcho) { + (0, util_1.log)('redacted isComplete request', cfnResponse.redactDataFromPayload(sanitizedRequest)); + } + else { + (0, util_1.log)('isComplete', sanitizedRequest); + } + const isCompleteResult = await invokeUserFunction(consts.USER_IS_COMPLETE_FUNCTION_ARN_ENV, sanitizedRequest, event.ResponseURL); + if (event?.NoEcho) { + (0, util_1.log)('redacted user isComplete returned:', cfnResponse.redactDataFromPayload(isCompleteResult)); + } + else { + (0, util_1.log)('user isComplete returned:', isCompleteResult); + } + // if we are not complete, return false, and don't send a response back. + if (!isCompleteResult.IsComplete) { + if (isCompleteResult.Data && Object.keys(isCompleteResult.Data).length > 0) { + throw new Error('"Data" is not allowed if "IsComplete" is "False"'); + } + // This must be the full event, it will be deserialized in `onTimeout` to send the response to CloudFormation + throw new cfnResponse.Retry(JSON.stringify(event)); + } + const response = { + ...event, + ...isCompleteResult, + Data: { + ...event.Data, + ...isCompleteResult.Data, + }, + }; + await cfnResponse.submitResponse('SUCCESS', response, { noEcho: event.NoEcho }); +} +// invoked when completion retries are exhaused. +async function onTimeout(timeoutEvent) { + (0, util_1.log)('timeoutHandler', timeoutEvent); + const isCompleteRequest = JSON.parse(JSON.parse(timeoutEvent.Cause).errorMessage); + await cfnResponse.submitResponse('FAILED', isCompleteRequest, { + reason: 'Operation timed out', + }); +} +async function invokeUserFunction(functionArnEnv, sanitizedPayload, responseUrl) { + const functionArn = (0, util_1.getEnv)(functionArnEnv); + (0, util_1.log)(`executing user function ${functionArn} with payload`, sanitizedPayload); + // transient errors such as timeouts, throttling errors (429), and other + // errors that aren't caused by a bad request (500 series) are retried + // automatically by the JavaScript SDK. + const resp = await (0, outbound_1.invokeFunction)({ + FunctionName: functionArn, + // Cannot strip 'ResponseURL' here as this would be a breaking change even though the downstream CR doesn't need it + Payload: JSON.stringify({ ...sanitizedPayload, ResponseURL: responseUrl }), + }); + (0, util_1.log)('user function response:', resp, typeof (resp)); + // ParseJsonPayload is very defensive. It should not be possible for `Payload` + // to be anything other than a JSON encoded string (or intarray). Something weird is + // going on if that happens. Still, we should do our best to survive it. + const jsonPayload = (0, util_1.parseJsonPayload)(resp.Payload); + if (resp.FunctionError) { + (0, util_1.log)('user function threw an error:', resp.FunctionError); + const errorMessage = jsonPayload.errorMessage || 'error'; + // parse function name from arn + // arn:${Partition}:lambda:${Region}:${Account}:function:${FunctionName} + const arn = functionArn.split(':'); + const functionName = arn[arn.length - 1]; + // append a reference to the log group. + const message = [ + errorMessage, + '', + `Logs: /aws/lambda/${functionName}`, // cloudwatch log group + '', + ].join('\n'); + const e = new Error(message); + // the output that goes to CFN is what's in `stack`, not the error message. + // if we have a remote trace, construct a nice message with log group information + if (jsonPayload.trace) { + // skip first trace line because it's the message + e.stack = [message, ...jsonPayload.trace.slice(1)].join('\n'); + } + throw e; + } + return jsonPayload; +} +function createResponseEvent(cfnRequest, onEventResult) { + // + // validate that onEventResult always includes a PhysicalResourceId + onEventResult = onEventResult || {}; + // if physical ID is not returned, we have some defaults for you based + // on the request type. + const physicalResourceId = onEventResult.PhysicalResourceId || defaultPhysicalResourceId(cfnRequest); + // if we are in DELETE and physical ID was changed, it's an error. + if (cfnRequest.RequestType === 'Delete' && physicalResourceId !== cfnRequest.PhysicalResourceId) { + throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}" during deletion`); + } + // if we are in UPDATE and physical ID was changed, it's a replacement (just log) + if (cfnRequest.RequestType === 'Update' && physicalResourceId !== cfnRequest.PhysicalResourceId) { + (0, util_1.log)(`UPDATE: changing physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${onEventResult.PhysicalResourceId}"`); + } + // merge request event and result event (result prevails). + return { + ...cfnRequest, + ...onEventResult, + PhysicalResourceId: physicalResourceId, + }; +} +/** + * Calculates the default physical resource ID based in case user handler did + * not return a PhysicalResourceId. + * + * For "CREATE", it uses the RequestId. + * For "UPDATE" and "DELETE" and returns the current PhysicalResourceId (the one provided in `event`). + */ +function defaultPhysicalResourceId(req) { + switch (req.RequestType) { + case 'Create': + return req.RequestId; + case 'Update': + case 'Delete': + return req.PhysicalResourceId; + default: + throw new Error(`Invalid "RequestType" in request "${JSON.stringify(req)}"`); + } +} +module.exports = { + [consts.FRAMEWORK_ON_EVENT_HANDLER_NAME]: cfnResponse.safeHandler(onEvent), + [consts.FRAMEWORK_IS_COMPLETE_HANDLER_NAME]: cfnResponse.safeHandler(isComplete), + [consts.FRAMEWORK_ON_TIMEOUT_HANDLER_NAME]: onTimeout, +}; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnJhbWV3b3JrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZnJhbWV3b3JrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSw0QkFBNEI7QUFDNUIsK0JBQStC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lwZVwiIGluIHJlcXVlc3QgXCIke0pTT04uc3RyaW5naWZ5KHJlcSl9XCJgKTtcbiAgfVxufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/outbound.js b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/outbound.js similarity index 54% rename from packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/outbound.js rename to packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/outbound.js index c838f7d627f66..110a420ec64c5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/custom-resources/test/custom-resource-config/integ.custom-resource-config-lambda-node-runtime.js.snapshot/asset.46fb886516825167db3571f1ed91110fc6163ce20ee26fdb097c2c983f25fcd6/outbound.js +++ b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/outbound.js @@ -74,10 +74,10 @@ async function defaultInvokeFunction(req) { }, { FunctionName: req.FunctionName, }); - return await lambda.invoke(req); + return lambda.invoke(req); } } exports.startExecution = defaultStartExecution; exports.invokeFunction = defaultInvokeFunction; exports.httpRequest = defaultHttpRequest; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0Ym91bmQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJvdXRib3VuZC50cyJdLC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VjYXVzZSBgd2FpdEZvcmAgZG9lc24ndCB0cmlnZ2VyIGFuIGluYWN0aXZlIGZ1bmN0aW9uIHRvIGRvIGFueXRoaW5nLFxuICAgICAqIGl0IGp1c3QgcnVucyBgZ2V0RnVuY3Rpb25gIGFuZCBjaGVja3MgdGhlIHN0YXRlLlxuICAgICAqL1xuICAgIHJldHVybiBhd2FpdCBsYW1iZGEuaW52b2tlKHJlcSk7XG4gIH0gY2F0Y2gge1xuICAgIC8qKlxuICAgICAqIFRoZSBzdGF0dXMgb2YgdGhlIExhbWJkYSBmdW5jdGlvbiBpcyBjaGVja2VkIGV2ZXJ5IHNlY29uZCBmb3IgdXAgdG8gMzAwIHNlY29uZHMuXG4gICAgICogRXhpdHMgdGhlIGxvb3Agb24gJ0FjdGl2ZScgc3RhdGUgYW5kIHRocm93cyBhbiBlcnJvciBvbiAnSW5hY3RpdmUnIG9yICdGYWlsZWQnLlxuICAgICAqXG4gICAgICogQW5kIG5vdyB3ZSB3YWl0LlxuICAgICAqL1xuICAgIGF3YWl0IHdhaXRVbnRpbEZ1bmN0aW9uQWN0aXZlVjIoe1xuICAgICAgY2xpZW50OiBsYW1iZGEsXG4gICAgICBtYXhXYWl0VGltZTogMzAwLFxuICAgIH0sIHtcbiAgICAgIEZ1bmN0aW9uTmFtZTogcmVxLkZ1bmN0aW9uTmFtZSxcbiAgICB9KTtcbiAgICByZXR1cm4gYXdhaXQgbGFtYmRhLmludm9rZShyZXEpO1xuICB9XG59XG5cbmV4cG9ydCBsZXQgc3RhcnRFeGVjdXRpb24gPSBkZWZhdWx0U3RhcnRFeGVjdXRpb247XG5leHBvcnQgbGV0IGludm9rZUZ1bmN0aW9uID0gZGVmYXVsdEludm9rZUZ1bmN0aW9uO1xuZXhwb3J0IGxldCBodHRwUmVxdWVzdCA9IGRlZmF1bHRIdHRwUmVxdWVzdDtcbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib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No newline at end of file diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/util.js b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/util.js new file mode 100644 index 0000000000000..5d48e914660a6 --- /dev/null +++ b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6/util.js @@ -0,0 +1,53 @@ +"use strict"; +/* eslint-disable no-console */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getEnv = getEnv; +exports.log = log; +exports.withRetries = withRetries; +exports.parseJsonPayload = parseJsonPayload; +function getEnv(name) { + const value = process.env[name]; + if (!value) { + throw new Error(`The environment variable "${name}" is not defined`); + } + return value; +} +function log(title, ...args) { + console.log('[provider-framework]', title, ...args.map(x => typeof (x) === 'object' ? JSON.stringify(x, undefined, 2) : x)); +} +function withRetries(options, fn) { + return async (...xs) => { + let attempts = options.attempts; + let ms = options.sleep; + while (true) { + try { + return await fn(...xs); + } + catch (e) { + if (attempts-- <= 0) { + throw e; + } + await sleep(Math.floor(Math.random() * ms)); + ms *= 2; + } + } + }; +} +async function sleep(ms) { + return new Promise((ok) => setTimeout(ok, ms)); +} +function parseJsonPayload(payload) { + // sdk v3 returns payloads in Uint8Array, either it or a string or Buffer + // can be cast into a buffer and then decoded. + const text = new TextDecoder().decode(Buffer.from(payload ?? '')); + if (!text) { + return {}; + } + try { + return JSON.parse(text); + } + catch { + throw new Error(`return values from user-handlers must be JSON objects. got: "${text}"`); + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInV0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nJvbSB1c2VyLWhhbmRsZXJzIG11c3QgYmUgSlNPTiBvYmplY3RzLiBnb3Q6IFwiJHt0ZXh0fVwiYCk7XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/cdk-amplify-app-asset-deployment.assets.json b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/cdk-amplify-app-asset-deployment.assets.json index 2f2538ed81f4d..ddf4e110f78e2 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/cdk-amplify-app-asset-deployment.assets.json +++ b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/cdk-amplify-app-asset-deployment.assets.json @@ -27,20 +27,20 @@ } } }, - "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b": { + "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6": { "source": { - "path": "asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b", + "path": "asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip", + "objectKey": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "729822eca74de6e663f71f38aafd789c65b3a5565ddae519c48ea47577fc229a": { + "d4048ca0fac976d96b27ba3964ee447e7682c726745713d8c553e129a905c6c0": { "source": { "path": "cdkamplifyappassetdeploymentcomamazonawscdkcustomresourcesamplifyassetdeploymentprovider02396C99.nested.template.json", "packaging": "file" @@ -48,12 +48,12 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "729822eca74de6e663f71f38aafd789c65b3a5565ddae519c48ea47577fc229a.json", + "objectKey": "d4048ca0fac976d96b27ba3964ee447e7682c726745713d8c553e129a905c6c0.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "a7c570ba0874c185b8984ca970be67be40a0274a7c7db4c56b3ca4c5c02e95c5": { + "492e62af8d5f3158ec66f6e71f1de9b79ad720019fc617754d5b38dec6585908": { "source": { "path": "cdk-amplify-app-asset-deployment.template.json", "packaging": "file" @@ -61,7 +61,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a7c570ba0874c185b8984ca970be67be40a0274a7c7db4c56b3ca4c5c02e95c5.json", + "objectKey": "492e62af8d5f3158ec66f6e71f1de9b79ad720019fc617754d5b38dec6585908.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/cdk-amplify-app-asset-deployment.template.json b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/cdk-amplify-app-asset-deployment.template.json index 48f0f1e227ffc..7eaef26c72cac 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/cdk-amplify-app-asset-deployment.template.json +++ b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/cdk-amplify-app-asset-deployment.template.json @@ -90,7 +90,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/729822eca74de6e663f71f38aafd789c65b3a5565ddae519c48ea47577fc229a.json" + "/d4048ca0fac976d96b27ba3964ee447e7682c726745713d8c553e129a905c6c0.json" ] ] } diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/cdkamplifyappassetdeploymentcomamazonawscdkcustomresourcesamplifyassetdeploymentprovider02396C99.nested.template.json b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/cdkamplifyappassetdeploymentcomamazonawscdkcustomresourcesamplifyassetdeploymentprovider02396C99.nested.template.json index 1b24a48d631b5..f909d56caebf4 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/cdkamplifyappassetdeploymentcomamazonawscdkcustomresourcesamplifyassetdeploymentprovider02396C99.nested.template.json +++ b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/cdkamplifyappassetdeploymentcomamazonawscdkcustomresourcesamplifyassetdeploymentprovider02396C99.nested.template.json @@ -155,32 +155,6 @@ ] } }, - "amplifyassetdeploymentoneventServiceRoleDefaultPolicy2DF60B3E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "amplify:ListJobs", - "amplify:StartDeployment", - "s3:GetObject", - "s3:GetSignedUrl" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "amplifyassetdeploymentoneventServiceRoleDefaultPolicy2DF60B3E", - "Roles": [ - { - "Ref": "amplifyassetdeploymentoneventServiceRoleB6658CD9" - } - ] - } - }, "amplifyassetdeploymentonevent974704DA": { "Type": "AWS::Lambda::Function", "Properties": { @@ -208,10 +182,35 @@ } }, "DependsOn": [ - "amplifyassetdeploymentoneventServiceRoleDefaultPolicy2DF60B3E", "amplifyassetdeploymentoneventServiceRoleB6658CD9" ] }, + "amplifyassetdeploymentoneventinlinePolicyAddedToExecutionRole0C600B4AD": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "amplify:ListJobs", + "amplify:StartDeployment", + "s3:GetObject", + "s3:GetSignedUrl" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "amplifyassetdeploymentoneventinlinePolicyAddedToExecutionRole0C600B4AD", + "Roles": [ + { + "Ref": "amplifyassetdeploymentoneventServiceRoleB6658CD9" + } + ] + } + }, "amplifyassetdeploymentiscompleteServiceRole007B2AB6": { "Type": "AWS::IAM::Role", "Properties": { @@ -243,27 +242,6 @@ ] } }, - "amplifyassetdeploymentiscompleteServiceRoleDefaultPolicyC0D08321": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "amplify:GetJob*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "amplifyassetdeploymentiscompleteServiceRoleDefaultPolicyC0D08321", - "Roles": [ - { - "Ref": "amplifyassetdeploymentiscompleteServiceRole007B2AB6" - } - ] - } - }, "amplifyassetdeploymentiscomplete236D9453": { "Type": "AWS::Lambda::Function", "Properties": { @@ -291,10 +269,30 @@ } }, "DependsOn": [ - "amplifyassetdeploymentiscompleteServiceRoleDefaultPolicyC0D08321", "amplifyassetdeploymentiscompleteServiceRole007B2AB6" ] }, + "amplifyassetdeploymentiscompleteinlinePolicyAddedToExecutionRole032FCEDB8": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "amplify:GetJob*", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "amplifyassetdeploymentiscompleteinlinePolicyAddedToExecutionRole032FCEDB8", + "Roles": [ + { + "Ref": "amplifyassetdeploymentiscompleteServiceRole007B2AB6" + } + ] + } + }, "amplifyassetdeploymenthandlerproviderframeworkonEventServiceRole8F19D99F": { "Type": "AWS::IAM::Role", "Properties": { @@ -402,7 +400,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider)", "Environment": { @@ -547,7 +545,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - isComplete (cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider)", "Environment": { @@ -689,7 +687,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onTimeout (cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider)", "Environment": { diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/integ.json b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/integ.json index 8d39d4413f937..a215950e62891 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/integ.json @@ -5,7 +5,6 @@ "stacks": [ "cdk-amplify-app-asset-deployment" ], - "diffAssets": true, "assertionStack": "cdk-amplify-app-integ-test/DefaultTest/DeployAssert", "assertionStackName": "cdkamplifyappintegtestDefaultTestDeployAssert8ED3E8A4" } diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/manifest.json b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/manifest.json index 9ce790ebdbcc8..9787347cda22c 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a7c570ba0874c185b8984ca970be67be40a0274a7c7db4c56b3ca4c5c02e95c5.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/492e62af8d5f3158ec66f6e71f1de9b79ad720019fc617754d5b38dec6585908.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -76,16 +76,16 @@ "data": "amplifyassetdeploymentoneventServiceRoleB6658CD9" } ], - "/cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-on-event/ServiceRole/DefaultPolicy/Resource": [ + "/cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-on-event/Resource": [ { "type": "aws:cdk:logicalId", - "data": "amplifyassetdeploymentoneventServiceRoleDefaultPolicy2DF60B3E" + "data": "amplifyassetdeploymentonevent974704DA" } ], - "/cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-on-event/Resource": [ + "/cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-on-event/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "amplifyassetdeploymentonevent974704DA" + "data": "amplifyassetdeploymentoneventinlinePolicyAddedToExecutionRole0C600B4AD" } ], "/cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-is-complete": [ @@ -100,16 +100,16 @@ "data": "amplifyassetdeploymentiscompleteServiceRole007B2AB6" } ], - "/cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-is-complete/ServiceRole/DefaultPolicy/Resource": [ + "/cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-is-complete/Resource": [ { "type": "aws:cdk:logicalId", - "data": "amplifyassetdeploymentiscompleteServiceRoleDefaultPolicyC0D08321" + "data": "amplifyassetdeploymentiscomplete236D9453" } ], - "/cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-is-complete/Resource": [ + "/cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-is-complete/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "amplifyassetdeploymentiscomplete236D9453" + "data": "amplifyassetdeploymentiscompleteinlinePolicyAddedToExecutionRole032FCEDB8" } ], "/cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider/framework-onEvent/ServiceRole/Resource": [ diff --git a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/tree.json b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/tree.json index 6a52b39c232bd..7a9bd6f20df46 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-amplify-alpha/test/integ.app-asset-deployment.js.snapshot/tree.json @@ -25,7 +25,8 @@ "path": "cdk-amplify-app-asset-deployment/SampleAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -47,7 +48,8 @@ "path": "cdk-amplify-app-asset-deployment/App/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -78,7 +80,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -146,19 +149,22 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-amplify-alpha.Branch", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-amplify-alpha.App", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider": { @@ -186,7 +192,8 @@ "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-on-event/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -227,55 +234,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-on-event/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-on-event/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "amplify:ListJobs", - "amplify:StartDeployment", - "s3:GetObject", - "s3:GetSignedUrl" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "amplifyassetdeploymentoneventServiceRoleDefaultPolicy2DF60B3E", - "roles": [ - { - "Ref": "amplifyassetdeploymentoneventServiceRoleB6658CD9" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -295,7 +259,8 @@ "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-on-event/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -338,11 +303,57 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-on-event/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-on-event/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "amplify:ListJobs", + "amplify:StartDeployment", + "s3:GetObject", + "s3:GetSignedUrl" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "amplifyassetdeploymentoneventinlinePolicyAddedToExecutionRole0C600B4AD", + "roles": [ + { + "Ref": "amplifyassetdeploymentoneventServiceRoleB6658CD9" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "amplify-asset-deployment-is-complete": { @@ -358,7 +369,8 @@ "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-is-complete/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -399,50 +411,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-is-complete/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-is-complete/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "amplify:GetJob*", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "amplifyassetdeploymentiscompleteServiceRoleDefaultPolicyC0D08321", - "roles": [ - { - "Ref": "amplifyassetdeploymentiscompleteServiceRole007B2AB6" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -462,7 +436,8 @@ "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-is-complete/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -505,11 +480,52 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-is-complete/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-is-complete/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "amplify:GetJob*", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "amplifyassetdeploymentiscompleteinlinePolicyAddedToExecutionRole032FCEDB8", + "roles": [ + { + "Ref": "amplifyassetdeploymentiscompleteServiceRole007B2AB6" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "amplify-asset-deployment-handler-provider": { @@ -529,7 +545,8 @@ "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -655,13 +672,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -681,7 +700,8 @@ "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -700,7 +720,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider)", "environment": { @@ -749,7 +769,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "framework-isComplete": { @@ -765,7 +786,8 @@ "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider/framework-isComplete/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -884,13 +906,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -910,7 +934,8 @@ "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider/framework-isComplete/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -929,7 +954,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - isComplete (cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider)", "environment": { @@ -975,7 +1000,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "framework-onTimeout": { @@ -991,7 +1017,8 @@ "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider/framework-onTimeout/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1110,13 +1137,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1136,7 +1165,8 @@ "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider/framework-onTimeout/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1155,7 +1185,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onTimeout (cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider)", "environment": { @@ -1201,7 +1231,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "waiter-state-machine": { @@ -1217,7 +1248,8 @@ "path": "cdk-amplify-app-asset-deployment/com.amazonaws.cdk.custom-resources.amplify-asset-deployment-provider/amplify-asset-deployment-handler-provider/waiter-state-machine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1338,13 +1370,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LogGroup": { @@ -1380,7 +1414,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1492,7 +1527,7 @@ { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "/729822eca74de6e663f71f38aafd789c65b3a5565ddae519c48ea47577fc229a.json" + "/d4048ca0fac976d96b27ba3964ee447e7682c726745713d8c553e129a905c6c0.json" ] ] } diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.6f50ad1670be7195f01a64eddc86541c357b2087e992904bdcb9f5ae67c82ecb.handler/handler.d.ts b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.17f11fcd08888571765fa70b9736c3bbb0d5098be088eadfa080ecba1f52b09b.handler/handler.d.ts similarity index 100% rename from packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.6f50ad1670be7195f01a64eddc86541c357b2087e992904bdcb9f5ae67c82ecb.handler/handler.d.ts rename to packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.17f11fcd08888571765fa70b9736c3bbb0d5098be088eadfa080ecba1f52b09b.handler/handler.d.ts diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.6f50ad1670be7195f01a64eddc86541c357b2087e992904bdcb9f5ae67c82ecb.handler/handler.js b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.17f11fcd08888571765fa70b9736c3bbb0d5098be088eadfa080ecba1f52b09b.handler/handler.js similarity index 100% rename from packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.6f50ad1670be7195f01a64eddc86541c357b2087e992904bdcb9f5ae67c82ecb.handler/handler.js rename to packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.17f11fcd08888571765fa70b9736c3bbb0d5098be088eadfa080ecba1f52b09b.handler/handler.js diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.6f50ad1670be7195f01a64eddc86541c357b2087e992904bdcb9f5ae67c82ecb.handler/handler.ts b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.17f11fcd08888571765fa70b9736c3bbb0d5098be088eadfa080ecba1f52b09b.handler/handler.ts similarity index 100% rename from packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.6f50ad1670be7195f01a64eddc86541c357b2087e992904bdcb9f5ae67c82ecb.handler/handler.ts rename to packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.17f11fcd08888571765fa70b9736c3bbb0d5098be088eadfa080ecba1f52b09b.handler/handler.ts diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.da514df694ce3f41453746a766ae6aff13c869c38002598930d6d34e5711985b.bundle/index.js b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle/index.js similarity index 100% rename from packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.da514df694ce3f41453746a766ae6aff13c869c38002598930d6d34e5711985b.bundle/index.js rename to packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle/index.js diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/aws-cdk-pipes-lambda-target.assets.json b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/aws-cdk-pipes-lambda-target.assets.json index 66024173e746e..7f40f2b655dba 100644 --- a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/aws-cdk-pipes-lambda-target.assets.json +++ b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/aws-cdk-pipes-lambda-target.assets.json @@ -1,20 +1,20 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { - "6f50ad1670be7195f01a64eddc86541c357b2087e992904bdcb9f5ae67c82ecb": { + "17f11fcd08888571765fa70b9736c3bbb0d5098be088eadfa080ecba1f52b09b": { "source": { - "path": "asset.6f50ad1670be7195f01a64eddc86541c357b2087e992904bdcb9f5ae67c82ecb.handler", + "path": "asset.17f11fcd08888571765fa70b9736c3bbb0d5098be088eadfa080ecba1f52b09b.handler", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6f50ad1670be7195f01a64eddc86541c357b2087e992904bdcb9f5ae67c82ecb.zip", + "objectKey": "17f11fcd08888571765fa70b9736c3bbb0d5098be088eadfa080ecba1f52b09b.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "1b479cf8f164870a3c6d8151950f1bb109b669478bc644a2945ef7d5f786f845": { + "20f52f9c06b0b97152b2f191a59dc5d9839f1d208f1b20419caa1616ca1d25cf": { "source": { "path": "aws-cdk-pipes-lambda-target.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1b479cf8f164870a3c6d8151950f1bb109b669478bc644a2945ef7d5f786f845.json", + "objectKey": "20f52f9c06b0b97152b2f191a59dc5d9839f1d208f1b20419caa1616ca1d25cf.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/aws-cdk-pipes-lambda-target.template.json b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/aws-cdk-pipes-lambda-target.template.json index 71b06603207a3..bb4809c2e96c6 100644 --- a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/aws-cdk-pipes-lambda-target.template.json +++ b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/aws-cdk-pipes-lambda-target.template.json @@ -36,27 +36,6 @@ ] } }, - "TargetLambdaFunctionServiceRoleDefaultPolicy8CA7D5D9": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:TagResource", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "TargetLambdaFunctionServiceRoleDefaultPolicy8CA7D5D9", - "Roles": [ - { - "Ref": "TargetLambdaFunctionServiceRole2FBA8508" - } - ] - } - }, "TargetLambdaFunctionBCDA1A4E": { "Type": "AWS::Lambda::Function", "Properties": { @@ -64,7 +43,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "6f50ad1670be7195f01a64eddc86541c357b2087e992904bdcb9f5ae67c82ecb.zip" + "S3Key": "17f11fcd08888571765fa70b9736c3bbb0d5098be088eadfa080ecba1f52b09b.zip" }, "FunctionName": "TestCdkPipesTargetLambdaFunction", "Handler": "handler.handler", @@ -78,10 +57,30 @@ "Runtime": "nodejs18.x" }, "DependsOn": [ - "TargetLambdaFunctionServiceRoleDefaultPolicy8CA7D5D9", "TargetLambdaFunctionServiceRole2FBA8508" ] }, + "TargetLambdaFunctioninlinePolicyAddedToExecutionRole00E8E6F3A": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:TagResource", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TargetLambdaFunctioninlinePolicyAddedToExecutionRole00E8E6F3A", + "Roles": [ + { + "Ref": "TargetLambdaFunctionServiceRole2FBA8508" + } + ] + } + }, "PipeRole7D4AFC73": { "Type": "AWS::IAM::Role", "Properties": { diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/cdk.out b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/cdk.out index c6e612584e352..91e1a8b9901d5 100644 --- a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"38.0.1"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/integ.json b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/integ.json index 05f28986c69ba..dc747e69b567c 100644 --- a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "testCases": { "integtest-pipe-target-lambda/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/integtestpipetargetlambdaDefaultTestDeployAssert48C58B78.assets.json b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/integtestpipetargetlambdaDefaultTestDeployAssert48C58B78.assets.json index dcfd9cd892f93..9c6cdabc5cbc9 100644 --- a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/integtestpipetargetlambdaDefaultTestDeployAssert48C58B78.assets.json +++ b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/integtestpipetargetlambdaDefaultTestDeployAssert48C58B78.assets.json @@ -1,20 +1,20 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { - "da514df694ce3f41453746a766ae6aff13c869c38002598930d6d34e5711985b": { + "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd": { "source": { - "path": "asset.da514df694ce3f41453746a766ae6aff13c869c38002598930d6d34e5711985b.bundle", + "path": "asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "da514df694ce3f41453746a766ae6aff13c869c38002598930d6d34e5711985b.zip", + "objectKey": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "3c33ac9eae43436e99a637a7e22641670980a9bb5025cd87b162a427eedcee40": { + "735d3b6c682df5cb86a384bd215a1a2f55d601bbd6749c22ba14fe40f5a47e12": { "source": { "path": "integtestpipetargetlambdaDefaultTestDeployAssert48C58B78.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3c33ac9eae43436e99a637a7e22641670980a9bb5025cd87b162a427eedcee40.json", + "objectKey": "735d3b6c682df5cb86a384bd215a1a2f55d601bbd6749c22ba14fe40f5a47e12.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/integtestpipetargetlambdaDefaultTestDeployAssert48C58B78.template.json b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/integtestpipetargetlambdaDefaultTestDeployAssert48C58B78.template.json index 0dec414193bcc..698d11d376863 100644 --- a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/integtestpipetargetlambdaDefaultTestDeployAssert48C58B78.template.json +++ b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/integtestpipetargetlambdaDefaultTestDeployAssert48C58B78.template.json @@ -1,6 +1,6 @@ { "Resources": { - "AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f": { + "AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac": { "Type": "Custom::DeployAssert@SdkCallSQSsendMessage", "Properties": { "ServiceToken": { @@ -24,10 +24,10 @@ ] ] }, - "MessageBody": "\"3288cb4b-88f2-4037-9afe-4dc9dac934d0\"" + "MessageBody": "\"79687e53-152c-445c-9b3d-5a9fd95516cd\"" }, "flattenResponse": "false", - "salt": "1727486220874" + "salt": "1738599701901" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -107,7 +107,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "da514df694ce3f41453746a766ae6aff13c869c38002598930d6d34e5711985b.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -130,7 +130,7 @@ }, "service": "Lambda", "api": "listTags", - "expected": "{\"$ObjectLike\":{\"Tags\":{\"Identifier\":\"3288cb4b-88f2-4037-9afe-4dc9dac934d0\"}}}", + "expected": "{\"$ObjectLike\":{\"Tags\":{\"Identifier\":\"79687e53-152c-445c-9b3d-5a9fd95516cd\"}}}", "stateMachineArn": { "Ref": "AwsApiCallLambdalistTags264c8bde9825e22d43dbb7fcce06eef1WaitForD40BAB46" }, @@ -149,10 +149,10 @@ } }, "flattenResponse": "false", - "salt": "1727486220874" + "salt": "1738599701901" }, "DependsOn": [ - "AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f" + "AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac" ], "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -175,7 +175,7 @@ } }, "DependsOn": [ - "AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f" + "AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac" ] }, "AwsApiCallLambdalistTags264c8bde9825e22d43dbb7fcce06eef1WaitForTimeoutProviderInvokeBA18A45F": { @@ -196,7 +196,7 @@ } }, "DependsOn": [ - "AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f" + "AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac" ] }, "AwsApiCallLambdalistTags264c8bde9825e22d43dbb7fcce06eef1WaitForRole6CB9D867": { @@ -244,7 +244,7 @@ ] }, "DependsOn": [ - "AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f" + "AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac" ] }, "AwsApiCallLambdalistTags264c8bde9825e22d43dbb7fcce06eef1WaitForD40BAB46": { @@ -281,7 +281,7 @@ }, "DependsOn": [ "AwsApiCallLambdalistTags264c8bde9825e22d43dbb7fcce06eef1WaitForRole6CB9D867", - "AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f" + "AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac" ] }, "SingletonFunction76b3e830a873425f8453eddd85c86925Role918961BB": { @@ -341,7 +341,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "da514df694ce3f41453746a766ae6aff13c869c38002598930d6d34e5711985b.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.isComplete", @@ -391,7 +391,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "da514df694ce3f41453746a766ae6aff13c869c38002598930d6d34e5711985b.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.onTimeout", diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/manifest.json b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/manifest.json index 240b64fa10b8f..3a3955e07ac57 100644 --- a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "artifacts": { "aws-cdk-pipes-lambda-target.assets": { "type": "cdk:asset-manifest", @@ -16,10 +16,9 @@ "templateFile": "aws-cdk-pipes-lambda-target.template.json", "terminationProtection": false, "validateOnSynth": false, - "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1b479cf8f164870a3c6d8151950f1bb109b669478bc644a2945ef7d5f786f845.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/20f52f9c06b0b97152b2f191a59dc5d9839f1d208f1b20419caa1616ca1d25cf.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -47,16 +46,16 @@ "data": "TargetLambdaFunctionServiceRole2FBA8508" } ], - "/aws-cdk-pipes-lambda-target/TargetLambdaFunction/ServiceRole/DefaultPolicy/Resource": [ + "/aws-cdk-pipes-lambda-target/TargetLambdaFunction/Resource": [ { "type": "aws:cdk:logicalId", - "data": "TargetLambdaFunctionServiceRoleDefaultPolicy8CA7D5D9" + "data": "TargetLambdaFunctionBCDA1A4E" } ], - "/aws-cdk-pipes-lambda-target/TargetLambdaFunction/Resource": [ + "/aws-cdk-pipes-lambda-target/TargetLambdaFunction/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "TargetLambdaFunctionBCDA1A4E" + "data": "TargetLambdaFunctioninlinePolicyAddedToExecutionRole00E8E6F3A" } ], "/aws-cdk-pipes-lambda-target/Pipe/Role/Resource": [ @@ -100,6 +99,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "TargetLambdaFunctionServiceRoleDefaultPolicy8CA7D5D9": [ + { + "type": "aws:cdk:logicalId", + "data": "TargetLambdaFunctionServiceRoleDefaultPolicy8CA7D5D9", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-cdk-pipes-lambda-target" @@ -119,10 +127,9 @@ "templateFile": "integtestpipetargetlambdaDefaultTestDeployAssert48C58B78.template.json", "terminationProtection": false, "validateOnSynth": false, - "notificationArns": [], "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3c33ac9eae43436e99a637a7e22641670980a9bb5025cd87b162a427eedcee40.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/735d3b6c682df5cb86a384bd215a1a2f55d601bbd6749c22ba14fe40f5a47e12.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -139,10 +146,10 @@ "integtestpipetargetlambdaDefaultTestDeployAssert48C58B78.assets" ], "metadata": { - "/integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f/Default/Default": [ + "/integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac/Default/Default": [ { "type": "aws:cdk:logicalId", - "data": "AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f" + "data": "AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac" } ], "/integtest-pipe-target-lambda/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/tree.json b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/tree.json index e17b6c2c2e2a9..93e4252e96720 100644 --- a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.lambda.js.snapshot/tree.json @@ -27,7 +27,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "TargetLambdaFunction": { @@ -43,7 +44,8 @@ "path": "aws-cdk-pipes-lambda-target/TargetLambdaFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -84,50 +86,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-pipes-lambda-target/TargetLambdaFunction/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-pipes-lambda-target/TargetLambdaFunction/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "lambda:TagResource", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "TargetLambdaFunctionServiceRoleDefaultPolicy8CA7D5D9", - "roles": [ - { - "Ref": "TargetLambdaFunctionServiceRole2FBA8508" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -147,7 +111,8 @@ "path": "aws-cdk-pipes-lambda-target/TargetLambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -166,7 +131,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "6f50ad1670be7195f01a64eddc86541c357b2087e992904bdcb9f5ae67c82ecb.zip" + "s3Key": "17f11fcd08888571765fa70b9736c3bbb0d5098be088eadfa080ecba1f52b09b.zip" }, "functionName": "TestCdkPipesTargetLambdaFunction", "handler": "handler.handler", @@ -184,11 +149,52 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-pipes-lambda-target/TargetLambdaFunction/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-pipes-lambda-target/TargetLambdaFunction/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "lambda:TagResource", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "TargetLambdaFunctioninlinePolicyAddedToExecutionRole00E8E6F3A", + "roles": [ + { + "Ref": "TargetLambdaFunctionServiceRole2FBA8508" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Pipe": { @@ -204,7 +210,8 @@ "path": "aws-cdk-pipes-lambda-target/Pipe/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -305,13 +312,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -354,7 +363,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-pipes-alpha.Pipe", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Exports": { @@ -380,7 +390,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "BootstrapVersion": { @@ -418,27 +428,27 @@ "path": "integtest-pipe-target-lambda/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "DeployAssert": { "id": "DeployAssert", "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert", "children": { - "AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f": { - "id": "AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f", - "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f", + "AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac": { + "id": "AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac", + "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac", "children": { "SdkProvider": { "id": "SdkProvider", - "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f/SdkProvider", + "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f/SdkProvider/AssertionsProvider", + "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, @@ -449,11 +459,11 @@ }, "Default": { "id": "Default", - "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f/Default", + "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac/Default", "children": { "Default": { "id": "Default", - "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallSQSsendMessagef5d083ed8f5fb367012aef7420ae359f/Default/Default", + "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallSQSsendMessage34801ac69dec864e9b81a25c0fd374ac/Default/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", "version": "0.0.0" @@ -462,7 +472,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -502,7 +513,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "LatestNodeRuntimeMap": { @@ -526,7 +537,7 @@ "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallLambdalistTags264c8bde9825e22d43dbb7fcce06eef1/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, @@ -550,7 +561,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "WaitFor": { @@ -566,7 +578,7 @@ "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallLambdalistTags264c8bde9825e22d43dbb7fcce06eef1/WaitFor/IsCompleteProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "Invoke": { @@ -592,7 +604,7 @@ "path": "integtest-pipe-target-lambda/DefaultTest/DeployAssert/AwsApiCallLambdalistTags264c8bde9825e22d43dbb7fcce06eef1/WaitFor/TimeoutProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "Invoke": { @@ -676,7 +688,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "SingletonFunction5c1898e096fb4e3e95d5f6c67f3ce41a": { @@ -710,7 +722,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } }, "BootstrapVersion": { @@ -752,7 +764,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.3.0" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-create.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-create.assets.json index 8fa2b2a25d419..0c84c4930b4e6 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-create.assets.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-create.assets.json @@ -14,20 +14,20 @@ } } }, - "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b": { + "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6": { "source": { - "path": "asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b", + "path": "asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip", + "objectKey": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "f33121e16c6765f23b8ce953ef844b0a09aba07c72461faf4cd18e4b31118b1a": { + "0b42ee382143732ca3a1fb19db41cf9d70235eb9337c0d39920b42860de0df97": { "source": { "path": "aws-cdk-redshift-distkey-create.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f33121e16c6765f23b8ce953ef844b0a09aba07c72461faf4cd18e4b31118b1a.json", + "objectKey": "0b42ee382143732ca3a1fb19db41cf9d70235eb9337c0d39920b42860de0df97.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-create.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-create.template.json index 201019c5b1af2..3e8787c19fbf1 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-create.template.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-create.template.json @@ -604,6 +604,32 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "TableHandlerinlinePolicyAddedToExecutionRole0310C5507": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TableHandlerinlinePolicyAddedToExecutionRole0310C5507", + "Roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "TableProviderframeworkonEvent97F3951A": { "Type": "AWS::Lambda::Function", "Properties": { @@ -611,7 +637,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-distkey-create/Table/Resource/Provider)", "Environment": { @@ -724,14 +750,6 @@ "Properties": { "PolicyDocument": { "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, { "Action": [ "secretsmanager:DescribeSecret", diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-update.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-update.assets.json index 9ecf501ca4165..209dd25011978 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-update.assets.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-update.assets.json @@ -14,20 +14,20 @@ } } }, - "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b": { + "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6": { "source": { - "path": "asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b", + "path": "asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip", + "objectKey": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "b751a18a640bca28722ac0bc27cee4083fe0e274e140a83747fdc9b90149eb80": { + "9b1ba9780b86793b40a5c8c60fe0ce7ae88167e433f01e18bd1b51db12121fd9": { "source": { "path": "aws-cdk-redshift-distkey-update.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b751a18a640bca28722ac0bc27cee4083fe0e274e140a83747fdc9b90149eb80.json", + "objectKey": "9b1ba9780b86793b40a5c8c60fe0ce7ae88167e433f01e18bd1b51db12121fd9.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-update.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-update.template.json index 137c96301cb76..d9b5168385cec 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-update.template.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/aws-cdk-redshift-distkey-update.template.json @@ -604,6 +604,32 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "TableHandlerinlinePolicyAddedToExecutionRole0310C5507": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TableHandlerinlinePolicyAddedToExecutionRole0310C5507", + "Roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "TableProviderframeworkonEvent97F3951A": { "Type": "AWS::Lambda::Function", "Properties": { @@ -611,7 +637,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-distkey-update/Table/Resource/Provider)", "Environment": { @@ -724,14 +750,6 @@ "Properties": { "PolicyDocument": { "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, { "Action": [ "secretsmanager:DescribeSecret", diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/manifest.json index d0e5bf0108fd1..1cde6e93d4350 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f33121e16c6765f23b8ce953ef844b0a09aba07c72461faf4cd18e4b31118b1a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0b42ee382143732ca3a1fb19db41cf9d70235eb9337c0d39920b42860de0df97.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -214,6 +214,12 @@ "data": "ClusterParameterGroup879806FD" } ], + "/aws-cdk-redshift-distkey-create/Table/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TableHandlerinlinePolicyAddedToExecutionRole0310C5507" + } + ], "/aws-cdk-redshift-distkey-create/Table/Resource/Provider/framework-onEvent/Resource": [ { "type": "aws:cdk:logicalId", @@ -273,24 +279,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "TableProviderframeworkonEventServiceRoleC3128F67": [ - { - "type": "aws:cdk:logicalId", - "data": "TableProviderframeworkonEventServiceRoleC3128F67", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "TableProviderframeworkonEventServiceRoleDefaultPolicyAD08715D": [ - { - "type": "aws:cdk:logicalId", - "data": "TableProviderframeworkonEventServiceRoleDefaultPolicyAD08715D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "aws-cdk-redshift-distkey-create" @@ -312,7 +300,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b751a18a640bca28722ac0bc27cee4083fe0e274e140a83747fdc9b90149eb80.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9b1ba9780b86793b40a5c8c60fe0ce7ae88167e433f01e18bd1b51db12121fd9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -509,6 +497,12 @@ "data": "ClusterParameterGroup879806FD" } ], + "/aws-cdk-redshift-distkey-update/Table/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TableHandlerinlinePolicyAddedToExecutionRole0310C5507" + } + ], "/aws-cdk-redshift-distkey-update/Table/Resource/Provider/framework-onEvent/Resource": [ { "type": "aws:cdk:logicalId", @@ -568,24 +562,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "TableProviderframeworkonEventServiceRoleC3128F67": [ - { - "type": "aws:cdk:logicalId", - "data": "TableProviderframeworkonEventServiceRoleC3128F67", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "TableProviderframeworkonEventServiceRoleDefaultPolicyAD08715D": [ - { - "type": "aws:cdk:logicalId", - "data": "TableProviderframeworkonEventServiceRoleDefaultPolicyAD08715D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "aws-cdk-redshift-distkey-update" diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/tree.json index cb6d4bfa637d0..a08221d1fd67d 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-distkey.js.snapshot/tree.json @@ -56,7 +56,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Vpc": { @@ -135,7 +136,8 @@ "path": "aws-cdk-redshift-distkey-create/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -250,7 +252,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PublicSubnet2": { @@ -302,7 +305,8 @@ "path": "aws-cdk-redshift-distkey-create/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -417,7 +421,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -469,7 +474,8 @@ "path": "aws-cdk-redshift-distkey-create/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -536,7 +542,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet2": { @@ -588,7 +595,8 @@ "path": "aws-cdk-redshift-distkey-create/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -655,7 +663,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -699,7 +708,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cluster": { @@ -735,7 +745,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterSubnetGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SecurityGroup": { @@ -769,7 +780,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Secret": { @@ -822,13 +834,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -921,13 +935,15 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterParameterGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Table": { @@ -941,9 +957,55 @@ "Handler": { "id": "Handler", "path": "aws-cdk-redshift-distkey-create/Table/Resource/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-redshift-distkey-create/Table/Resource/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-distkey-create/Table/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "TableHandlerinlinePolicyAddedToExecutionRole0310C5507", + "roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Provider": { @@ -971,7 +1033,8 @@ "path": "aws-cdk-redshift-distkey-create/Table/Resource/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -990,7 +1053,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-distkey-create/Table/Resource/Provider)", "environment": { @@ -1030,7 +1093,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1054,7 +1118,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1090,7 +1155,8 @@ "path": "aws-cdk-redshift-distkey-create/Query Redshift Database3de5bea727da479686625efb56431b5f/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1144,14 +1210,6 @@ "aws:cdk:cloudformation:props": { "policyDocument": { "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, { "Action": [ "secretsmanager:DescribeSecret", @@ -1181,13 +1239,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1207,7 +1267,8 @@ "path": "aws-cdk-redshift-distkey-create/Query Redshift Database3de5bea727da479686625efb56431b5f/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1255,7 +1316,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Query Redshift Database3de5bea727da479686625efb56431b5fInvokerRole": { @@ -1267,7 +1329,8 @@ "path": "aws-cdk-redshift-distkey-create/Query Redshift Database3de5bea727da479686625efb56431b5fInvokerRole/ImportQuery Redshift Database3de5bea727da479686625efb56431b5fInvokerRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1366,13 +1429,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "BootstrapVersion": { @@ -1449,7 +1514,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Vpc": { @@ -1528,7 +1594,8 @@ "path": "aws-cdk-redshift-distkey-update/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -1643,7 +1710,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PublicSubnet2": { @@ -1695,7 +1763,8 @@ "path": "aws-cdk-redshift-distkey-update/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -1810,7 +1879,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -1862,7 +1932,8 @@ "path": "aws-cdk-redshift-distkey-update/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -1929,7 +2000,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet2": { @@ -1981,7 +2053,8 @@ "path": "aws-cdk-redshift-distkey-update/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -2048,7 +2121,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -2092,7 +2166,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cluster": { @@ -2128,7 +2203,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterSubnetGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SecurityGroup": { @@ -2162,7 +2238,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Secret": { @@ -2215,13 +2292,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2314,13 +2393,15 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterParameterGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Table": { @@ -2334,9 +2415,55 @@ "Handler": { "id": "Handler", "path": "aws-cdk-redshift-distkey-update/Table/Resource/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-redshift-distkey-update/Table/Resource/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-distkey-update/Table/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "TableHandlerinlinePolicyAddedToExecutionRole0310C5507", + "roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Provider": { @@ -2364,7 +2491,8 @@ "path": "aws-cdk-redshift-distkey-update/Table/Resource/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -2383,7 +2511,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-distkey-update/Table/Resource/Provider)", "environment": { @@ -2423,7 +2551,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -2447,7 +2576,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -2483,7 +2613,8 @@ "path": "aws-cdk-redshift-distkey-update/Query Redshift Database3de5bea727da479686625efb56431b5f/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2537,14 +2668,6 @@ "aws:cdk:cloudformation:props": { "policyDocument": { "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, { "Action": [ "secretsmanager:DescribeSecret", @@ -2574,13 +2697,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -2600,7 +2725,8 @@ "path": "aws-cdk-redshift-distkey-update/Query Redshift Database3de5bea727da479686625efb56431b5f/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -2648,7 +2774,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Query Redshift Database3de5bea727da479686625efb56431b5fInvokerRole": { @@ -2660,7 +2787,8 @@ "path": "aws-cdk-redshift-distkey-update/Query Redshift Database3de5bea727da479686625efb56431b5fInvokerRole/ImportQuery Redshift Database3de5bea727da479686625efb56431b5fInvokerRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2759,13 +2887,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "BootstrapVersion": { diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/manifest.json index c7a22a24d6673..7aba0bb0ccb2e 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/26ccc44d51bcdad9595005c4251a2e7f2c4140c8f0c8fc495570c6fdebc2810f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/863dabb5ee23ea7dd2e5dedc658c8594f27344dac78936c3e1e95761c1d2285f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -214,6 +214,12 @@ "data": "UserSecretAttachment02022609" } ], + "/redshift-exclude-characters-integ/User/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "UserHandlerinlinePolicyAddedToExecutionRole0A8003C00" + } + ], "/redshift-exclude-characters-integ/User/Resource/Provider/framework-onEvent/Resource": [ { "type": "aws:cdk:logicalId", @@ -273,24 +279,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "UserProviderframeworkonEventServiceRole8FBA2FBD": [ - { - "type": "aws:cdk:logicalId", - "data": "UserProviderframeworkonEventServiceRole8FBA2FBD", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "UserProviderframeworkonEventServiceRoleDefaultPolicy9A9E044F": [ - { - "type": "aws:cdk:logicalId", - "data": "UserProviderframeworkonEventServiceRoleDefaultPolicy9A9E044F", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "redshift-exclude-characters-integ" diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/redshift-exclude-characters-integ.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/redshift-exclude-characters-integ.assets.json index 72350e389ffb3..2a397d7936446 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/redshift-exclude-characters-integ.assets.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/redshift-exclude-characters-integ.assets.json @@ -14,20 +14,20 @@ } } }, - "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b": { + "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6": { "source": { - "path": "asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b", + "path": "asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip", + "objectKey": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "26ccc44d51bcdad9595005c4251a2e7f2c4140c8f0c8fc495570c6fdebc2810f": { + "863dabb5ee23ea7dd2e5dedc658c8594f27344dac78936c3e1e95761c1d2285f": { "source": { "path": "redshift-exclude-characters-integ.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "26ccc44d51bcdad9595005c4251a2e7f2c4140c8f0c8fc495570c6fdebc2810f.json", + "objectKey": "863dabb5ee23ea7dd2e5dedc658c8594f27344dac78936c3e1e95761c1d2285f.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/redshift-exclude-characters-integ.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/redshift-exclude-characters-integ.template.json index 78706f06ecf9c..dcc23c42e6d68 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/redshift-exclude-characters-integ.template.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/redshift-exclude-characters-integ.template.json @@ -523,6 +523,30 @@ "TargetType": "AWS::Redshift::Cluster" } }, + "UserHandlerinlinePolicyAddedToExecutionRole0A8003C00": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "UserHandlerinlinePolicyAddedToExecutionRole0A8003C00", + "Roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + } + }, "UserProviderframeworkonEvent4EC32885": { "Type": "AWS::Lambda::Function", "Properties": { @@ -530,7 +554,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (redshift-exclude-characters-integ/User/Resource/Provider)", "Environment": { @@ -627,14 +651,6 @@ "Properties": { "PolicyDocument": { "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, { "Action": [ "secretsmanager:DescribeSecret", diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/tree.json index bd55538ed3ead..fc931a5bd3a78 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-exclude-characters.js.snapshot/tree.json @@ -84,7 +84,8 @@ "path": "redshift-exclude-characters-integ/VPC/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -199,7 +200,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PublicSubnet2": { @@ -251,7 +253,8 @@ "path": "redshift-exclude-characters-integ/VPC/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -366,7 +369,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -418,7 +422,8 @@ "path": "redshift-exclude-characters-integ/VPC/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -485,7 +490,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet2": { @@ -537,7 +543,8 @@ "path": "redshift-exclude-characters-integ/VPC/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -604,7 +611,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -648,7 +656,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SubnetGroup": { @@ -680,7 +689,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterSubnetGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cluster": { @@ -718,7 +728,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Secret": { @@ -771,13 +782,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -839,7 +852,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "User": { @@ -896,13 +910,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -912,9 +928,55 @@ "Handler": { "id": "Handler", "path": "redshift-exclude-characters-integ/User/Resource/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "redshift-exclude-characters-integ/User/Resource/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "redshift-exclude-characters-integ/User/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "UserHandlerinlinePolicyAddedToExecutionRole0A8003C00", + "roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Provider": { @@ -942,7 +1004,8 @@ "path": "redshift-exclude-characters-integ/User/Resource/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -961,7 +1024,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (redshift-exclude-characters-integ/User/Resource/Provider)", "environment": { @@ -1001,7 +1064,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1025,7 +1089,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1061,7 +1126,8 @@ "path": "redshift-exclude-characters-integ/Query Redshift Database3de5bea727da479686625efb56431b5f/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1115,14 +1181,6 @@ "aws:cdk:cloudformation:props": { "policyDocument": { "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, { "Action": [ "secretsmanager:DescribeSecret", @@ -1157,13 +1215,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1183,7 +1243,8 @@ "path": "redshift-exclude-characters-integ/Query Redshift Database3de5bea727da479686625efb56431b5f/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1231,7 +1292,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Query Redshift Database3de5bea727da479686625efb56431b5fInvokerRole": { @@ -1243,7 +1305,8 @@ "path": "redshift-exclude-characters-integ/Query Redshift Database3de5bea727da479686625efb56431b5fInvokerRole/ImportQuery Redshift Database3de5bea727da479686625efb56431b5fInvokerRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1342,13 +1405,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "BootstrapVersion": { diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/manifest.json index 90db0c77de239..c752b2bb5b925 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/732e8a5a9cd324cd07d828909e63f7f84a234de4ef7a78d8c985f15773a68a38.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5cb6c3d85ed8928a4145baff9ff323871b19a68330b7e0d392b6092ff92bf6f8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -202,6 +202,12 @@ "data": "ClusterEB0386A7" } ], + "/single-provider-role-integ/Table0/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Table0HandlerinlinePolicyAddedToExecutionRole08FC8B442" + } + ], "/single-provider-role-integ/Table0/Resource/Provider/framework-onEvent/Resource": [ { "type": "aws:cdk:logicalId", @@ -250,6 +256,12 @@ "data": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fInvokerRoleDefaultPolicy2BD7CC05" } ], + "/single-provider-role-integ/Table1/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Table1HandlerinlinePolicyAddedToExecutionRole0197820AE" + } + ], "/single-provider-role-integ/Table1/Resource/Provider/framework-onEvent/Resource": [ { "type": "aws:cdk:logicalId", @@ -262,6 +274,12 @@ "data": "Table1737A9D79" } ], + "/single-provider-role-integ/Table2/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Table2HandlerinlinePolicyAddedToExecutionRole0B2E1D0D0" + } + ], "/single-provider-role-integ/Table2/Resource/Provider/framework-onEvent/Resource": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/single-provider-role-integ.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/single-provider-role-integ.assets.json index 483b4678d34c1..160e2f64e81e7 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/single-provider-role-integ.assets.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/single-provider-role-integ.assets.json @@ -14,20 +14,20 @@ } } }, - "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b": { + "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6": { "source": { - "path": "asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b", + "path": "asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip", + "objectKey": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "732e8a5a9cd324cd07d828909e63f7f84a234de4ef7a78d8c985f15773a68a38": { + "5cb6c3d85ed8928a4145baff9ff323871b19a68330b7e0d392b6092ff92bf6f8": { "source": { "path": "single-provider-role-integ.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "732e8a5a9cd324cd07d828909e63f7f84a234de4ef7a78d8c985f15773a68a38.json", + "objectKey": "5cb6c3d85ed8928a4145baff9ff323871b19a68330b7e0d392b6092ff92bf6f8.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/single-provider-role-integ.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/single-provider-role-integ.template.json index c8a5701114749..1a1023ce2dfaf 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/single-provider-role-integ.template.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/single-provider-role-integ.template.json @@ -548,6 +548,32 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "Table0HandlerinlinePolicyAddedToExecutionRole08FC8B442": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Table0HandlerinlinePolicyAddedToExecutionRole08FC8B442", + "Roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "Table0ProviderframeworkonEvent51303D7B": { "Type": "AWS::Lambda::Function", "Properties": { @@ -555,7 +581,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (single-provider-role-integ/Table0/Resource/Provider)", "Environment": { @@ -684,14 +710,6 @@ "Properties": { "PolicyDocument": { "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, { "Action": [ "secretsmanager:DescribeSecret", @@ -826,6 +844,32 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "Table1HandlerinlinePolicyAddedToExecutionRole0197820AE": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Table1HandlerinlinePolicyAddedToExecutionRole0197820AE", + "Roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "Table1ProviderframeworkonEvent98C8C64A": { "Type": "AWS::Lambda::Function", "Properties": { @@ -833,7 +877,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (single-provider-role-integ/Table1/Resource/Provider)", "Environment": { @@ -924,6 +968,32 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "Table2HandlerinlinePolicyAddedToExecutionRole0B2E1D0D0": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "Table2HandlerinlinePolicyAddedToExecutionRole0B2E1D0D0", + "Roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "Table2ProviderframeworkonEvent3247C6D6": { "Type": "AWS::Lambda::Function", "Properties": { @@ -931,7 +1001,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (single-provider-role-integ/Table2/Resource/Provider)", "Environment": { diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/tree.json index c595b5615028d..71b9eb5b5cf16 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-iamrole.js.snapshot/tree.json @@ -84,7 +84,8 @@ "path": "single-provider-role-integ/VPC/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -199,7 +200,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PublicSubnet2": { @@ -251,7 +253,8 @@ "path": "single-provider-role-integ/VPC/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -366,7 +369,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -418,7 +422,8 @@ "path": "single-provider-role-integ/VPC/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -485,7 +490,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet2": { @@ -537,7 +543,8 @@ "path": "single-provider-role-integ/VPC/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -604,7 +611,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -648,7 +656,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cluster": { @@ -684,7 +693,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterSubnetGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SecurityGroup": { @@ -718,7 +728,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Secret": { @@ -771,13 +782,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -839,7 +852,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Table0": { @@ -853,9 +867,55 @@ "Handler": { "id": "Handler", "path": "single-provider-role-integ/Table0/Resource/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "single-provider-role-integ/Table0/Resource/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "single-provider-role-integ/Table0/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "Table0HandlerinlinePolicyAddedToExecutionRole08FC8B442", + "roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Provider": { @@ -883,7 +943,8 @@ "path": "single-provider-role-integ/Table0/Resource/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -902,7 +963,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (single-provider-role-integ/Table0/Resource/Provider)", "environment": { @@ -942,7 +1003,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -966,7 +1028,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1002,7 +1065,8 @@ "path": "single-provider-role-integ/Query Redshift Database3de5bea727da479686625efb56431b5f/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1056,14 +1120,6 @@ "aws:cdk:cloudformation:props": { "policyDocument": { "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, { "Action": [ "secretsmanager:DescribeSecret", @@ -1093,13 +1149,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1119,7 +1177,8 @@ "path": "single-provider-role-integ/Query Redshift Database3de5bea727da479686625efb56431b5f/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1167,7 +1226,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Query Redshift Database3de5bea727da479686625efb56431b5fInvokerRole": { @@ -1179,7 +1239,8 @@ "path": "single-provider-role-integ/Query Redshift Database3de5bea727da479686625efb56431b5fInvokerRole/ImportQuery Redshift Database3de5bea727da479686625efb56431b5fInvokerRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1278,13 +1339,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Table1": { @@ -1298,9 +1361,55 @@ "Handler": { "id": "Handler", "path": "single-provider-role-integ/Table1/Resource/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "single-provider-role-integ/Table1/Resource/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "single-provider-role-integ/Table1/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "Table1HandlerinlinePolicyAddedToExecutionRole0197820AE", + "roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Provider": { @@ -1328,7 +1437,8 @@ "path": "single-provider-role-integ/Table1/Resource/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1347,7 +1457,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (single-provider-role-integ/Table1/Resource/Provider)", "environment": { @@ -1387,7 +1497,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1411,7 +1522,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1437,9 +1549,55 @@ "Handler": { "id": "Handler", "path": "single-provider-role-integ/Table2/Resource/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "single-provider-role-integ/Table2/Resource/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "single-provider-role-integ/Table2/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "Table2HandlerinlinePolicyAddedToExecutionRole0B2E1D0D0", + "roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Provider": { @@ -1467,7 +1625,8 @@ "path": "single-provider-role-integ/Table2/Resource/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1486,7 +1645,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (single-provider-role-integ/Table2/Resource/Provider)", "environment": { @@ -1526,7 +1685,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1550,7 +1710,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1667,7 +1828,8 @@ "path": "redshift-iamrole-integ/VPC/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -1782,7 +1944,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PublicSubnet2": { @@ -1834,7 +1997,8 @@ "path": "redshift-iamrole-integ/VPC/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -1949,7 +2113,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -2001,7 +2166,8 @@ "path": "redshift-iamrole-integ/VPC/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -2068,7 +2234,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet2": { @@ -2120,7 +2287,8 @@ "path": "redshift-iamrole-integ/VPC/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -2187,7 +2355,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -2231,7 +2400,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RoleA": { @@ -2243,7 +2413,8 @@ "path": "redshift-iamrole-integ/RoleA/ImportRoleA", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2274,7 +2445,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RoleB": { @@ -2286,7 +2458,8 @@ "path": "redshift-iamrole-integ/RoleB/ImportRoleB", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2317,7 +2490,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cluster": { @@ -2353,7 +2527,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterSubnetGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SecurityGroup": { @@ -2387,7 +2562,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Secret": { @@ -2440,13 +2616,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -2522,7 +2700,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "BootstrapVersion": { diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.assets.json index 7d5fe7b0f0233..5d4aee33c456a 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.assets.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.assets.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { "ee4fd508abceff33b2eb40d478daa3c4050865ba44eadbb24ac42fb53689da48": { "source": { @@ -14,20 +14,20 @@ } } }, - "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5": { + "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6": { "source": { - "path": "asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5", + "path": "asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip", + "objectKey": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "dcdf0fe5748beacdae339bf5edafaa93e603284a0ccf929ec5e9336b0930270e": { + "c157e40d12d4fe6b551943f20034cfa7a36e0ab3fa13f3539b9ecf21d5aa6dc3": { "source": { "path": "aws-cdk-redshift-cluster-create.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dcdf0fe5748beacdae339bf5edafaa93e603284a0ccf929ec5e9336b0930270e.json", + "objectKey": "c157e40d12d4fe6b551943f20034cfa7a36e0ab3fa13f3539b9ecf21d5aa6dc3.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.template.json index 79312c773d69a..eeeeb3e7bb96c 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.template.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-create.template.json @@ -272,6 +272,74 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole0D490C9BC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "redshift:DescribeClusters", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole0D490C9BC", + "Roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole1F50EA7FB": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "redshift:RebootCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":redshift:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole1F50EA7FB", + "Roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE": { "Type": "AWS::IAM::Role", "Properties": { @@ -356,7 +424,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-create/Cluster/ResourceProvider)", "Environment": { @@ -447,56 +515,6 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, - "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "redshift:DescribeClusters", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "redshift:RebootCluster", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":redshift:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster:", - { - "Ref": "ClusterEB0386A7" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", - "Roles": [ - { - "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5": { "Type": "AWS::Lambda::Function", "Properties": { @@ -525,7 +543,6 @@ "Timeout": 900 }, "DependsOn": [ - "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" ], "UpdateReplacePolicy": "Delete", diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.assets.json index 550dbde175a3c..24c23edd0ca25 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.assets.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.assets.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { "ee4fd508abceff33b2eb40d478daa3c4050865ba44eadbb24ac42fb53689da48": { "source": { @@ -14,20 +14,20 @@ } } }, - "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5": { + "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6": { "source": { - "path": "asset.fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5", + "path": "asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip", + "objectKey": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "c634d0ec1bb2347a529742919b9fe0d6d60f889a550608b466afa92aa7825a01": { + "4aa5ddeacf6fe4556c359fe351d72f5fe6b3c1343c219bdde43a038fa6fdceb6": { "source": { "path": "aws-cdk-redshift-cluster-update.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c634d0ec1bb2347a529742919b9fe0d6d60f889a550608b466afa92aa7825a01.json", + "objectKey": "4aa5ddeacf6fe4556c359fe351d72f5fe6b3c1343c219bdde43a038fa6fdceb6.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.template.json index 219cdbe784e95..64278a5052c0d 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.template.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/aws-cdk-redshift-cluster-update.template.json @@ -276,6 +276,74 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole0D490C9BC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "redshift:DescribeClusters", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole0D490C9BC", + "Roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole1F50EA7FB": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "redshift:RebootCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":redshift:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole1F50EA7FB", + "Roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "ClusterResourceProviderframeworkonEventServiceRoleD686A5EE": { "Type": "AWS::IAM::Role", "Properties": { @@ -360,7 +428,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-update/Cluster/ResourceProvider)", "Environment": { @@ -451,56 +519,6 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, - "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "redshift:DescribeClusters", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "redshift:RebootCluster", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":redshift:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster:", - { - "Ref": "ClusterEB0386A7" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", - "Roles": [ - { - "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" - } - ] - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, "SingletonLambda511e207f13df4b8bb632c32b30b65ac281740AC5": { "Type": "AWS::Lambda::Function", "Properties": { @@ -529,7 +547,6 @@ "Timeout": 900 }, "DependsOn": [ - "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" ], "UpdateReplacePolicy": "Delete", diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets.json index aa9703e0ecbca..44b8daffeb377 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.assets.json @@ -1,20 +1,20 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { - "bfcf4228d6660f50e81f19efdb64c6388dda6796296eb239decdff1dbc2f4981": { + "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd": { "source": { - "path": "asset.bfcf4228d6660f50e81f19efdb64c6388dda6796296eb239decdff1dbc2f4981.bundle", + "path": "asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bfcf4228d6660f50e81f19efdb64c6388dda6796296eb239decdff1dbc2f4981.zip", + "objectKey": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "cd1b19761b5d23388630ad502f8089462b7246b617fa0a78b216aa0be96e0215": { + "884315ea7050cb91205e1f7a52d7dd55e5d8ba654cd8f39cb070ad920f0492b0": { "source": { "path": "awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "cd1b19761b5d23388630ad502f8089462b7246b617fa0a78b216aa0be96e0215.json", + "objectKey": "884315ea7050cb91205e1f7a52d7dd55e5d8ba654cd8f39cb070ad920f0492b0.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.template.json index 8f50a5469140a..e3ab59fa1fd46 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.template.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/awscdkredshiftreboottestDefaultTestDeployAssert1AE11B34.template.json @@ -32,7 +32,7 @@ "Clusters.0.ClusterParameterGroups.0.ParameterGroupName", "Clusters.0.ClusterParameterGroups.0.ParameterApplyStatus" ], - "salt": "1734056833049" + "salt": "1738586977420" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -112,7 +112,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "bfcf4228d6660f50e81f19efdb64c6388dda6796296eb239decdff1dbc2f4981.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -152,7 +152,7 @@ "Source": "\"user\"" }, "flattenResponse": "false", - "salt": "1734056833050" + "salt": "1738586977421" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -185,7 +185,7 @@ "Source": "\"engine-default\"" }, "flattenResponse": "false", - "salt": "1734056833051" + "salt": "1738586977421" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/cdk.out b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/cdk.out index c6e612584e352..91e1a8b9901d5 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"38.0.1"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/integ.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/integ.json index 5a795a7ef22dd..975e82c74fc13 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "testCases": { "aws-cdk-redshift-reboot-test/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/manifest.json index f2a54e09c62dd..c27be1d2d4a73 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "artifacts": { "aws-cdk-redshift-cluster-create.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dcdf0fe5748beacdae339bf5edafaa93e603284a0ccf929ec5e9336b0930270e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c157e40d12d4fe6b551943f20034cfa7a36e0ab3fa13f3539b9ecf21d5aa6dc3.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -113,6 +113,18 @@ "data": "ClusterEB0386A7" } ], + "/aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterFunction/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole0D490C9BC" + } + ], + "/aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterFunction/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole1F50EA7FB" + } + ], "/aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", @@ -149,12 +161,6 @@ "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" } ], - "/aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF" - } - ], "/aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Resource": [ { "type": "aws:cdk:logicalId", @@ -193,7 +199,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c634d0ec1bb2347a529742919b9fe0d6d60f889a550608b466afa92aa7825a01.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4aa5ddeacf6fe4556c359fe351d72f5fe6b3c1343c219bdde43a038fa6fdceb6.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -289,6 +295,18 @@ "data": "ClusterEB0386A7" } ], + "/aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterFunction/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole0D490C9BC" + } + ], + "/aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterFunction/inlinePolicyAddedToExecutionRole-1/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole1F50EA7FB" + } + ], "/aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole/Resource": [ { "type": "aws:cdk:logicalId", @@ -325,12 +343,6 @@ "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" } ], - "/aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF" - } - ], "/aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Resource": [ { "type": "aws:cdk:logicalId", @@ -381,7 +393,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cd1b19761b5d23388630ad502f8089462b7246b617fa0a78b216aa0be96e0215.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/884315ea7050cb91205e1f7a52d7dd55e5d8ba654cd8f39cb070ad920f0492b0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/tree.json index 5f65f6476a8d1..7e3055dc22d7d 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.cluster-reboot.js.snapshot/tree.json @@ -84,7 +84,8 @@ "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -131,7 +132,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "foobarSubnet2": { @@ -183,7 +185,8 @@ "path": "aws-cdk-redshift-cluster-create/Vpc/foobarSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -230,13 +233,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ParameterGroup": { @@ -267,7 +272,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterParameterGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cluster": { @@ -303,7 +309,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterSubnetGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SecurityGroup": { @@ -337,7 +344,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Secret": { @@ -390,13 +398,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -461,9 +471,114 @@ "RedshiftClusterRebooterFunction": { "id": "RedshiftClusterRebooterFunction", "path": "aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterFunction", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterFunction/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterFunction/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "redshift:DescribeClusters", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole0D490C9BC", + "roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterFunction/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-create/Cluster/RedshiftClusterRebooterFunction/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "redshift:RebootCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":redshift:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole1F50EA7FB", + "roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ResourceProvider": { @@ -483,7 +598,8 @@ "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -582,13 +698,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -608,7 +726,8 @@ "path": "aws-cdk-redshift-cluster-create/Cluster/ResourceProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -627,7 +746,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-create/Cluster/ResourceProvider)", "environment": { @@ -667,7 +786,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -691,13 +811,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LatestNodeRuntimeMap": { @@ -721,7 +843,8 @@ "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -762,77 +885,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "redshift:DescribeClusters", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "redshift:RebootCluster", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":redshift:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster:", - { - "Ref": "ClusterEB0386A7" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", - "roles": [ - { - "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -852,7 +910,8 @@ "path": "aws-cdk-redshift-cluster-create/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -900,7 +959,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "BootstrapVersion": { @@ -1005,7 +1065,8 @@ "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -1052,7 +1113,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "foobarSubnet2": { @@ -1104,7 +1166,8 @@ "path": "aws-cdk-redshift-cluster-update/Vpc/foobarSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -1151,13 +1214,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ParameterGroup": { @@ -1192,7 +1257,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterParameterGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cluster": { @@ -1228,7 +1294,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterSubnetGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SecurityGroup": { @@ -1262,7 +1329,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Secret": { @@ -1315,13 +1383,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1386,9 +1456,114 @@ "RedshiftClusterRebooterFunction": { "id": "RedshiftClusterRebooterFunction", "path": "aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterFunction", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterFunction/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterFunction/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "redshift:DescribeClusters", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole0D490C9BC", + "roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + }, + "inlinePolicyAddedToExecutionRole-1": { + "id": "inlinePolicyAddedToExecutionRole-1", + "path": "aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterFunction/inlinePolicyAddedToExecutionRole-1", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-update/Cluster/RedshiftClusterRebooterFunction/inlinePolicyAddedToExecutionRole-1/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "redshift:RebootCluster", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":redshift:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":cluster:", + { + "Ref": "ClusterEB0386A7" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "policyName": "ClusterRedshiftClusterRebooterFunctioninlinePolicyAddedToExecutionRole1F50EA7FB", + "roles": [ + { + "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ResourceProvider": { @@ -1408,7 +1583,8 @@ "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1507,13 +1683,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1533,7 +1711,8 @@ "path": "aws-cdk-redshift-cluster-update/Cluster/ResourceProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1552,7 +1731,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-update/Cluster/ResourceProvider)", "environment": { @@ -1592,7 +1771,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1616,13 +1796,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "LatestNodeRuntimeMap": { @@ -1646,7 +1828,8 @@ "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1687,77 +1870,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "redshift:DescribeClusters", - "Effect": "Allow", - "Resource": "*" - }, - { - "Action": "redshift:RebootCluster", - "Effect": "Allow", - "Resource": { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":redshift:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":cluster:", - { - "Ref": "ClusterEB0386A7" - } - ] - ] - } - } - ], - "Version": "2012-10-17" - }, - "policyName": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRoleDefaultPolicyF49983EF", - "roles": [ - { - "Ref": "SingletonLambda511e207f13df4b8bb632c32b30b65ac2ServiceRole4BDC9525" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1777,7 +1895,8 @@ "path": "aws-cdk-redshift-cluster-update/SingletonLambda511e207f13df4b8bb632c32b30b65ac2/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1825,7 +1944,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Exports": { @@ -1933,7 +2053,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "AssertionResults": { @@ -2029,7 +2150,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "AssertionResults": { @@ -2083,7 +2205,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "AssertionResults": { diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/aws-cdk-redshift-cluster-database.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/aws-cdk-redshift-cluster-database.assets.json index dc42a42418356..f75bfd5851142 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/aws-cdk-redshift-cluster-database.assets.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/aws-cdk-redshift-cluster-database.assets.json @@ -14,20 +14,20 @@ } } }, - "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b": { + "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6": { "source": { - "path": "asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b", + "path": "asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip", + "objectKey": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "a575ea61c179948a9f63cf973e3137df56bed07c00581d529e720e7fd03e3ece": { + "e2ab8a15db923de0f617239442332cfd117574cb88639af8976a84e2244546bf": { "source": { "path": "aws-cdk-redshift-cluster-database.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a575ea61c179948a9f63cf973e3137df56bed07c00581d529e720e7fd03e3ece.json", + "objectKey": "e2ab8a15db923de0f617239442332cfd117574cb88639af8976a84e2244546bf.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/aws-cdk-redshift-cluster-database.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/aws-cdk-redshift-cluster-database.template.json index 35d830df45ce1..eda8dc8c8092a 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/aws-cdk-redshift-cluster-database.template.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/aws-cdk-redshift-cluster-database.template.json @@ -586,6 +586,32 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "TableHandlerinlinePolicyAddedToExecutionRole0310C5507": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TableHandlerinlinePolicyAddedToExecutionRole0310C5507", + "Roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "TableProviderframeworkonEvent97F3951A": { "Type": "AWS::Lambda::Function", "Properties": { @@ -593,7 +619,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/Table/Resource/Provider)", "Environment": { @@ -713,14 +739,6 @@ "Properties": { "PolicyDocument": { "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, { "Action": [ "secretsmanager:DescribeSecret", diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/manifest.json index 5ee471812c2c2..95a85ad0afa06 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a575ea61c179948a9f63cf973e3137df56bed07c00581d529e720e7fd03e3ece.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e2ab8a15db923de0f617239442332cfd117574cb88639af8976a84e2244546bf.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -208,6 +208,12 @@ "data": "ClusterEB0386A7" } ], + "/aws-cdk-redshift-cluster-database/Table/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TableHandlerinlinePolicyAddedToExecutionRole0310C5507" + } + ], "/aws-cdk-redshift-cluster-database/Table/Resource/Provider/framework-onEvent/Resource": [ { "type": "aws:cdk:logicalId", @@ -267,24 +273,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "TableProviderframeworkonEventServiceRoleC3128F67": [ - { - "type": "aws:cdk:logicalId", - "data": "TableProviderframeworkonEventServiceRoleC3128F67", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "TableProviderframeworkonEventServiceRoleDefaultPolicyAD08715D": [ - { - "type": "aws:cdk:logicalId", - "data": "TableProviderframeworkonEventServiceRoleDefaultPolicyAD08715D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "aws-cdk-redshift-cluster-database" diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/tree.json index b854f4653a37d..60709bc556352 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database-columnid.js.snapshot/tree.json @@ -56,7 +56,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Vpc": { @@ -135,7 +136,8 @@ "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -250,7 +252,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PublicSubnet2": { @@ -302,7 +305,8 @@ "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -417,7 +421,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -469,7 +474,8 @@ "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -536,7 +542,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet2": { @@ -588,7 +595,8 @@ "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -655,7 +663,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -699,7 +708,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cluster": { @@ -735,7 +745,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterSubnetGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SecurityGroup": { @@ -769,7 +780,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Secret": { @@ -822,13 +834,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -893,7 +907,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Table": { @@ -907,9 +922,55 @@ "Handler": { "id": "Handler", "path": "aws-cdk-redshift-cluster-database/Table/Resource/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-redshift-cluster-database/Table/Resource/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-database/Table/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "TableHandlerinlinePolicyAddedToExecutionRole0310C5507", + "roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Provider": { @@ -937,7 +998,8 @@ "path": "aws-cdk-redshift-cluster-database/Table/Resource/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -956,7 +1018,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/Table/Resource/Provider)", "environment": { @@ -996,7 +1058,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1020,7 +1083,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1056,7 +1120,8 @@ "path": "aws-cdk-redshift-cluster-database/Query Redshift Database3de5bea727da479686625efb56431b5f/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1110,14 +1175,6 @@ "aws:cdk:cloudformation:props": { "policyDocument": { "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, { "Action": [ "secretsmanager:DescribeSecret", @@ -1147,13 +1204,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1173,7 +1232,8 @@ "path": "aws-cdk-redshift-cluster-database/Query Redshift Database3de5bea727da479686625efb56431b5f/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1221,7 +1281,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Query Redshift Database3de5bea727da479686625efb56431b5fInvokerRole": { @@ -1233,7 +1294,8 @@ "path": "aws-cdk-redshift-cluster-database/Query Redshift Database3de5bea727da479686625efb56431b5fInvokerRole/ImportQuery Redshift Database3de5bea727da479686625efb56431b5fInvokerRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1332,13 +1394,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "BootstrapVersion": { diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.assets.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.assets.json index b9d52a89c2da3..8ab63e4b72fa6 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.assets.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.assets.json @@ -14,20 +14,20 @@ } } }, - "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b": { + "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6": { "source": { - "path": "asset.9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b", + "path": "asset.39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip", + "objectKey": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "afddb67a4bbcb261499731bf3a4fb9c338c447a8e65be878dc15a9a9a37e4a6d": { + "86f4007f131bfd5a5801333881aad4ab5949327690fa949dcaeb47697bf52bcc": { "source": { "path": "aws-cdk-redshift-cluster-database.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "afddb67a4bbcb261499731bf3a4fb9c338c447a8e65be878dc15a9a9a37e4a6d.json", + "objectKey": "86f4007f131bfd5a5801333881aad4ab5949327690fa949dcaeb47697bf52bcc.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.template.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.template.json index 2b8e7a7204ad2..7121069041f71 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.template.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/aws-cdk-redshift-cluster-database.template.json @@ -631,6 +631,32 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "UserHandlerinlinePolicyAddedToExecutionRole0A8003C00": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "UserHandlerinlinePolicyAddedToExecutionRole0A8003C00", + "Roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "UserProviderframeworkonEvent4EC32885": { "Type": "AWS::Lambda::Function", "Properties": { @@ -638,7 +664,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/User/Resource/Provider)", "Environment": { @@ -701,6 +727,37 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "UserTablePrivilegesHandlerinlinePolicyAddedToExecutionRole06F27DECE": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "UserTablePrivilegesHandlerinlinePolicyAddedToExecutionRole06F27DECE", + "Roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + }, + "DependsOn": [ + "TableHandlerinlinePolicyAddedToExecutionRole0310C5507", + "TableProviderframeworkonEvent97F3951A", + "Table7ABB320E" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "UserTablePrivilegesProviderframeworkonEvent3F5C1851": { "Type": "AWS::Lambda::Function", "Properties": { @@ -708,7 +765,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/User/TablePrivileges/Resource/Provider)", "Environment": { @@ -742,6 +799,7 @@ "DependsOn": [ "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fInvokerRoleDefaultPolicy2BD7CC05", "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fInvokerRole900F47C9", + "TableHandlerinlinePolicyAddedToExecutionRole0310C5507", "TableProviderframeworkonEvent97F3951A", "Table7ABB320E" ], @@ -795,6 +853,7 @@ ] }, "DependsOn": [ + "TableHandlerinlinePolicyAddedToExecutionRole0310C5507", "TableProviderframeworkonEvent97F3951A", "Table7ABB320E" ], @@ -839,14 +898,6 @@ "Properties": { "PolicyDocument": { "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, { "Action": [ "secretsmanager:DescribeSecret", @@ -986,6 +1037,32 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "TableHandlerinlinePolicyAddedToExecutionRole0310C5507": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TableHandlerinlinePolicyAddedToExecutionRole0310C5507", + "Roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "TableProviderframeworkonEvent97F3951A": { "Type": "AWS::Lambda::Function", "Properties": { @@ -993,7 +1070,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/Table/Resource/Provider)", "Environment": { @@ -1084,6 +1161,32 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "TableWithAutoGeneratedNameHandlerinlinePolicyAddedToExecutionRole07C3A499A": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TableWithAutoGeneratedNameHandlerinlinePolicyAddedToExecutionRole07C3A499A", + "Roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "TableWithAutoGeneratedNameProviderframeworkonEventF802C14E": { "Type": "AWS::Lambda::Function", "Properties": { @@ -1091,7 +1194,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "Description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/TableWithAutoGeneratedName/Resource/Provider)", "Environment": { diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/manifest.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/manifest.json index f873ec434a2c1..5898bb582ceee 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/afddb67a4bbcb261499731bf3a4fb9c338c447a8e65be878dc15a9a9a37e4a6d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/86f4007f131bfd5a5801333881aad4ab5949327690fa949dcaeb47697bf52bcc.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -226,6 +226,12 @@ "data": "UserSecretAttachment02022609" } ], + "/aws-cdk-redshift-cluster-database/User/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "UserHandlerinlinePolicyAddedToExecutionRole0A8003C00" + } + ], "/aws-cdk-redshift-cluster-database/User/Resource/Provider/framework-onEvent/Resource": [ { "type": "aws:cdk:logicalId", @@ -238,6 +244,12 @@ "data": "UserFDDCDD17" } ], + "/aws-cdk-redshift-cluster-database/User/TablePrivileges/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "UserTablePrivilegesHandlerinlinePolicyAddedToExecutionRole06F27DECE" + } + ], "/aws-cdk-redshift-cluster-database/User/TablePrivileges/Resource/Provider/framework-onEvent/Resource": [ { "type": "aws:cdk:logicalId", @@ -286,6 +298,12 @@ "data": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fInvokerRoleDefaultPolicy2BD7CC05" } ], + "/aws-cdk-redshift-cluster-database/Table/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TableHandlerinlinePolicyAddedToExecutionRole0310C5507" + } + ], "/aws-cdk-redshift-cluster-database/Table/Resource/Provider/framework-onEvent/Resource": [ { "type": "aws:cdk:logicalId", @@ -298,6 +316,12 @@ "data": "Table7ABB320E" } ], + "/aws-cdk-redshift-cluster-database/TableWithAutoGeneratedName/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "TableWithAutoGeneratedNameHandlerinlinePolicyAddedToExecutionRole07C3A499A" + } + ], "/aws-cdk-redshift-cluster-database/TableWithAutoGeneratedName/Resource/Provider/framework-onEvent/Resource": [ { "type": "aws:cdk:logicalId", @@ -321,78 +345,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "UserProviderframeworkonEventServiceRole8FBA2FBD": [ - { - "type": "aws:cdk:logicalId", - "data": "UserProviderframeworkonEventServiceRole8FBA2FBD", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "UserProviderframeworkonEventServiceRoleDefaultPolicy9A9E044F": [ - { - "type": "aws:cdk:logicalId", - "data": "UserProviderframeworkonEventServiceRoleDefaultPolicy9A9E044F", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "UserTablePrivilegesProviderframeworkonEventServiceRole56BAEC9A": [ - { - "type": "aws:cdk:logicalId", - "data": "UserTablePrivilegesProviderframeworkonEventServiceRole56BAEC9A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "UserTablePrivilegesProviderframeworkonEventServiceRoleDefaultPolicy3B6EF50C": [ - { - "type": "aws:cdk:logicalId", - "data": "UserTablePrivilegesProviderframeworkonEventServiceRoleDefaultPolicy3B6EF50C", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "TableProviderframeworkonEventServiceRoleC3128F67": [ - { - "type": "aws:cdk:logicalId", - "data": "TableProviderframeworkonEventServiceRoleC3128F67", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "TableProviderframeworkonEventServiceRoleDefaultPolicyAD08715D": [ - { - "type": "aws:cdk:logicalId", - "data": "TableProviderframeworkonEventServiceRoleDefaultPolicyAD08715D", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "TableWithAutoGeneratedNameProviderframeworkonEventServiceRole9F1876DB": [ - { - "type": "aws:cdk:logicalId", - "data": "TableWithAutoGeneratedNameProviderframeworkonEventServiceRole9F1876DB", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "TableWithAutoGeneratedNameProviderframeworkonEventServiceRoleDefaultPolicy6C272C6F": [ - { - "type": "aws:cdk:logicalId", - "data": "TableWithAutoGeneratedNameProviderframeworkonEventServiceRoleDefaultPolicy6C272C6F", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "aws-cdk-redshift-cluster-database" diff --git a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/tree.json b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/tree.json index 97e8433037b9c..b1c6eaf8dd5e1 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-redshift-alpha/test/integ.database.js.snapshot/tree.json @@ -56,7 +56,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Vpc": { @@ -135,7 +136,8 @@ "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -250,7 +252,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PublicSubnet2": { @@ -302,7 +305,8 @@ "path": "aws-cdk-redshift-cluster-database/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -417,7 +421,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet1": { @@ -469,7 +474,8 @@ "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -536,7 +542,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "PrivateSubnet2": { @@ -588,7 +595,8 @@ "path": "aws-cdk-redshift-cluster-database/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "RouteTable": { @@ -655,7 +663,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "IGW": { @@ -699,7 +708,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Cluster": { @@ -735,7 +745,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterSubnetGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SecurityGroup": { @@ -769,7 +780,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Secret": { @@ -822,13 +834,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -921,13 +935,15 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.ClusterParameterGroup", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.Cluster", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "User": { @@ -984,13 +1000,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.SecretTargetAttachment", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "@aws-cdk/aws-redshift-alpha.DatabaseSecret", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1000,9 +1018,55 @@ "Handler": { "id": "Handler", "path": "aws-cdk-redshift-cluster-database/User/Resource/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-redshift-cluster-database/User/Resource/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-database/User/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "UserHandlerinlinePolicyAddedToExecutionRole0A8003C00", + "roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Provider": { @@ -1030,7 +1094,8 @@ "path": "aws-cdk-redshift-cluster-database/User/Resource/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1049,7 +1114,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/User/Resource/Provider)", "environment": { @@ -1089,7 +1154,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1113,7 +1179,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1133,9 +1200,55 @@ "Handler": { "id": "Handler", "path": "aws-cdk-redshift-cluster-database/User/TablePrivileges/Resource/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-redshift-cluster-database/User/TablePrivileges/Resource/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-database/User/TablePrivileges/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "UserTablePrivilegesHandlerinlinePolicyAddedToExecutionRole06F27DECE", + "roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Provider": { @@ -1163,7 +1276,8 @@ "path": "aws-cdk-redshift-cluster-database/User/TablePrivileges/Resource/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1182,7 +1296,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/User/TablePrivileges/Resource/Provider)", "environment": { @@ -1222,7 +1336,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1246,7 +1361,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1288,7 +1404,8 @@ "path": "aws-cdk-redshift-cluster-database/Query Redshift Database3de5bea727da479686625efb56431b5f/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1342,14 +1459,6 @@ "aws:cdk:cloudformation:props": { "policyDocument": { "Statement": [ - { - "Action": [ - "redshift-data:DescribeStatement", - "redshift-data:ExecuteStatement" - ], - "Effect": "Allow", - "Resource": "*" - }, { "Action": [ "secretsmanager:DescribeSecret", @@ -1384,13 +1493,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -1410,7 +1521,8 @@ "path": "aws-cdk-redshift-cluster-database/Query Redshift Database3de5bea727da479686625efb56431b5f/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1458,7 +1570,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Query Redshift Database3de5bea727da479686625efb56431b5fInvokerRole": { @@ -1470,7 +1583,8 @@ "path": "aws-cdk-redshift-cluster-database/Query Redshift Database3de5bea727da479686625efb56431b5fInvokerRole/ImportQuery Redshift Database3de5bea727da479686625efb56431b5fInvokerRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -1569,13 +1683,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Table": { @@ -1589,9 +1705,55 @@ "Handler": { "id": "Handler", "path": "aws-cdk-redshift-cluster-database/Table/Resource/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-redshift-cluster-database/Table/Resource/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-database/Table/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "TableHandlerinlinePolicyAddedToExecutionRole0310C5507", + "roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Provider": { @@ -1619,7 +1781,8 @@ "path": "aws-cdk-redshift-cluster-database/Table/Resource/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1638,7 +1801,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/Table/Resource/Provider)", "environment": { @@ -1678,7 +1841,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1702,7 +1866,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1728,9 +1893,55 @@ "Handler": { "id": "Handler", "path": "aws-cdk-redshift-cluster-database/TableWithAutoGeneratedName/Resource/Handler", + "children": { + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-redshift-cluster-database/TableWithAutoGeneratedName/Resource/Handler/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-redshift-cluster-database/TableWithAutoGeneratedName/Resource/Handler/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "redshift-data:DescribeStatement", + "redshift-data:ExecuteStatement" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "TableWithAutoGeneratedNameHandlerinlinePolicyAddedToExecutionRole07C3A499A", + "roles": [ + { + "Ref": "QueryRedshiftDatabase3de5bea727da479686625efb56431b5fServiceRole0A90D717" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } + } + }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Provider": { @@ -1758,7 +1969,8 @@ "path": "aws-cdk-redshift-cluster-database/TableWithAutoGeneratedName/Resource/Provider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1777,7 +1989,7 @@ "s3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "s3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip" + "s3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip" }, "description": "AWS CDK resource provider framework - onEvent (aws-cdk-redshift-cluster-database/TableWithAutoGeneratedName/Resource/Provider)", "environment": { @@ -1817,7 +2029,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -1841,7 +2054,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, diff --git a/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/aws-s3-object-lambda.assets.json b/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/aws-s3-object-lambda.assets.json index c2b8860bbd9c5..3715cf6be3dfc 100644 --- a/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/aws-s3-object-lambda.assets.json +++ b/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/aws-s3-object-lambda.assets.json @@ -1,7 +1,7 @@ { - "version": "34.0.0", + "version": "39.0.0", "files": { - "a636d01487e734fb47ae37f7f7cf57bc08b6dc9f5ef71d6ef4e6acd3812522fa": { + "09bae57707b35dd189a7248f5764ca8e47a3099d4d1a56fd864659d7e6ce96ea": { "source": { "path": "aws-s3-object-lambda.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a636d01487e734fb47ae37f7f7cf57bc08b6dc9f5ef71d6ef4e6acd3812522fa.json", + "objectKey": "09bae57707b35dd189a7248f5764ca8e47a3099d4d1a56fd864659d7e6ce96ea.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/aws-s3-object-lambda.template.json b/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/aws-s3-object-lambda.template.json index ef618edbbacf4..83079870fe8c5 100644 --- a/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/aws-s3-object-lambda.template.json +++ b/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/aws-s3-object-lambda.template.json @@ -36,27 +36,6 @@ ] } }, - "MyFunction1ServiceRoleDefaultPolicy39556460": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3-object-lambda:WriteGetObjectResponse", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyFunction1ServiceRoleDefaultPolicy39556460", - "Roles": [ - { - "Ref": "MyFunction1ServiceRole9852B06B" - } - ] - } - }, "MyFunction12A744C2E": { "Type": "AWS::Lambda::Function", "Properties": { @@ -73,10 +52,30 @@ "Runtime": "nodejs18.x" }, "DependsOn": [ - "MyFunction1ServiceRoleDefaultPolicy39556460", "MyFunction1ServiceRole9852B06B" ] }, + "MyFunction1inlinePolicyAddedToExecutionRole0BD012510": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3-object-lambda:WriteGetObjectResponse", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyFunction1inlinePolicyAddedToExecutionRole0BD012510", + "Roles": [ + { + "Ref": "MyFunction1ServiceRole9852B06B" + } + ] + } + }, "MyFunction2ServiceRole07E5BE0E": { "Type": "AWS::IAM::Role", "Properties": { @@ -108,27 +107,6 @@ ] } }, - "MyFunction2ServiceRoleDefaultPolicyA79C693E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "s3-object-lambda:WriteGetObjectResponse", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyFunction2ServiceRoleDefaultPolicyA79C693E", - "Roles": [ - { - "Ref": "MyFunction2ServiceRole07E5BE0E" - } - ] - } - }, "MyFunction2F2A964CA": { "Type": "AWS::Lambda::Function", "Properties": { @@ -145,10 +123,30 @@ "Runtime": "nodejs18.x" }, "DependsOn": [ - "MyFunction2ServiceRoleDefaultPolicyA79C693E", "MyFunction2ServiceRole07E5BE0E" ] }, + "MyFunction2inlinePolicyAddedToExecutionRole0DB08BBEE": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3-object-lambda:WriteGetObjectResponse", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyFunction2inlinePolicyAddedToExecutionRole0DB08BBEE", + "Roles": [ + { + "Ref": "MyFunction2ServiceRole07E5BE0E" + } + ] + } + }, "MyObjectLambda1SupportingAccessPoint223B719B": { "Type": "AWS::S3::AccessPoint", "Properties": { diff --git a/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/cdk.out b/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/cdk.out index 2313ab5436501..91e1a8b9901d5 100644 --- a/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"34.0.0"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/integ.json b/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/integ.json index 7d88716f37eef..9c96121e5bc14 100644 --- a/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "39.0.0", "testCases": { "integ.s3objectlambda": { "stacks": [ diff --git a/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/manifest.json b/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/manifest.json index c855c90cc63a6..0a364af4ec5b3 100644 --- a/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "34.0.0", + "version": "39.0.0", "artifacts": { "aws-s3-object-lambda.assets": { "type": "cdk:asset-manifest", @@ -14,10 +14,11 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-s3-object-lambda.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a636d01487e734fb47ae37f7f7cf57bc08b6dc9f5ef71d6ef4e6acd3812522fa.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/09bae57707b35dd189a7248f5764ca8e47a3099d4d1a56fd864659d7e6ce96ea.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -45,16 +46,16 @@ "data": "MyFunction1ServiceRole9852B06B" } ], - "/aws-s3-object-lambda/MyFunction1/ServiceRole/DefaultPolicy/Resource": [ + "/aws-s3-object-lambda/MyFunction1/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunction1ServiceRoleDefaultPolicy39556460" + "data": "MyFunction12A744C2E" } ], - "/aws-s3-object-lambda/MyFunction1/Resource": [ + "/aws-s3-object-lambda/MyFunction1/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunction12A744C2E" + "data": "MyFunction1inlinePolicyAddedToExecutionRole0BD012510" } ], "/aws-s3-object-lambda/MyFunction2/ServiceRole/Resource": [ @@ -63,16 +64,16 @@ "data": "MyFunction2ServiceRole07E5BE0E" } ], - "/aws-s3-object-lambda/MyFunction2/ServiceRole/DefaultPolicy/Resource": [ + "/aws-s3-object-lambda/MyFunction2/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunction2ServiceRoleDefaultPolicyA79C693E" + "data": "MyFunction2F2A964CA" } ], - "/aws-s3-object-lambda/MyFunction2/Resource": [ + "/aws-s3-object-lambda/MyFunction2/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyFunction2F2A964CA" + "data": "MyFunction2inlinePolicyAddedToExecutionRole0DB08BBEE" } ], "/aws-s3-object-lambda/MyObjectLambda1/SupportingAccessPoint": [ @@ -110,6 +111,24 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "MyFunction1ServiceRoleDefaultPolicy39556460": [ + { + "type": "aws:cdk:logicalId", + "data": "MyFunction1ServiceRoleDefaultPolicy39556460", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } + ], + "MyFunction2ServiceRoleDefaultPolicyA79C693E": [ + { + "type": "aws:cdk:logicalId", + "data": "MyFunction2ServiceRoleDefaultPolicyA79C693E", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-s3-object-lambda" diff --git a/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/tree.json b/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/tree.json index d1499cfae609a..f3faf326215e3 100644 --- a/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-s3objectlambda-alpha/test/integ.s3objectlambda.js.snapshot/tree.json @@ -84,45 +84,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-s3-object-lambda/MyFunction1/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-s3-object-lambda/MyFunction1/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "s3-object-lambda:WriteGetObjectResponse", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "MyFunction1ServiceRoleDefaultPolicy39556460", - "roles": [ - { - "Ref": "MyFunction1ServiceRole9852B06B" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -153,6 +114,45 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-s3-object-lambda/MyFunction1/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-s3-object-lambda/MyFunction1/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "s3-object-lambda:WriteGetObjectResponse", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyFunction1inlinePolicyAddedToExecutionRole0BD012510", + "roles": [ + { + "Ref": "MyFunction1ServiceRole9852B06B" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -214,45 +214,6 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-s3-object-lambda/MyFunction2/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-s3-object-lambda/MyFunction2/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "s3-object-lambda:WriteGetObjectResponse", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "MyFunction2ServiceRoleDefaultPolicyA79C693E", - "roles": [ - { - "Ref": "MyFunction2ServiceRole07E5BE0E" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { @@ -283,6 +244,45 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-s3-object-lambda/MyFunction2/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-s3-object-lambda/MyFunction2/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "s3-object-lambda:WriteGetObjectResponse", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyFunction2inlinePolicyAddedToExecutionRole0DB08BBEE", + "roles": [ + { + "Ref": "MyFunction2ServiceRole07E5BE0E" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0" + } } }, "constructInfo": { @@ -453,7 +453,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.70" + "version": "10.4.2" } } }, diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule-lambda.assets.json b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule-lambda.assets.json index 8456249a9722e..dc3246e86876b 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule-lambda.assets.json +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule-lambda.assets.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { "67412d7336becb4f3cc171ba3cf4ad59c7a45c7f2371ad1745ff38de715411f2": { "source": { @@ -14,7 +14,7 @@ } } }, - "7eb3ea61858a7e85bc488a32f5820e1e0f4ef746d7072170c9658af73d618c32": { + "9cf951f0c620f178b5f8d45a3fca8dc28fe453efd7aa5fe535e3e397e7494c53": { "source": { "path": "aws-cdk-schedule-lambda.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7eb3ea61858a7e85bc488a32f5820e1e0f4ef746d7072170c9658af73d618c32.json", + "objectKey": "9cf951f0c620f178b5f8d45a3fca8dc28fe453efd7aa5fe535e3e397e7494c53.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule-lambda.template.json b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule-lambda.template.json index 617c5bfc00bc9..18dff64efa0b2 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule-lambda.template.json +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule-lambda.template.json @@ -31,27 +31,6 @@ ] } }, - "MyLambdaServiceRoleDefaultPolicy5BBC6F68": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:TagResource", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "Roles": [ - { - "Ref": "MyLambdaServiceRole4539ECB6" - } - ] - } - }, "MyLambdaCCE802FB": { "Type": "AWS::Lambda::Function", "Properties": { @@ -97,9 +76,29 @@ "Timeout": 30 }, "DependsOn": [ - "MyLambdaServiceRoleDefaultPolicy5BBC6F68", "MyLambdaServiceRole4539ECB6" ] + }, + "MyLambdainlinePolicyAddedToExecutionRole0E0144580": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:TagResource", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyLambdainlinePolicyAddedToExecutionRole0E0144580", + "Roles": [ + { + "Ref": "MyLambdaServiceRole4539ECB6" + } + ] + } } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule.assets.json b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule.assets.json index 589a98886a6fe..383332aa395e8 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule.assets.json +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule.assets.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { "67412d7336becb4f3cc171ba3cf4ad59c7a45c7f2371ad1745ff38de715411f2": { "source": { @@ -14,7 +14,7 @@ } } }, - "c9885c09ee79faecc8af1f36f7344be451c8ebb129645bd6f41f623cabd4d156": { + "1ccad2eaf1ffdb8f5135623b86555045b2dc0af1deefdb6ea3319112ea95fa8c": { "source": { "path": "aws-cdk-schedule.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c9885c09ee79faecc8af1f36f7344be451c8ebb129645bd6f41f623cabd4d156.json", + "objectKey": "1ccad2eaf1ffdb8f5135623b86555045b2dc0af1deefdb6ea3319112ea95fa8c.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule.template.json b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule.template.json index 86cb6a09027d6..4068af0887c66 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule.template.json +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/aws-cdk-schedule.template.json @@ -181,27 +181,6 @@ ] } }, - "MyLambdaServiceRoleDefaultPolicy5BBC6F68": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": "lambda:TagResource", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "Roles": [ - { - "Ref": "MyLambdaServiceRole4539ECB6" - } - ] - } - }, "MyLambdaCCE802FB": { "Type": "AWS::Lambda::Function", "Properties": { @@ -247,10 +226,30 @@ "Timeout": 30 }, "DependsOn": [ - "MyLambdaServiceRoleDefaultPolicy5BBC6F68", "MyLambdaServiceRole4539ECB6" ] }, + "MyLambdainlinePolicyAddedToExecutionRole0E0144580": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:TagResource", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "MyLambdainlinePolicyAddedToExecutionRole0E0144580", + "Roles": [ + { + "Ref": "MyLambdaServiceRole4539ECB6" + } + ] + } + }, "ScheduleWithSameStackLambda41F66AE8": { "Type": "AWS::Scheduler::Schedule", "Properties": { diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/cdk.out b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/cdk.out index c6e612584e352..91e1a8b9901d5 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"38.0.1"} \ No newline at end of file +{"version":"39.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/integ.json b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/integ.json index 245f481dea6a2..cfb49630b267f 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/integ.json +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "testCases": { "integtest-lambda-invoke/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/integtestlambdainvokeDefaultTestDeployAssertEC6565E6.assets.json b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/integtestlambdainvokeDefaultTestDeployAssertEC6565E6.assets.json index 5bc3940748997..d0ca2df11f698 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/integtestlambdainvokeDefaultTestDeployAssertEC6565E6.assets.json +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/integtestlambdainvokeDefaultTestDeployAssertEC6565E6.assets.json @@ -1,20 +1,20 @@ { - "version": "38.0.1", + "version": "39.0.0", "files": { - "14d52bdadae57c6ec2c7b715c5420ae5c3001a8252558f7219f6207e4f405a97": { + "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd": { "source": { - "path": "asset.14d52bdadae57c6ec2c7b715c5420ae5c3001a8252558f7219f6207e4f405a97.bundle", + "path": "asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "14d52bdadae57c6ec2c7b715c5420ae5c3001a8252558f7219f6207e4f405a97.zip", + "objectKey": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "d0e92b74c110bc4ca270391102f7563bed80511b9e30b2062e7fd7d7a0bde536": { + "8b44a63159da053f637f120864dd4219493daa317c5074a1dd453855eb7a0ddc": { "source": { "path": "integtestlambdainvokeDefaultTestDeployAssertEC6565E6.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d0e92b74c110bc4ca270391102f7563bed80511b9e30b2062e7fd7d7a0bde536.json", + "objectKey": "8b44a63159da053f637f120864dd4219493daa317c5074a1dd453855eb7a0ddc.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/integtestlambdainvokeDefaultTestDeployAssertEC6565E6.template.json b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/integtestlambdainvokeDefaultTestDeployAssertEC6565E6.template.json index 2dfbf031335d8..8bd1965f86e2a 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/integtestlambdainvokeDefaultTestDeployAssertEC6565E6.template.json +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/integtestlambdainvokeDefaultTestDeployAssertEC6565E6.template.json @@ -38,7 +38,7 @@ } }, "flattenResponse": "false", - "salt": "1732612451690" + "salt": "1738601407362" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -244,7 +244,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "14d52bdadae57c6ec2c7b715c5420ae5c3001a8252558f7219f6207e4f405a97.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.handler", @@ -322,7 +322,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "14d52bdadae57c6ec2c7b715c5420ae5c3001a8252558f7219f6207e4f405a97.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.isComplete", @@ -372,7 +372,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "14d52bdadae57c6ec2c7b715c5420ae5c3001a8252558f7219f6207e4f405a97.zip" + "S3Key": "f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.zip" }, "Timeout": 120, "Handler": "index.onTimeout", @@ -422,7 +422,7 @@ } }, "flattenResponse": "false", - "salt": "1732612451693" + "salt": "1738601407364" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/manifest.json b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/manifest.json index 63b37b2107563..1ebdd5110c277 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "38.0.1", + "version": "39.0.0", "artifacts": { "aws-cdk-schedule-lambda.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7eb3ea61858a7e85bc488a32f5820e1e0f4ef746d7072170c9658af73d618c32.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9cf951f0c620f178b5f8d45a3fca8dc28fe453efd7aa5fe535e3e397e7494c53.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -40,16 +40,16 @@ "data": "MyLambdaServiceRole4539ECB6" } ], - "/aws-cdk-schedule-lambda/MyLambda/ServiceRole/DefaultPolicy/Resource": [ + "/aws-cdk-schedule-lambda/MyLambda/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaServiceRoleDefaultPolicy5BBC6F68" + "data": "MyLambdaCCE802FB" } ], - "/aws-cdk-schedule-lambda/MyLambda/Resource": [ + "/aws-cdk-schedule-lambda/MyLambda/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaCCE802FB" + "data": "MyLambdainlinePolicyAddedToExecutionRole0E0144580" } ], "/aws-cdk-schedule-lambda/BootstrapVersion": [ @@ -84,7 +84,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c9885c09ee79faecc8af1f36f7344be451c8ebb129645bd6f41f623cabd4d156.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1ccad2eaf1ffdb8f5135623b86555045b2dc0af1deefdb6ea3319112ea95fa8c.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -125,16 +125,16 @@ "data": "MyLambdaServiceRole4539ECB6" } ], - "/aws-cdk-schedule/MyLambda/ServiceRole/DefaultPolicy/Resource": [ + "/aws-cdk-schedule/MyLambda/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaServiceRoleDefaultPolicy5BBC6F68" + "data": "MyLambdaCCE802FB" } ], - "/aws-cdk-schedule/MyLambda/Resource": [ + "/aws-cdk-schedule/MyLambda/inlinePolicyAddedToExecutionRole-0/Resource": [ { "type": "aws:cdk:logicalId", - "data": "MyLambdaCCE802FB" + "data": "MyLambdainlinePolicyAddedToExecutionRole0E0144580" } ], "/aws-cdk-schedule/ScheduleWithSameStackLambda/Resource": [ @@ -172,6 +172,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "MyLambdaServiceRoleDefaultPolicy5BBC6F68": [ + { + "type": "aws:cdk:logicalId", + "data": "MyLambdaServiceRoleDefaultPolicy5BBC6F68", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "aws-cdk-schedule" @@ -193,7 +202,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d0e92b74c110bc4ca270391102f7563bed80511b9e30b2062e7fd7d7a0bde536.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8b44a63159da053f637f120864dd4219493daa317c5074a1dd453855eb7a0ddc.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/tree.json b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/tree.json index 34a9e176fc39d..16d0cde96d8c6 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/tree.json +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.lambda-invoke.js.snapshot/tree.json @@ -21,7 +21,8 @@ "path": "aws-cdk-schedule-lambda/MyLambda/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -62,50 +63,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-schedule-lambda/MyLambda/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-schedule-lambda/MyLambda/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "lambda:TagResource", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "roles": [ - { - "Ref": "MyLambdaServiceRole4539ECB6" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -125,7 +88,8 @@ "path": "aws-cdk-schedule-lambda/MyLambda/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -186,11 +150,52 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-schedule-lambda/MyLambda/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-schedule-lambda/MyLambda/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "lambda:TagResource", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyLambdainlinePolicyAddedToExecutionRole0E0144580", + "roles": [ + { + "Ref": "MyLambdaServiceRole4539ECB6" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "BootstrapVersion": { @@ -224,7 +229,8 @@ "path": "aws-cdk-schedule/importedFromFirstStack", "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.FunctionBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ScheduleWithImportedLambda": { @@ -286,7 +292,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-scheduler-alpha.Schedule", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SchedulerRoleForTarget-ed282b": { @@ -298,7 +305,8 @@ "path": "aws-cdk-schedule/SchedulerRoleForTarget-ed282b/ImportSchedulerRoleForTarget-ed282b", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -430,13 +438,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "MyLambda": { @@ -452,7 +462,8 @@ "path": "aws-cdk-schedule/MyLambda/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -493,50 +504,12 @@ "fqn": "aws-cdk-lib.aws_iam.CfnRole", "version": "0.0.0" } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-cdk-schedule/MyLambda/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-cdk-schedule/MyLambda/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": "lambda:TagResource", - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "policyName": "MyLambdaServiceRoleDefaultPolicy5BBC6F68", - "roles": [ - { - "Ref": "MyLambdaServiceRole4539ECB6" - } - ] - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" - } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Code": { @@ -556,7 +529,8 @@ "path": "aws-cdk-schedule/MyLambda/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, @@ -617,11 +591,52 @@ "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", "version": "0.0.0" } + }, + "inlinePolicyAddedToExecutionRole-0": { + "id": "inlinePolicyAddedToExecutionRole-0", + "path": "aws-cdk-schedule/MyLambda/inlinePolicyAddedToExecutionRole-0", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-schedule/MyLambda/inlinePolicyAddedToExecutionRole-0/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": "lambda:TagResource", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "policyName": "MyLambdainlinePolicyAddedToExecutionRole0E0144580", + "roles": [ + { + "Ref": "MyLambdaServiceRole4539ECB6" + } + ] + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.Policy", + "version": "0.0.0", + "metadata": [] + } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ScheduleWithSameStackLambda": { @@ -669,7 +684,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-scheduler-alpha.Schedule", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "SchedulerRoleForTarget-637b51": { @@ -681,7 +697,8 @@ "path": "aws-cdk-schedule/SchedulerRoleForTarget-637b51/ImportSchedulerRoleForTarget-637b51", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "Resource": { @@ -793,13 +810,15 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "ScheduleWithStaticDate": { @@ -846,7 +865,8 @@ }, "constructInfo": { "fqn": "@aws-cdk/aws-scheduler-alpha.Schedule", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "BootstrapVersion": { @@ -928,7 +948,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "WaitFor": { @@ -1170,7 +1191,8 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "0.0.0" + "version": "0.0.0", + "metadata": [] } }, "WaitFor": { diff --git a/packages/aws-cdk-lib/aws-certificatemanager/test/dns-validated-certificate.test.ts b/packages/aws-cdk-lib/aws-certificatemanager/test/dns-validated-certificate.test.ts index b2308def62b41..56066f322f603 100644 --- a/packages/aws-cdk-lib/aws-certificatemanager/test/dns-validated-certificate.test.ts +++ b/packages/aws-cdk-lib/aws-certificatemanager/test/dns-validated-certificate.test.ts @@ -47,7 +47,7 @@ testDeprecated('creates CloudFormation Custom Resource', () => { Timeout: 900, }); Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { - PolicyName: 'CertificateCertificateRequestorFunctionServiceRoleDefaultPolicy3C8845BC', + PolicyName: 'CertificateCertificateRequestorFunctioninlinePolicyAddedToExecutionRole02D5DA9E2', Roles: [ { Ref: 'CertificateCertificateRequestorFunctionServiceRoleC04C13DA', @@ -66,11 +66,25 @@ testDeprecated('creates CloudFormation Custom Resource', () => { Effect: 'Allow', Resource: '*', }, + ], + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ { Action: 'route53:GetChange', Effect: 'Allow', Resource: '*', }, + ], + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ { Action: 'route53:changeResourceRecordSets', Effect: 'Allow', diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/pipeline.test.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/pipeline.test.ts index 786bda6fe64d1..7a72445244457 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/pipeline.test.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/pipeline.test.ts @@ -534,7 +534,7 @@ describe('pipeline', () => { ], 'Version': '2012-10-17', }, - 'PolicyName': 'FunctionServiceRoleDefaultPolicy2F49994A', + 'PolicyName': 'FunctioninlinePolicyAddedToExecutionRole0B553FD2F', 'Roles': [ { 'Ref': 'FunctionServiceRole675BB04A', diff --git a/packages/aws-cdk-lib/aws-dynamodb/test/dynamodb.test.ts b/packages/aws-cdk-lib/aws-dynamodb/test/dynamodb.test.ts index 1a936794b45c4..40c29e53c8a27 100644 --- a/packages/aws-cdk-lib/aws-dynamodb/test/dynamodb.test.ts +++ b/packages/aws-cdk-lib/aws-dynamodb/test/dynamodb.test.ts @@ -678,11 +678,23 @@ test('replica-handler permission check', () => { ], }, }, + ], + }, + }); + Template.fromStack(provider).hasResourceProperties('AWS::IAM::Policy', { + 'PolicyDocument': { + 'Statement': [ { 'Action': 'dynamodb:DescribeLimits', 'Effect': 'Allow', 'Resource': '*', }, + ], + }, + }); + Template.fromStack(provider).hasResourceProperties('AWS::IAM::Policy', { + 'PolicyDocument': { + 'Statement': [ { 'Action': [ 'dynamodb:DeleteTable', diff --git a/packages/aws-cdk-lib/aws-ecs/test/cluster.test.ts b/packages/aws-cdk-lib/aws-ecs/test/cluster.test.ts index 434bf5d7e77e0..981f6697a7060 100644 --- a/packages/aws-cdk-lib/aws-ecs/test/cluster.test.ts +++ b/packages/aws-cdk-lib/aws-ecs/test/cluster.test.ts @@ -443,6 +443,20 @@ describe('cluster', () => { Effect: 'Allow', Resource: '*', }, + ], + Version: '2012-10-17', + }, + PolicyName: 'EcsClusterDefaultAutoScalingGroupDrainECSHookFunctioninlinePolicyAddedToExecutionRole075025F00', + Roles: [ + { + Ref: 'EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA', + }, + ], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ { Action: 'autoscaling:CompleteLifecycleAction', Effect: 'Allow', @@ -470,6 +484,13 @@ describe('cluster', () => { ], }, }, + ], + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ { Action: [ 'ecs:DescribeContainerInstances', @@ -488,6 +509,13 @@ describe('cluster', () => { }, }, }, + ], + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ { Action: [ 'ecs:ListContainerInstances', @@ -502,6 +530,13 @@ describe('cluster', () => { ], }, }, + ], + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ { Action: [ 'ecs:UpdateContainerInstancesState', @@ -521,14 +556,7 @@ describe('cluster', () => { Resource: '*', }, ], - Version: '2012-10-17', }, - PolicyName: 'EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRoleDefaultPolicyA45BF396', - Roles: [ - { - Ref: 'EcsClusterDefaultAutoScalingGroupDrainECSHookFunctionServiceRole94543EDA', - }, - ], }); }); diff --git a/packages/aws-cdk-lib/aws-events-targets/test/aws-api/aws-api.test.ts b/packages/aws-cdk-lib/aws-events-targets/test/aws-api/aws-api.test.ts index 0af173c769dc9..c72ceb08c089c 100644 --- a/packages/aws-cdk-lib/aws-events-targets/test/aws-api/aws-api.test.ts +++ b/packages/aws-cdk-lib/aws-events-targets/test/aws-api/aws-api.test.ts @@ -83,13 +83,20 @@ test('use AwsApi as an event rule target', () => { Effect: 'Allow', Resource: '*', }, + ], + Version: '2012-10-17', + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ { Action: 'rds:CreateDBSnapshot', Effect: 'Allow', Resource: '*', }, ], - Version: '2012-10-17', }, }); }); diff --git a/packages/aws-cdk-lib/aws-lambda-event-sources/test/kafka.test.ts b/packages/aws-cdk-lib/aws-lambda-event-sources/test/kafka.test.ts index b654215cf917d..eddfb3597f601 100644 --- a/packages/aws-cdk-lib/aws-lambda-event-sources/test/kafka.test.ts +++ b/packages/aws-cdk-lib/aws-lambda-event-sources/test/kafka.test.ts @@ -41,7 +41,7 @@ describe('KafkaEventSource', () => { ], Version: '2012-10-17', }, - PolicyName: 'FnServiceRoleDefaultPolicyC6A839BF', + PolicyName: 'FninlinePolicyAddedToExecutionRole00AF5C038', Roles: [ { Ref: 'FnServiceRoleB9001A96', @@ -92,19 +92,42 @@ describe('KafkaEventSource', () => { Ref: 'SecretA720EF05', }, }, + // { + // Action: [ + // 'kafka:DescribeCluster', + // 'kafka:GetBootstrapBrokers', + // 'kafka:ListScramSecrets', + // ], + // Effect: 'Allow', + // Resource: clusterArn, + // }, + ], + Version: '2012-10-17', + }, + PolicyName: 'FnServiceRoleDefaultPolicyC6A839BF', + Roles: [ + { + Ref: 'FnServiceRoleB9001A96', + }, + ], + }); + + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Version: '2012-10-17', + Statement: [ { + Effect: 'Allow', Action: [ 'kafka:DescribeCluster', 'kafka:GetBootstrapBrokers', 'kafka:ListScramSecrets', ], - Effect: 'Allow', Resource: clusterArn, }, ], - Version: '2012-10-17', }, - PolicyName: 'FnServiceRoleDefaultPolicyC6A839BF', + PolicyName: 'FninlinePolicyAddedToExecutionRole00AF5C038', Roles: [ { Ref: 'FnServiceRoleB9001A96', diff --git a/packages/aws-cdk-lib/aws-lambda/lib/function-base.ts b/packages/aws-cdk-lib/aws-lambda/lib/function-base.ts index 8b15dcac97e31..b54308631a624 100644 --- a/packages/aws-cdk-lib/aws-lambda/lib/function-base.ts +++ b/packages/aws-cdk-lib/aws-lambda/lib/function-base.ts @@ -322,6 +322,12 @@ export abstract class FunctionBase extends Resource implements IFunction, ec2.IC */ protected _functionUrlInvocationGrants: Record = {}; + /** + * The number of permissions added to this function + * @internal + */ + private _policyCounter: number = 0; + /** * A warning will be added to functions under the following conditions: * - permissions that include `lambda:InvokeFunction` are added to the unqualified function. @@ -391,7 +397,10 @@ export abstract class FunctionBase extends Resource implements IFunction, ec2.IC return; } - this.role.addToPrincipalPolicy(statement); + const policyToAdd = new iam.Policy(this, `inlinePolicyAddedToExecutionRole-${this._policyCounter++}`, { + statements: [statement], + }); + this.role.attachInlinePolicy(policyToAdd); } /** diff --git a/packages/aws-cdk-lib/aws-lambda/test/function.test.ts b/packages/aws-cdk-lib/aws-lambda/test/function.test.ts index b34ad40d31862..a13e159fa8b05 100644 --- a/packages/aws-cdk-lib/aws-lambda/test/function.test.ts +++ b/packages/aws-cdk-lib/aws-lambda/test/function.test.ts @@ -430,6 +430,14 @@ describe('function', () => { Statement: [ { Action: 'confirm:itsthesame', Effect: 'Allow', Resource: '*' }, { Action: 'inline:inline', Effect: 'Allow', Resource: '*' }, + ], + }, + }); + + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Version: '2012-10-17', + Statement: [ { Action: 'explicit:explicit', Effect: 'Allow', Resource: '*' }, ], }, @@ -842,7 +850,7 @@ describe('function', () => { ], Version: '2012-10-17', }, - PolicyName: 'MyLambdaServiceRoleDefaultPolicy5BBC6F68', + PolicyName: 'MyLambdainlinePolicyAddedToExecutionRole0E0144580', Roles: [ { Ref: 'MyLambdaServiceRole4539ECB6', @@ -873,7 +881,6 @@ describe('function', () => { FunctionName: 'OneFunctionToRuleThemAll', }, DependsOn: [ - 'MyLambdaServiceRoleDefaultPolicy5BBC6F68', 'MyLambdaServiceRole4539ECB6', ], }); @@ -1140,7 +1147,7 @@ describe('function', () => { ], Version: '2012-10-17', }, - PolicyName: 'MyLambdaServiceRoleDefaultPolicy5BBC6F68', + PolicyName: 'MyLambdainlinePolicyAddedToExecutionRole0E0144580', Roles: [ { Ref: 'MyLambdaServiceRole4539ECB6', @@ -1166,7 +1173,6 @@ describe('function', () => { }, }, DependsOn: [ - 'MyLambdaServiceRoleDefaultPolicy5BBC6F68', 'MyLambdaServiceRole4539ECB6', ], }); @@ -1196,7 +1202,7 @@ describe('function', () => { ], Version: '2012-10-17', }, - PolicyName: 'MyLambdaServiceRoleDefaultPolicy5BBC6F68', + PolicyName: 'MyLambdainlinePolicyAddedToExecutionRole0E0144580', Roles: [ { Ref: 'MyLambdaServiceRole4539ECB6', @@ -1222,7 +1228,6 @@ describe('function', () => { }, }, DependsOn: [ - 'MyLambdaServiceRoleDefaultPolicy5BBC6F68', 'MyLambdaServiceRole4539ECB6', ], }); diff --git a/packages/aws-cdk-lib/aws-secretsmanager/test/rotation-schedule.test.ts b/packages/aws-cdk-lib/aws-secretsmanager/test/rotation-schedule.test.ts index c1150e3b4b8d1..85558d23a811b 100644 --- a/packages/aws-cdk-lib/aws-secretsmanager/test/rotation-schedule.test.ts +++ b/packages/aws-cdk-lib/aws-secretsmanager/test/rotation-schedule.test.ts @@ -113,21 +113,28 @@ test('assign permissions for rotation schedule with a rotation Lambda', () => { Ref: 'SecretA720EF05', }, }, - { - Action: 'secretsmanager:GetRandomPassword', - Effect: 'Allow', - Resource: '*', - }, ], Version: '2012-10-17', }, - PolicyName: 'LambdaServiceRoleDefaultPolicyDAE46E21', + PolicyName: 'LambdainlinePolicyAddedToExecutionRole06CEA97D1', Roles: [ { Ref: 'LambdaServiceRoleA8ED4D3B', }, ], }); + + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ + { + Action: 'secretsmanager:GetRandomPassword', + Effect: 'Allow', + Resource: '*', + }, + ], + }, + }); }); test('grants correct permissions for secret imported by name', () => { @@ -172,7 +179,7 @@ test('grants correct permissions for secret imported by name', () => { ]), Version: '2012-10-17', }, - PolicyName: 'LambdaServiceRoleDefaultPolicyDAE46E21', + PolicyName: 'LambdainlinePolicyAddedToExecutionRole06CEA97D1', Roles: [ { Ref: 'LambdaServiceRoleA8ED4D3B', diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.test.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.test.ts index 93a96f533b110..ec1383ef84e77 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.test.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/emrcontainers/start-job-run.test.ts @@ -1052,6 +1052,12 @@ describe('Invoke EMR Containers Start Job Run with ', () => { ], }, }, + ], + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ { Action: [ 'iam:GetRole', diff --git a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/lambda/call-aws-service-cross-region.test.ts b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/lambda/call-aws-service-cross-region.test.ts index 6404c7c0b8959..cb0f149aa23e7 100644 --- a/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/lambda/call-aws-service-cross-region.test.ts +++ b/packages/aws-cdk-lib/aws-stepfunctions-tasks/test/lambda/call-aws-service-cross-region.test.ts @@ -317,6 +317,13 @@ test('can pass additional IAM statements', () => { Effect: 'Allow', Resource: '*', }, + ], + Version: '2012-10-17', + }, + }); + Template.fromStack(stack).hasResourceProperties('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [ { Action: 's3:getObject', Effect: 'Allow',