diff --git a/CHANGELOG.md b/CHANGELOG.md index 25b7c56b4..606ca74fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.61.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.60.0...v2.61.0) (2024-07-05) + +Built on CDK v2.147.3 + +### Maintenance + +* Updated all javascript to Node.js 20 + ## [2.60.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.59.0...v2.60.0) (2024-06-11) Built on CDK v2.145.0 diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index f67c2852f..774ec6724 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -17,7 +17,7 @@ Disk image size: 60 GB | Using the Fork button at the upper right, Fork the repo into your github account. | While we can give some advice on what github and git commands to use, we will not attempt to be a git tutorial. Some git/github expertise is assumed.| | Clone forked repo to your local development environment | If you wish to work off a branch in your repository, create that branch now and clone that branch. You will create a PR back to Main in aws-solutions-constructs eventually, you can do that from fork/main or fork/*branch* | | `cd aws-solutions-constructs` | This is the home directory of the repo, this is where you will open your text editor, run full builds, etc.| -| `docker run -u root --rm --net=host -it -v $PWD:$PWD -w $PWD jsii/superchain:1-buster-slim-node16` | This command downloads the Docker image (if necessary) and starts the container in which you will do all builds. The container will stay open in terminal mode, allowing you to edit/build repeatedly until your code is ready.| +| `docker run -u root --rm --net=host -it -v $PWD:$PWD -w $PWD jsii/superchain:1-bullseye-slim` | This command downloads the Docker image (if necessary) and starts the container in which you will do all builds. The container will stay open in terminal mode, allowing you to edit/build repeatedly until your code is ready.| | Optional - Open a second terminal window to the aws-solutions-constructs directory. | The docker container mounts your local drive, so shares the Solutions Constructs source code tree with the host. You may find it advantageous to maintain a second terminal not running the Docker container to run git commands, your text editor, etc. | | `./deployment/v2/build-patterns.sh` | This command will build the entire repo, which is required prior to developing constructs. Some of the steps include: Installing the correct version of tools required in the build process, setting up environment variables, running JSII in each construct, and running all integration and unit tests. Commands executed across each construct are managed via yarn, so multiple commands are running in parallel most of the time. It's because of this that adding more resources to your Docker container can greatly reduce the build time (suggested values are discussed above). | | In the top level aws-solutions-constructs folder: `./deployment/v2/align-version.sh revert` | This will reset all the version numbers back to 0.0.0. You need to do this before adding/committing code - you can't submit package.json files with version numbers. It's common to do a full build ./deployment/v2/build-patterns.sh after coding to ensure all tests still pass - if you do this it will revert all the version numbers for you.| @@ -29,7 +29,7 @@ The build-patterns.sh script sets everything up to build constructs, builds ever | Action | Explanation | | :------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | (optional)
`git checkout -b your-branch-name` | If you're working in a different branch than main in your forked repo and haven't changed your local branch, now is a good time to do so. | -| `source ./deployment/v2/allow-partial-builds.sh ` | This aligns the versions and sets up environment variables | +| `source ./deployment/v2/allow-partial-builds.sh ` | This aligns the versions and sets up environment variables. IMPORTANT - build-patterns.sh performs some initialization of the image (installing software, etc.) so must be run at least once before you can start working with partial builds. | | `cd your-construct-name` | Change directory to the folder where you want to change code (this might also be `cd core`). | | *Do all your code editing* | Open your code editor and and create the construct or perform your edits on an existing construct (or core). | | `npm run build+lint+test` | This is the build command for a construct (or core). It will build, lint and run the unit and integration tests. If you make any substantive changes to the code, you will almost certainly see some or all of the tests fail. The next section will describe how testing works in AWS Solutions Constructs and how to write, refresh and execute tests. In the meantime, you can at least check if your code transpiles correctly without running the tests by running `npm run build`. If you've edited any modules in /core in addition to a construct, be sure to build /core before building your construct. | diff --git a/deployment/v2/align-version.js b/deployment/v2/align-version.js index 5c986a2c0..5047b29b8 100755 --- a/deployment/v2/align-version.js +++ b/deployment/v2/align-version.js @@ -10,7 +10,7 @@ const nullVersionMarker = process.argv[2]; const targetSolutionsConstructsVersion = process.argv[3]; // these versions need to be sourced from a config file -const awsCdkLibVersion = '2.145.0'; +const awsCdkLibVersion = '2.147.3'; for (const file of process.argv.splice(4)) { const pkg = JSON.parse(fs.readFileSync(file).toString()); diff --git a/deployment/v2/refresh-multiple-tests.sh b/deployment/v2/refresh-multiple-tests.sh index 42baa84a1..d26c8432f 100755 --- a/deployment/v2/refresh-multiple-tests.sh +++ b/deployment/v2/refresh-multiple-tests.sh @@ -32,6 +32,7 @@ aws-cloudfront-apigateway-lambda aws-cloudfront-mediastore aws-cloudfront-s3 aws-cognito-apigateway-lambda +aws-constructs-factories aws-dynamodbstreams-lambda aws-dynamodbstreams-lambda-elasticsearch-kibana aws-eventbridge-kinesisfirehose-s3 @@ -91,6 +92,7 @@ aws-wafwebacl-alb aws-wafwebacl-apigateway aws-wafwebacl-appsync aws-wafwebacl-cloudfront +resources " deployment_dir=$(cd $(dirname $0) && pwd) diff --git a/source/lerna.json b/source/lerna.json index 1b9596561..33f23319f 100644 --- a/source/lerna.json +++ b/source/lerna.json @@ -6,5 +6,5 @@ "./patterns/@aws-solutions-constructs/*" ], "rejectCycles": "true", - "version": "2.60.0" + "version": "2.61.0" } diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/albfar-all-existing-private-http.assets.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/albfar-all-existing-private-http.assets.json index 1a34e90af..4eea48d50 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/albfar-all-existing-private-http.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/albfar-all-existing-private-http.assets.json @@ -15,7 +15,7 @@ } } }, - "b38a900620cf991e9952361a75d7508506c554c7a7b9d9e8e24d04c0356d80ba": { + "cf4b149b0b48c28b8c995c18a3ca09f74b8fac53d219d344e54c9e77da481f91": { "source": { "path": "albfar-all-existing-private-http.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "b38a900620cf991e9952361a75d7508506c554c7a7b9d9e8e24d04c0356d80ba.json", + "objectKey": "cf4b149b0b48c28b8c995c18a3ca09f74b8fac53d219d344e54c9e77da481f91.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/albfar-all-existing-private-http.template.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/albfar-all-existing-private-http.template.json index c3340791d..515907f22 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/albfar-all-existing-private-http.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/albfar-all-existing-private-http.template.json @@ -715,7 +715,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/manifest.json index 66ff76612..68fbc8133 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/b38a900620cf991e9952361a75d7508506c554c7a7b9d9e8e24d04c0356d80ba.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/cf4b149b0b48c28b8c995c18a3ca09f74b8fac53d219d344e54c9e77da481f91.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/tree.json index 9301d7358..628c08fba 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-existing-private-http.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "albfar-all-existing-private-http/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "albfar-all-existing-private-http/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "albfar-all-existing-private-http/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "albfar-all-existing-private-http/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "albfar-all-existing-private-http/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "albfar-all-existing-private-http/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -880,13 +880,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -925,13 +925,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -978,19 +978,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1002,7 +1002,7 @@ "path": "albfar-all-existing-private-http/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1010,7 +1010,7 @@ "path": "albfar-all-existing-private-http/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1018,13 +1018,13 @@ "path": "albfar-all-existing-private-http/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "albfar-all-existing-private-http-ECR_API-security-group": { @@ -1080,13 +1080,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "albfar-all-existing-private-http-ECR_DKR-security-group": { @@ -1142,13 +1142,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1164,13 +1164,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1186,7 +1186,7 @@ "path": "albfar-all-existing-private-http/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1211,13 +1211,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1257,7 +1257,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -1265,13 +1265,13 @@ "path": "albfar-all-existing-private-http/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -1299,7 +1299,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "from albfarallexistingprivatehttptestalbSecurityGroupAC4D388D:8080": { @@ -1328,13 +1328,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -1396,13 +1396,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "test-alb": { @@ -1443,7 +1443,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.143.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -1473,7 +1473,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "to albfarallexistingprivatehttptestsgD60B2013:8080": { @@ -1502,19 +1502,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupEgress", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct": { @@ -1548,19 +1548,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-alb-fargate.AlbToFargate", - "version": "2.57.0" + "version": "2.60.0" } }, "test-construct-target-tg": { @@ -1591,13 +1591,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1625,7 +1625,7 @@ "path": "albfar-all-existing-private-http/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1633,25 +1633,25 @@ "path": "albfar-all-existing-private-http/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1659,7 +1659,7 @@ "path": "albfar-all-existing-private-http/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1667,13 +1667,13 @@ "path": "albfar-all-existing-private-http/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1687,7 +1687,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/albfar-all-new-public-http.assets.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/albfar-all-new-public-http.assets.json index adf786724..eeab642f8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/albfar-all-new-public-http.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/albfar-all-new-public-http.assets.json @@ -15,21 +15,21 @@ } } }, - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "06eacc4f3cc52ec96ca384b4daa3fcffd5b4ce9a52d3302901bc4cbea92c88e3": { + "e18e2439b3dabc8948f64bb5c0da7441fe38d9ad3a3963174d91dee500a3d8fd": { "source": { "path": "albfar-all-new-public-http.template.json", "packaging": "file" @@ -37,7 +37,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "06eacc4f3cc52ec96ca384b4daa3fcffd5b4ce9a52d3302901bc4cbea92c88e3.json", + "objectKey": "e18e2439b3dabc8948f64bb5c0da7441fe38d9ad3a3963174d91dee500a3d8fd.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/albfar-all-new-public-http.template.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/albfar-all-new-public-http.template.json index 9d119456f..2a7888e94 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/albfar-all-new-public-http.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/albfar-all-new-public-http.template.json @@ -746,7 +746,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1121,7 +1121,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1132,7 +1132,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/manifest.json index 6baa6e42c..6bac8e88a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/06eacc4f3cc52ec96ca384b4daa3fcffd5b4ce9a52d3302901bc4cbea92c88e3.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/e18e2439b3dabc8948f64bb5c0da7441fe38d9ad3a3963174d91dee500a3d8fd.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/tree.json index 803625e37..9842f0b02 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-public-http.js.snapshot/tree.json @@ -39,19 +39,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-alb-fargate.AlbToFargate", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -78,7 +78,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -122,7 +122,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -130,7 +130,7 @@ "path": "albfar-all-new-public-http/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -152,7 +152,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -171,7 +171,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -191,7 +191,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -211,7 +211,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -239,13 +239,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -289,7 +289,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -297,7 +297,7 @@ "path": "albfar-all-new-public-http/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -319,7 +319,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -338,7 +338,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -358,7 +358,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -378,7 +378,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -406,13 +406,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -456,7 +456,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -464,7 +464,7 @@ "path": "albfar-all-new-public-http/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -486,7 +486,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -505,7 +505,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -525,13 +525,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -575,7 +575,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -583,7 +583,7 @@ "path": "albfar-all-new-public-http/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -605,7 +605,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -624,7 +624,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -644,13 +644,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -669,7 +669,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -688,7 +688,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -700,13 +700,13 @@ "path": "albfar-all-new-public-http/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -722,7 +722,7 @@ "path": "albfar-all-new-public-http/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -753,7 +753,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -805,19 +805,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -841,13 +841,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -881,13 +881,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -926,13 +926,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -971,13 +971,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1024,19 +1024,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1048,7 +1048,7 @@ "path": "albfar-all-new-public-http/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1056,7 +1056,7 @@ "path": "albfar-all-new-public-http/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1064,13 +1064,13 @@ "path": "albfar-all-new-public-http/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-lb-alb": { @@ -1125,7 +1125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.143.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -1155,7 +1155,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "to albfarallnewpublichttptestconstructsg1860422C:8080": { @@ -1184,19 +1184,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupEgress", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-lb": { @@ -1237,7 +1237,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1403,13 +1403,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1421,19 +1421,19 @@ "path": "albfar-all-new-public-http/test-construct-lb/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1445,7 +1445,7 @@ "path": "albfar-all-new-public-http/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1453,7 +1453,7 @@ "path": "albfar-all-new-public-http/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1461,13 +1461,13 @@ "path": "albfar-all-new-public-http/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "albfar-all-new-public-http-ECR_API-security-group": { @@ -1523,13 +1523,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "albfar-all-new-public-http-ECR_DKR-security-group": { @@ -1585,13 +1585,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-cluster": { @@ -1607,13 +1607,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-taskdef": { @@ -1629,7 +1629,7 @@ "path": "albfar-all-new-public-http/test-construct-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1654,13 +1654,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1700,7 +1700,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-container": { @@ -1708,13 +1708,13 @@ "path": "albfar-all-new-public-http/test-construct-taskdef/test-construct-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-sg": { @@ -1742,7 +1742,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "from albfarallnewpublichttptestconstructlbalbSecurityGroupBF68816E:8080": { @@ -1771,13 +1771,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-service": { @@ -1839,13 +1839,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-target-tg": { @@ -1876,13 +1876,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1910,7 +1910,7 @@ "path": "albfar-all-new-public-http/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1918,25 +1918,25 @@ "path": "albfar-all-new-public-http/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1944,7 +1944,7 @@ "path": "albfar-all-new-public-http/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1952,13 +1952,13 @@ "path": "albfar-all-new-public-http/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1972,7 +1972,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/albfar-all-new-two-targets.assets.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/albfar-all-new-two-targets.assets.json index c25b84761..afac9f4dc 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/albfar-all-new-two-targets.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/albfar-all-new-two-targets.assets.json @@ -15,21 +15,21 @@ } } }, - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "36b10913ba3a962a9eb757d8791fd4994e705ac6650cdb9e0e044e3772ef7baf": { + "6f2067f38acd2da423010be4198125eb0e4e1d2ded8cc438247100c2c6fefb21": { "source": { "path": "albfar-all-new-two-targets.template.json", "packaging": "file" @@ -37,7 +37,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "36b10913ba3a962a9eb757d8791fd4994e705ac6650cdb9e0e044e3772ef7baf.json", + "objectKey": "6f2067f38acd2da423010be4198125eb0e4e1d2ded8cc438247100c2c6fefb21.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/albfar-all-new-two-targets.template.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/albfar-all-new-two-targets.template.json index b1e27b592..6f164bbc6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/albfar-all-new-two-targets.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/albfar-all-new-two-targets.template.json @@ -773,7 +773,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1148,7 +1148,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1159,7 +1159,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/manifest.json index e16c1ef57..aa860821e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/36b10913ba3a962a9eb757d8791fd4994e705ac6650cdb9e0e044e3772ef7baf.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/6f2067f38acd2da423010be4198125eb0e4e1d2ded8cc438247100c2c6fefb21.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/tree.json index cef837ea9..50c13660c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-fargate/test/integ.albfar-all-new-two-targets.js.snapshot/tree.json @@ -39,7 +39,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", - "version": "2.143.0" + "version": "2.147.3" } }, "albfar-all-new-two-targets-targetsRule": { @@ -78,25 +78,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListenerRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListenerRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-alb-fargate.AlbToFargate", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -123,7 +123,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -167,7 +167,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -175,7 +175,7 @@ "path": "albfar-all-new-two-targets/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -197,7 +197,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -216,7 +216,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -236,7 +236,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -256,7 +256,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -284,13 +284,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -334,7 +334,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -342,7 +342,7 @@ "path": "albfar-all-new-two-targets/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -364,7 +364,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -383,7 +383,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -403,7 +403,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -423,7 +423,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -451,13 +451,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -501,7 +501,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -509,7 +509,7 @@ "path": "albfar-all-new-two-targets/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -531,7 +531,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -550,7 +550,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -570,13 +570,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -620,7 +620,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -628,7 +628,7 @@ "path": "albfar-all-new-two-targets/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -650,7 +650,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -669,7 +669,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -689,13 +689,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -714,7 +714,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -733,7 +733,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -745,13 +745,13 @@ "path": "albfar-all-new-two-targets/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -767,7 +767,7 @@ "path": "albfar-all-new-two-targets/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -798,7 +798,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -850,19 +850,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -886,13 +886,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -926,13 +926,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -971,13 +971,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1016,13 +1016,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1069,19 +1069,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1093,7 +1093,7 @@ "path": "albfar-all-new-two-targets/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1101,7 +1101,7 @@ "path": "albfar-all-new-two-targets/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1109,13 +1109,13 @@ "path": "albfar-all-new-two-targets/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-lb-alb": { @@ -1170,7 +1170,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.143.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -1200,7 +1200,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "to albfarallnewtwotargetstestconstructsg36F92324:8080": { @@ -1229,19 +1229,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupEgress", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-lb": { @@ -1282,7 +1282,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1448,13 +1448,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1466,19 +1466,19 @@ "path": "albfar-all-new-two-targets/test-construct-lb/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1490,7 +1490,7 @@ "path": "albfar-all-new-two-targets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1498,7 +1498,7 @@ "path": "albfar-all-new-two-targets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1506,13 +1506,13 @@ "path": "albfar-all-new-two-targets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "albfar-all-new-two-targets-ECR_API-security-group": { @@ -1568,13 +1568,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "albfar-all-new-two-targets-ECR_DKR-security-group": { @@ -1630,13 +1630,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-cluster": { @@ -1652,13 +1652,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-taskdef": { @@ -1674,7 +1674,7 @@ "path": "albfar-all-new-two-targets/test-construct-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1699,13 +1699,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1745,7 +1745,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-container": { @@ -1753,13 +1753,13 @@ "path": "albfar-all-new-two-targets/test-construct-taskdef/test-construct-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-sg": { @@ -1787,7 +1787,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "from albfarallnewtwotargetstestconstructlbalbSecurityGroup07EB9DFC:8080": { @@ -1816,13 +1816,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-service": { @@ -1891,13 +1891,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-target-tg": { @@ -1928,13 +1928,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-two-construct": { @@ -1942,7 +1942,7 @@ "path": "albfar-all-new-two-targets/test-two-construct", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-alb-fargate.AlbToFargate", - "version": "2.57.0" + "version": "2.60.0" } }, "test-two-construct-target-tg": { @@ -1973,13 +1973,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -2007,7 +2007,7 @@ "path": "albfar-all-new-two-targets/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2015,25 +2015,25 @@ "path": "albfar-all-new-two-targets/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2041,7 +2041,7 @@ "path": "albfar-all-new-two-targets/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2049,13 +2049,13 @@ "path": "albfar-all-new-two-targets/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -2069,7 +2069,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/alb-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/alb-lambda.test.ts index 366e532e6..71a15e0be 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/alb-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/alb-lambda.test.ts @@ -26,7 +26,7 @@ test('Test new load balancer and new lambda function', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -86,7 +86,7 @@ test('Test new load balancer and new lambda function for HTTP api', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -135,7 +135,7 @@ test('Test existing load balancer and new lambda function', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -180,7 +180,7 @@ test('Test new load balancer and existing lambda function', () => { const lambdaFunction = new lambda.Function(stack, 'existing-function', { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', functionName: testFunctionName, vpc: testExistingVpc @@ -237,7 +237,7 @@ test("Test existing load balancer and existing lambda function", () => { const lambdaFunction = new lambda.Function(stack, "existing-function", { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", functionName: testFunctionName, vpc: testExistingVpc, @@ -291,7 +291,7 @@ test('Test new load balancer and new lambda function', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', functionName: testFunctionName, }, @@ -338,7 +338,7 @@ test('Test HTTPS adding 2 lambda targets, second with rules', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -351,7 +351,7 @@ test('Test HTTPS adding 2 lambda targets, second with rules', () => { const secondProps: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, ruleProps: { @@ -408,7 +408,7 @@ test('Test HTTP adding 2 lambda targets, second with rules', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -421,7 +421,7 @@ test('Test HTTP adding 2 lambda targets, second with rules', () => { const secondProps: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, ruleProps: { @@ -478,7 +478,7 @@ test('Test new load balancer and new lambda function', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -521,7 +521,7 @@ test('Test logging turned off', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -548,7 +548,7 @@ test('Check Properties', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -573,7 +573,7 @@ test('Test custom ALB properties', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -617,7 +617,7 @@ test('Test custom logging bucket', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -664,7 +664,7 @@ test('Test providing certificateArns is an error', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -692,7 +692,7 @@ test('Test logging off with logBucketProperties provided is an error', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -721,7 +721,7 @@ test('Test certificate with HTTP is an error', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -744,7 +744,7 @@ test('Test new ALB with no listenerProps is an error', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, publicApi: true @@ -772,7 +772,7 @@ test('Test existing ALB with no listener with no listenerProps is an error', () const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingLoadBalancerObj: existingAlb, @@ -794,7 +794,7 @@ test('Test existing ALB with a listener with listenerProps is an error', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -807,7 +807,7 @@ test('Test existing ALB with a listener with listenerProps is an error', () => { const secondProps: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, ruleProps: { @@ -837,7 +837,7 @@ test('Test second target with no rules is an error', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -850,7 +850,7 @@ test('Test second target with no rules is an error', () => { const secondProps: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingVpc: firstConstruct.vpc, @@ -872,7 +872,7 @@ test('Test no cert for an HTTPS listener is an error', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -901,7 +901,7 @@ test('Test existingLoadBalancerObj and loadBalancerProps is an error', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -936,7 +936,7 @@ test('Test existingLoadBalancerObj and no existingVpc is an error', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -961,7 +961,7 @@ test('Confirm that CheckLambdaProps is called', () => { const lambdaFunction = new lambda.Function(stack, 'existing-function', { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', functionName: 'name', vpc: testExistingVpc @@ -970,7 +970,7 @@ test('Confirm that CheckLambdaProps is called', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingLambdaObj: lambdaFunction, @@ -995,7 +995,7 @@ test('Confirm that CheckVpcProps is called', () => { const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -1030,7 +1030,7 @@ test('Confirm that CheckAlbProps is called', () => { existingVpc, lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/alblam-privateApiExistingResources.assets.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/alblam-privateApiExistingResources.assets.json index f0ed94465..1fb390bc9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/alblam-privateApiExistingResources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/alblam-privateApiExistingResources.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } @@ -29,21 +29,21 @@ } } }, - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "6d25fed1bcf5f575cbf8981292474df33b28f2c42ca40b0cf8e43b7e95ee25f8": { + "fc15d092b21339a09a6f46df61ea1b5446a05aa11a7300917cff4974a53aef55": { "source": { "path": "alblam-privateApiExistingResources.template.json", "packaging": "file" @@ -51,7 +51,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "6d25fed1bcf5f575cbf8981292474df33b28f2c42ca40b0cf8e43b7e95ee25f8.json", + "objectKey": "fc15d092b21339a09a6f46df61ea1b5446a05aa11a7300917cff4974a53aef55.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/alblam-privateApiExistingResources.template.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/alblam-privateApiExistingResources.template.json index 84e3df13f..1ce8acd05 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/alblam-privateApiExistingResources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/alblam-privateApiExistingResources.template.json @@ -615,7 +615,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -626,7 +626,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -794,7 +794,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1197,7 +1197,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1208,7 +1208,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js similarity index 63% rename from source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js rename to source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js index 5a1714e02..c6d62cd07 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/manifest.json index 3d9331936..9136dd6ae 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/6d25fed1bcf5f575cbf8981292474df33b28f2c42ca40b0cf8e43b7e95ee25f8.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/fc15d092b21339a09a6f46df61ea1b5446a05aa11a7300917cff4974a53aef55.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/tree.json index 94d069c8a..5c9554071 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "alblam-privateApiExistingResources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "alblam-privateApiExistingResources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "alblam-privateApiExistingResources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "alblam-privateApiExistingResources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "alblam-privateApiExistingResources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "alblam-privateApiExistingResources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,19 +835,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -859,7 +859,7 @@ "path": "alblam-privateApiExistingResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -867,7 +867,7 @@ "path": "alblam-privateApiExistingResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -875,13 +875,13 @@ "path": "alblam-privateApiExistingResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "lambda-sg": { @@ -911,13 +911,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -929,7 +929,7 @@ "path": "alblam-privateApiExistingResources/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -992,7 +992,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1033,19 +1033,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1061,7 +1061,7 @@ "path": "alblam-privateApiExistingResources/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1069,13 +1069,13 @@ "path": "alblam-privateApiExistingResources/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1102,7 +1102,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -1128,7 +1128,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } }, "Invoke2UTWxhlfyqbT5FTn--5jvgbLgj+FfJwzswGk55DU1H--Y=": { @@ -1149,13 +1149,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "existing-alb-alb": { @@ -1210,7 +1210,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -1249,19 +1249,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "existing-alb": { @@ -1302,7 +1302,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -1468,13 +1468,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1486,19 +1486,19 @@ "path": "alblam-privateApiExistingResources/existing-alb/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1510,7 +1510,7 @@ "path": "alblam-privateApiExistingResources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1518,7 +1518,7 @@ "path": "alblam-privateApiExistingResources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1526,13 +1526,13 @@ "path": "alblam-privateApiExistingResources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-one": { @@ -1566,13 +1566,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", - "version": "2.118.0" + "version": "2.147.3" } }, "tg2-tg": { @@ -1600,19 +1600,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-alb-lambda.AlbToLambda", - "version": "2.51.0" + "version": "2.60.0" } }, "Integ": { @@ -1640,7 +1640,7 @@ "path": "alblam-privateApiExistingResources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1648,25 +1648,25 @@ "path": "alblam-privateApiExistingResources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1674,7 +1674,7 @@ "path": "alblam-privateApiExistingResources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1682,13 +1682,13 @@ "path": "alblam-privateApiExistingResources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1702,7 +1702,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.ts b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.ts index 19a82e45c..00f145ece 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.ts +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.ts @@ -38,7 +38,7 @@ const testSg = new SecurityGroup(stack, 'lambda-sg', { vpc: myVpc, allowAllOutbo const lambdaFunction = defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', vpc: myVpc, securityGroups: [ testSg ] diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/alblam-privateApiNewResources.assets.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/alblam-privateApiNewResources.assets.json index 0e5f9a0bc..be6982944 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/alblam-privateApiNewResources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/alblam-privateApiNewResources.assets.json @@ -1,29 +1,29 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } @@ -43,7 +43,7 @@ } } }, - "331f13989267d9e44d455118196feef5d69dac7f6376e92093ff09ed055674c0": { + "5c36dcec7216d485035b2323dff4281fc421cd14a62249738d62db032e0d4c32": { "source": { "path": "alblam-privateApiNewResources.template.json", "packaging": "file" @@ -51,7 +51,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "331f13989267d9e44d455118196feef5d69dac7f6376e92093ff09ed055674c0.json", + "objectKey": "5c36dcec7216d485035b2323dff4281fc421cd14a62249738d62db032e0d4c32.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/alblam-privateApiNewResources.template.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/alblam-privateApiNewResources.template.json index 956429bdd..9ec2c015e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/alblam-privateApiNewResources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/alblam-privateApiNewResources.template.json @@ -451,7 +451,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -898,7 +898,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -909,7 +909,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -963,7 +963,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -974,7 +974,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js similarity index 63% rename from source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js rename to source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js index 5a1714e02..c6d62cd07 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/manifest.json index ae8b07454..65c803583 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/331f13989267d9e44d455118196feef5d69dac7f6376e92093ff09ed055674c0.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/5c36dcec7216d485035b2323dff4281fc421cd14a62249738d62db032e0d4c32.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/tree.json index 7276f99f4..9e61a9db4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.js.snapshot/tree.json @@ -64,7 +64,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -103,19 +103,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "test-one": { @@ -156,7 +156,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -322,13 +322,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -340,19 +340,19 @@ "path": "alblam-privateApiNewResources/test-one/test-one/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -364,7 +364,7 @@ "path": "alblam-privateApiNewResources/test-one/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -427,7 +427,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -468,19 +468,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -508,13 +508,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -530,7 +530,7 @@ "path": "alblam-privateApiNewResources/test-one/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -538,13 +538,13 @@ "path": "alblam-privateApiNewResources/test-one/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -571,7 +571,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -597,7 +597,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } }, "Invoke2UTWxhlfyqbT5FTn--5jvgbLgj+FfJwzswGk55DU1H--Y=": { @@ -618,13 +618,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "test-one-listener": { @@ -654,13 +654,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", - "version": "2.118.0" + "version": "2.147.3" } }, "tg2-tg": { @@ -688,19 +688,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-alb-lambda.AlbToLambda", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -727,7 +727,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -771,7 +771,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -779,7 +779,7 @@ "path": "alblam-privateApiNewResources/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -801,7 +801,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -820,13 +820,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -870,7 +870,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -878,7 +878,7 @@ "path": "alblam-privateApiNewResources/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -900,7 +900,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -919,13 +919,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -937,13 +937,13 @@ "path": "alblam-privateApiNewResources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -959,7 +959,7 @@ "path": "alblam-privateApiNewResources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -990,7 +990,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1042,19 +1042,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1078,13 +1078,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1118,19 +1118,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1142,7 +1142,7 @@ "path": "alblam-privateApiNewResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1150,7 +1150,7 @@ "path": "alblam-privateApiNewResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1158,13 +1158,13 @@ "path": "alblam-privateApiNewResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1176,7 +1176,7 @@ "path": "alblam-privateApiNewResources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1184,7 +1184,7 @@ "path": "alblam-privateApiNewResources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1192,13 +1192,13 @@ "path": "alblam-privateApiNewResources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1226,7 +1226,7 @@ "path": "alblam-privateApiNewResources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1234,25 +1234,25 @@ "path": "alblam-privateApiNewResources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1260,7 +1260,7 @@ "path": "alblam-privateApiNewResources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1268,13 +1268,13 @@ "path": "alblam-privateApiNewResources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1288,7 +1288,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.ts b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.ts index 02456e45f..a543123eb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.ts +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiNewResources.ts @@ -34,7 +34,7 @@ stack.templateOptions.description = 'Integration Test for HTTP API with a new fu const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/alblam-publicApiExistingResources.assets.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/alblam-publicApiExistingResources.assets.json index 5df109bc9..990d92743 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/alblam-publicApiExistingResources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/alblam-publicApiExistingResources.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } @@ -29,21 +29,21 @@ } } }, - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "2a47768de6b3106e95e6fd8b98efed4e15d840d0a61b2017cfd0eccdce7050eb": { + "dba88e88eaf0a4fd2dfa94d89e5dffb78f753cb50f7b8f195ec8110037b20ca4": { "source": { "path": "alblam-publicApiExistingResources.template.json", "packaging": "file" @@ -51,7 +51,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "2a47768de6b3106e95e6fd8b98efed4e15d840d0a61b2017cfd0eccdce7050eb.json", + "objectKey": "dba88e88eaf0a4fd2dfa94d89e5dffb78f753cb50f7b8f195ec8110037b20ca4.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/alblam-publicApiExistingResources.template.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/alblam-publicApiExistingResources.template.json index 305b2f190..2bf190e5e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/alblam-publicApiExistingResources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/alblam-publicApiExistingResources.template.json @@ -615,7 +615,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -626,7 +626,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -794,7 +794,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1197,7 +1197,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1208,7 +1208,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js similarity index 63% rename from source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js rename to source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js index 5a1714e02..c6d62cd07 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/manifest.json index 340415e85..d64933f94 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/2a47768de6b3106e95e6fd8b98efed4e15d840d0a61b2017cfd0eccdce7050eb.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/dba88e88eaf0a4fd2dfa94d89e5dffb78f753cb50f7b8f195ec8110037b20ca4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/tree.json index cbddc8002..b43770c29 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "alblam-publicApiExistingResources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "alblam-publicApiExistingResources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "alblam-publicApiExistingResources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "alblam-publicApiExistingResources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "alblam-publicApiExistingResources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "alblam-publicApiExistingResources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,19 +835,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -859,7 +859,7 @@ "path": "alblam-publicApiExistingResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -867,7 +867,7 @@ "path": "alblam-publicApiExistingResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -875,13 +875,13 @@ "path": "alblam-publicApiExistingResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "lambda-sg": { @@ -911,13 +911,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -929,7 +929,7 @@ "path": "alblam-publicApiExistingResources/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -992,7 +992,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1033,19 +1033,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1061,7 +1061,7 @@ "path": "alblam-publicApiExistingResources/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1069,13 +1069,13 @@ "path": "alblam-publicApiExistingResources/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1102,7 +1102,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -1128,7 +1128,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } }, "Invoke2UTWxhlfyqbT5FTn--5jvgbLgj+FfJwzswGk55DU1H--Y=": { @@ -1149,13 +1149,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "existing-alb-alb": { @@ -1210,7 +1210,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -1249,19 +1249,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "existing-alb": { @@ -1302,7 +1302,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -1468,13 +1468,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1486,19 +1486,19 @@ "path": "alblam-publicApiExistingResources/existing-alb/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1510,7 +1510,7 @@ "path": "alblam-publicApiExistingResources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1518,7 +1518,7 @@ "path": "alblam-publicApiExistingResources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1526,13 +1526,13 @@ "path": "alblam-publicApiExistingResources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-one": { @@ -1566,13 +1566,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", - "version": "2.118.0" + "version": "2.147.3" } }, "tg2-tg": { @@ -1600,19 +1600,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-alb-lambda.AlbToLambda", - "version": "2.51.0" + "version": "2.60.0" } }, "Integ": { @@ -1640,7 +1640,7 @@ "path": "alblam-publicApiExistingResources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1648,25 +1648,25 @@ "path": "alblam-publicApiExistingResources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1674,7 +1674,7 @@ "path": "alblam-publicApiExistingResources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1682,13 +1682,13 @@ "path": "alblam-publicApiExistingResources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1702,7 +1702,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.ts b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.ts index b539af019..39cb2a81b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.ts +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiExistingResources.ts @@ -42,7 +42,7 @@ const testSg = new SecurityGroup(stack, "lambda-sg", { const lambdaFunction = defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", vpc: myVpc, securityGroups: [testSg], diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/alblam-publicApiNewResources.assets.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/alblam-publicApiNewResources.assets.json index c7be0119e..019985b85 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/alblam-publicApiNewResources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/alblam-publicApiNewResources.assets.json @@ -1,29 +1,29 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } @@ -43,7 +43,7 @@ } } }, - "c7e6cdd71ecbda5084c911b9c8c799ced4cdeb2c2e1386888572bd58fa0d9fe4": { + "7345fd048d981c6de6e453438d3953ba8a9d92aebd4fdfbd3dd06035213c53bd": { "source": { "path": "alblam-publicApiNewResources.template.json", "packaging": "file" @@ -51,7 +51,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "c7e6cdd71ecbda5084c911b9c8c799ced4cdeb2c2e1386888572bd58fa0d9fe4.json", + "objectKey": "7345fd048d981c6de6e453438d3953ba8a9d92aebd4fdfbd3dd06035213c53bd.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/alblam-publicApiNewResources.template.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/alblam-publicApiNewResources.template.json index d482cffeb..fe114a506 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/alblam-publicApiNewResources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/alblam-publicApiNewResources.template.json @@ -455,7 +455,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1188,7 +1188,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1199,7 +1199,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1253,7 +1253,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1264,7 +1264,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js similarity index 63% rename from source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js rename to source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js index 5a1714e02..c6d62cd07 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-privateApiExistingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/manifest.json index 37b2f460e..105882e52 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/c7e6cdd71ecbda5084c911b9c8c799ced4cdeb2c2e1386888572bd58fa0d9fe4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/7345fd048d981c6de6e453438d3953ba8a9d92aebd4fdfbd3dd06035213c53bd.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/tree.json index b79c24c69..ae3abbae9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.js.snapshot/tree.json @@ -64,7 +64,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -103,19 +103,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "test-one": { @@ -156,7 +156,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -322,13 +322,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -340,19 +340,19 @@ "path": "alblam-publicApiNewResources/test-one/test-one/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -364,7 +364,7 @@ "path": "alblam-publicApiNewResources/test-one/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -427,7 +427,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -468,19 +468,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -508,13 +508,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -530,7 +530,7 @@ "path": "alblam-publicApiNewResources/test-one/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -538,13 +538,13 @@ "path": "alblam-publicApiNewResources/test-one/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -571,7 +571,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -597,7 +597,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } }, "Invoke2UTWxhlfyqbT5FTn--5jvgbLgj+FfJwzswGk55DU1H--Y=": { @@ -618,13 +618,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "test-one-listener": { @@ -654,13 +654,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", - "version": "2.118.0" + "version": "2.147.3" } }, "tg2-tg": { @@ -688,19 +688,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-alb-lambda.AlbToLambda", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -727,7 +727,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -771,7 +771,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -779,7 +779,7 @@ "path": "alblam-publicApiNewResources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -801,7 +801,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -820,7 +820,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -840,7 +840,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -860,7 +860,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -888,13 +888,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -938,7 +938,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -946,7 +946,7 @@ "path": "alblam-publicApiNewResources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -968,7 +968,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -987,7 +987,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1007,7 +1007,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -1027,7 +1027,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -1055,13 +1055,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -1105,7 +1105,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1113,7 +1113,7 @@ "path": "alblam-publicApiNewResources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1135,7 +1135,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1154,7 +1154,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1174,13 +1174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -1224,7 +1224,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1232,7 +1232,7 @@ "path": "alblam-publicApiNewResources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1254,7 +1254,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1273,7 +1273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1293,13 +1293,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -1318,7 +1318,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -1337,7 +1337,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1349,13 +1349,13 @@ "path": "alblam-publicApiNewResources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1371,7 +1371,7 @@ "path": "alblam-publicApiNewResources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1402,7 +1402,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1454,19 +1454,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1490,13 +1490,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1530,19 +1530,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1554,7 +1554,7 @@ "path": "alblam-publicApiNewResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1562,7 +1562,7 @@ "path": "alblam-publicApiNewResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1570,13 +1570,13 @@ "path": "alblam-publicApiNewResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1588,7 +1588,7 @@ "path": "alblam-publicApiNewResources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1596,7 +1596,7 @@ "path": "alblam-publicApiNewResources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1604,13 +1604,13 @@ "path": "alblam-publicApiNewResources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1638,7 +1638,7 @@ "path": "alblam-publicApiNewResources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1646,25 +1646,25 @@ "path": "alblam-publicApiNewResources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1672,7 +1672,7 @@ "path": "alblam-publicApiNewResources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1680,13 +1680,13 @@ "path": "alblam-publicApiNewResources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1700,7 +1700,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.ts b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.ts index 2889503bf..fb6c1fc18 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.ts +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-publicApiNewResources.ts @@ -34,7 +34,7 @@ stack.templateOptions.description = 'Integration Test for public HTTP API with a const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/alblam-twoTargets.assets.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/alblam-twoTargets.assets.json index 6e038b1b7..ba7594972 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/alblam-twoTargets.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/alblam-twoTargets.assets.json @@ -1,29 +1,29 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } @@ -43,7 +43,7 @@ } } }, - "8987124dd24096cf6c2f839480e11bca88c02b02ede756c306c1761c90b7bc6c": { + "e48bfea79124efef797a005dd275f20b73f7ac785a922e913e4baa117228dd54": { "source": { "path": "alblam-twoTargets.template.json", "packaging": "file" @@ -51,7 +51,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "8987124dd24096cf6c2f839480e11bca88c02b02ede756c306c1761c90b7bc6c.json", + "objectKey": "e48bfea79124efef797a005dd275f20b73f7ac785a922e913e4baa117228dd54.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/alblam-twoTargets.template.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/alblam-twoTargets.template.json index cf5658ed8..6e6885929 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/alblam-twoTargets.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/alblam-twoTargets.template.json @@ -455,7 +455,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1215,7 +1215,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1226,7 +1226,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1280,7 +1280,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1291,7 +1291,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", @@ -1472,7 +1472,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/manifest.json index ae96d121c..22d99093c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/8987124dd24096cf6c2f839480e11bca88c02b02ede756c306c1761c90b7bc6c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/e48bfea79124efef797a005dd275f20b73f7ac785a922e913e4baa117228dd54.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/tree.json index 2c6e4c6f6..21a1cbe2b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.js.snapshot/tree.json @@ -64,7 +64,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -103,19 +103,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "test-one": { @@ -156,7 +156,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -322,13 +322,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -340,19 +340,19 @@ "path": "alblam-twoTargets/test-one/test-one/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -364,7 +364,7 @@ "path": "alblam-twoTargets/test-one/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -427,7 +427,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -468,19 +468,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -508,13 +508,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -530,7 +530,7 @@ "path": "alblam-twoTargets/test-one/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -538,13 +538,13 @@ "path": "alblam-twoTargets/test-one/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -571,7 +571,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -597,7 +597,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } }, "Invoke2UTWxhlfyqbT5FTn--5jvgbLgj+FfJwzswGk55DU1H--Y=": { @@ -618,13 +618,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "test-one-listener": { @@ -654,7 +654,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListener", - "version": "2.118.0" + "version": "2.147.3" } }, "test-two-targetsRule": { @@ -693,19 +693,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnListenerRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListenerRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationListener", - "version": "2.118.0" + "version": "2.147.3" } }, "tg2-tg": { @@ -733,19 +733,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-alb-lambda.AlbToLambda", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -772,7 +772,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -816,7 +816,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -824,7 +824,7 @@ "path": "alblam-twoTargets/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -846,7 +846,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -865,7 +865,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -885,7 +885,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -905,7 +905,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -933,13 +933,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -983,7 +983,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -991,7 +991,7 @@ "path": "alblam-twoTargets/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1013,7 +1013,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1032,7 +1032,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1052,7 +1052,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -1072,7 +1072,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -1100,13 +1100,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -1150,7 +1150,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1158,7 +1158,7 @@ "path": "alblam-twoTargets/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1180,7 +1180,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1199,7 +1199,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1219,13 +1219,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -1269,7 +1269,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1277,7 +1277,7 @@ "path": "alblam-twoTargets/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1299,7 +1299,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1318,7 +1318,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1338,13 +1338,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -1363,7 +1363,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -1382,7 +1382,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1394,13 +1394,13 @@ "path": "alblam-twoTargets/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1416,7 +1416,7 @@ "path": "alblam-twoTargets/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1447,7 +1447,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1499,19 +1499,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1535,13 +1535,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1575,19 +1575,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1599,7 +1599,7 @@ "path": "alblam-twoTargets/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1607,7 +1607,7 @@ "path": "alblam-twoTargets/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1615,13 +1615,13 @@ "path": "alblam-twoTargets/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1633,7 +1633,7 @@ "path": "alblam-twoTargets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1641,7 +1641,7 @@ "path": "alblam-twoTargets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1649,13 +1649,13 @@ "path": "alblam-twoTargets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-two": { @@ -1671,7 +1671,7 @@ "path": "alblam-twoTargets/test-two/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1734,7 +1734,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1775,19 +1775,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -1815,13 +1815,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1837,7 +1837,7 @@ "path": "alblam-twoTargets/test-two/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1845,13 +1845,13 @@ "path": "alblam-twoTargets/test-two/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1878,7 +1878,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -1904,7 +1904,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } }, "Invoke2UTWxhlfyqbT5FTn--5jvgbLgj+FfJwzswGk55DU1H--Y=": { @@ -1925,13 +1925,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "tg2-tg": { @@ -1959,19 +1959,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnTargetGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationTargetGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-alb-lambda.AlbToLambda", - "version": "2.51.0" + "version": "2.60.0" } }, "Integ": { @@ -1999,7 +1999,7 @@ "path": "alblam-twoTargets/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2007,25 +2007,25 @@ "path": "alblam-twoTargets/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2033,7 +2033,7 @@ "path": "alblam-twoTargets/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2041,13 +2041,13 @@ "path": "alblam-twoTargets/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -2061,7 +2061,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.ts b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.ts index 9cce6c041..f74c7f2a0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.ts +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.alblam-twoTargets.ts @@ -35,7 +35,7 @@ stack.templateOptions.description = 'Integration test for alb with 2 Lambda targ const props: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, listenerProps: { @@ -52,7 +52,7 @@ const firstConstruct = new AlbToLambda(stack, 'test-one', props); const secondProps: AlbToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, ruleProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.assets.json index af4100768..0069e2a4e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "834538c50b1bd0b34e421388d75e1dfee5f895686fa183e9de4413f91c733375": { + "8143d13b5adfb439f4d1009bf8de9dc32c2c4137c82615a9c3a83c9c7751f22d": { "source": { "path": "apilam-deployFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "834538c50b1bd0b34e421388d75e1dfee5f895686fa183e9de4413f91c733375.json", + "objectKey": "8143d13b5adfb439f4d1009bf8de9dc32c2c4137c82615a9c3a83c9c7751f22d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.template.json index 1e6f53bf7..3baf613d1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.template.json @@ -111,7 +111,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/manifest.json index 46396ad94..874e43593 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/manifest.json @@ -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}/834538c50b1bd0b34e421388d75e1dfee5f895686fa183e9de4413f91c733375.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8143d13b5adfb439f4d1009bf8de9dc32c2c4137c82615a9c3a83c9c7751f22d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/tree.json index 6bbd2bd51..72d6a758a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "apilam-deployFunction/test-apigateway-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -120,19 +120,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -148,7 +148,7 @@ "path": "apilam-deployFunction/test-apigateway-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -156,13 +156,13 @@ "path": "apilam-deployFunction/test-apigateway-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -189,7 +189,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -197,13 +197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiAccessLogGroup": { @@ -219,13 +219,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaRestApi": { @@ -248,7 +248,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "Deployment": { @@ -269,13 +269,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.118.0" + "version": "2.145.0" } }, "DeploymentStage.prod": { @@ -317,13 +317,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.118.0" + "version": "2.145.0" } }, "Endpoint": { @@ -331,7 +331,7 @@ "path": "apilam-deployFunction/test-apigateway-lambda/LambdaRestApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.118.0" + "version": "2.145.0" } }, "Default": { @@ -362,7 +362,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -415,7 +415,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.apilamdeployFunctiontestapigatewaylambdaLambdaRestApiAF929C5F.ANY..{proxy+}": { @@ -460,7 +460,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -508,19 +508,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ProxyResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -573,7 +573,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.apilamdeployFunctiontestapigatewaylambdaLambdaRestApiAF929C5F.ANY..": { @@ -618,7 +618,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -669,19 +669,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.118.0" + "version": "2.145.0" } }, "UsagePlan": { @@ -709,19 +709,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnUsagePlan", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.UsagePlan", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.LambdaRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaRestApiCloudWatchRole": { @@ -733,7 +733,7 @@ "path": "apilam-deployFunction/test-apigateway-lambda/LambdaRestApiCloudWatchRole/ImportLambdaRestApiCloudWatchRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -800,13 +800,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaRestApiAccount": { @@ -825,13 +825,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAccount", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-apigateway-lambda.ApiGatewayToLambda", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -847,7 +847,7 @@ "path": "apilam-deployFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -859,7 +859,7 @@ "path": "apilam-deployFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -867,25 +867,25 @@ "path": "apilam-deployFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -893,7 +893,7 @@ "path": "apilam-deployFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -901,13 +901,13 @@ "path": "apilam-deployFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -915,13 +915,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.ts b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.ts index 16fcb3940..106286695 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-deployFunction.ts @@ -16,6 +16,7 @@ import { App, Stack } from "aws-cdk-lib"; import { ApiGatewayToLambda, ApiGatewayToLambdaProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; +import * as defaults from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; // Setup @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-apigateway-lambda' // Definitions const props: ApiGatewayToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.assets.json index e60c19a2c..5b2a435e6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "78e827f281035db1c86a00fd6a2a077db91df9d4da007adc154d742647faf1bd": { + "0720359c10769546316ccab1fa351967501481d282c5c77b0ad9389b0d8b7a18": { "source": { "path": "apilam-existingFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "78e827f281035db1c86a00fd6a2a077db91df9d4da007adc154d742647faf1bd.json", + "objectKey": "0720359c10769546316ccab1fa351967501481d282c5c77b0ad9389b0d8b7a18.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.template.json index 197e5c1ec..2b0942454 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.template.json @@ -111,7 +111,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/manifest.json index ef73cdc7f..614d785a6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/manifest.json @@ -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}/78e827f281035db1c86a00fd6a2a077db91df9d4da007adc154d742647faf1bd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0720359c10769546316ccab1fa351967501481d282c5c77b0ad9389b0d8b7a18.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/tree.json index 533109c2f..d919de4fc 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "apilam-existingFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -116,19 +116,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -144,7 +144,7 @@ "path": "apilam-existingFunction/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -152,13 +152,13 @@ "path": "apilam-existingFunction/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -185,7 +185,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "test-apigateway-lambda": { @@ -219,13 +219,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaRestApi": { @@ -248,7 +248,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "Deployment": { @@ -269,13 +269,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.118.0" + "version": "2.145.0" } }, "DeploymentStage.prod": { @@ -317,13 +317,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.118.0" + "version": "2.145.0" } }, "Endpoint": { @@ -331,7 +331,7 @@ "path": "apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.118.0" + "version": "2.145.0" } }, "Default": { @@ -362,7 +362,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -415,7 +415,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.apilamexistingFunctiontestapigatewaylambdaLambdaRestApiEC1EB7CD.ANY..{proxy+}": { @@ -460,7 +460,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -508,19 +508,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ProxyResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -573,7 +573,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.apilamexistingFunctiontestapigatewaylambdaLambdaRestApiEC1EB7CD.ANY..": { @@ -618,7 +618,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -669,19 +669,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.118.0" + "version": "2.145.0" } }, "UsagePlan": { @@ -709,19 +709,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnUsagePlan", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.UsagePlan", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.LambdaRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaRestApiCloudWatchRole": { @@ -733,7 +733,7 @@ "path": "apilam-existingFunction/test-apigateway-lambda/LambdaRestApiCloudWatchRole/ImportLambdaRestApiCloudWatchRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -800,13 +800,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaRestApiAccount": { @@ -825,13 +825,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAccount", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-apigateway-lambda.ApiGatewayToLambda", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -847,7 +847,7 @@ "path": "apilam-existingFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -859,7 +859,7 @@ "path": "apilam-existingFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -867,25 +867,25 @@ "path": "apilam-existingFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -893,7 +893,7 @@ "path": "apilam-existingFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -901,13 +901,13 @@ "path": "apilam-existingFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -915,13 +915,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.ts b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.ts index 2fa38fd84..4888bf768 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/integ.apilam-existingFunction.ts @@ -26,7 +26,7 @@ stack.templateOptions.description = 'Integration Test for aws-apigateway-lambda' // Lambda function setup const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/test.apigateway-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/test.apigateway-lambda.test.ts index 784eb57c5..190624927 100644 --- a/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/test.apigateway-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/test/test.apigateway-lambda.test.ts @@ -36,7 +36,7 @@ test('Test with lambdaFunctionProps', () => { const stack = new Stack(); const props: ApiGatewayToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -65,7 +65,7 @@ test('Test properties', () => { const stack = new Stack(); const props: ApiGatewayToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } @@ -102,7 +102,7 @@ test('Test deployment ApiGateway AuthorizationType override', () => { } }, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } @@ -124,7 +124,7 @@ test('Test deployment ApiGateway override cloudWatchRole = false', () => { cloudWatchRole: false }, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } @@ -137,14 +137,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: ApiGatewayToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/cftaplam-customCloudfrontLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/cftaplam-customCloudfrontLoggingBucket.assets.json index 49ea3db57..9b95ac96c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/cftaplam-customCloudfrontLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/cftaplam-customCloudfrontLoggingBucket.assets.json @@ -14,20 +14,20 @@ } } }, - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "409f1d92c2c828db7a452f09ace3220bed11bfd0fd84d40d16ae10977ba25d19": { + "d522838303274b241137482069e00a5147f3d91cb70ecdb68a13c77ccb6c11c6": { "source": { "path": "cftaplam-customCloudfrontLoggingBucket.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "409f1d92c2c828db7a452f09ace3220bed11bfd0fd84d40d16ae10977ba25d19.json", + "objectKey": "d522838303274b241137482069e00a5147f3d91cb70ecdb68a13c77ccb6c11c6.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/cftaplam-customCloudfrontLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/cftaplam-customCloudfrontLoggingBucket.template.json index 43803ba97..6474963b5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/cftaplam-customCloudfrontLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/cftaplam-customCloudfrontLoggingBucket.template.json @@ -48,7 +48,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "cftaplamcustomCloudfrontLoggingBucketauthorizerAuthFunctionServiceRole00AAA44C" @@ -283,7 +283,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -1164,7 +1164,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1175,7 +1175,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1240,6 +1248,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/manifest.json index 5c4115a6e..3de70baa9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/manifest.json @@ -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}/409f1d92c2c828db7a452f09ace3220bed11bfd0fd84d40d16ae10977ba25d19.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d522838303274b241137482069e00a5147f3d91cb70ecdb68a13c77ccb6c11c6.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -256,6 +256,12 @@ "data": "cfapigwlambdaCloudFrontToApiGatewayCloudFrontDistributionF8B75200" } ], + "/cftaplam-customCloudfrontLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cftaplam-customCloudfrontLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -279,15 +285,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "cfapigwlambdaCloudFrontToApiGatewayCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResource296BC002": [ - { - "type": "aws:cdk:logicalId", - "data": "cfapigwlambdaCloudFrontToApiGatewayCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResource296BC002", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "cftaplam-customCloudfrontLoggingBucket" diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/tree.json index 653193506..cf00ff635 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "cftaplam-customCloudfrontLoggingBucket/cftaplam-customCloudfrontLoggingBucket-authorizerAuthFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -60,13 +60,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Code": { @@ -78,7 +78,7 @@ "path": "cftaplam-customCloudfrontLoggingBucket/cftaplam-customCloudfrontLoggingBucket-authorizerAuthFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -86,13 +86,13 @@ "path": "cftaplam-customCloudfrontLoggingBucket/cftaplam-customCloudfrontLoggingBucket-authorizerAuthFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -114,12 +114,12 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } }, "cftaplamcustomCloudfrontLoggingBucketcftaplamcustomCloudfrontLoggingBucketauthorizer02C97B0F:Permissions": { @@ -167,13 +167,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "cftaplam-customCloudfrontLoggingBucket-authorizer": { @@ -246,13 +246,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAuthorizer", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.RequestAuthorizer", - "version": "2.143.0" + "version": "2.147.3" } }, "cf-apigw-lambda": { @@ -268,7 +268,7 @@ "path": "cftaplam-customCloudfrontLoggingBucket/cf-apigw-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -331,7 +331,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -367,19 +367,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -395,7 +395,7 @@ "path": "cftaplam-customCloudfrontLoggingBucket/cf-apigw-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -403,13 +403,13 @@ "path": "cftaplam-customCloudfrontLoggingBucket/cf-apigw-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -436,7 +436,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -444,13 +444,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "ApiAccessLogGroup": { @@ -466,13 +466,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaRestApi": { @@ -495,7 +495,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.143.0" + "version": "2.147.3" } }, "Deployment": { @@ -516,13 +516,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.143.0" + "version": "2.147.3" } }, "DeploymentStage.prod": { @@ -564,13 +564,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.143.0" + "version": "2.147.3" } }, "Endpoint": { @@ -578,7 +578,7 @@ "path": "cftaplam-customCloudfrontLoggingBucket/cf-apigw-lambda/LambdaRestApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.143.0" + "version": "2.147.3" } }, "Default": { @@ -609,7 +609,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "ANY": { @@ -662,7 +662,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "ApiPermission.Test.cftaplamcustomCloudfrontLoggingBucketcfapigwlambdaLambdaRestApi92F6CCCC.ANY..{proxy+}": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -758,19 +758,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ProxyResource", - "version": "2.143.0" + "version": "2.147.3" } }, "ANY": { @@ -823,7 +823,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "ApiPermission.Test.cftaplamcustomCloudfrontLoggingBucketcfapigwlambdaLambdaRestApi92F6CCCC.ANY..": { @@ -868,7 +868,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -922,19 +922,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.143.0" + "version": "2.147.3" } }, "UsagePlan": { @@ -962,19 +962,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnUsagePlan", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.UsagePlan", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.LambdaRestApi", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaRestApiCloudWatchRole": { @@ -986,7 +986,7 @@ "path": "cftaplam-customCloudfrontLoggingBucket/cf-apigw-lambda/LambdaRestApiCloudWatchRole/ImportLambdaRestApiCloudWatchRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1053,13 +1053,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaRestApiAccount": { @@ -1078,7 +1078,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAccount", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontToApiGateway": { @@ -1106,13 +1106,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -1147,7 +1147,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1242,19 +1242,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -1307,7 +1307,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1405,13 +1405,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1423,19 +1423,19 @@ "path": "cftaplam-customCloudfrontLoggingBucket/cf-apigw-lambda/CloudFrontToApiGateway/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -1557,25 +1557,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-apigateway.CloudFrontToApiGateway", - "version": "2.58.1" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-apigateway-lambda.CloudFrontToApiGatewayToLambda", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cftaplam-customCloudfrontLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1587,7 +1595,7 @@ "path": "cftaplam-customCloudfrontLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1595,7 +1603,7 @@ "path": "cftaplam-customCloudfrontLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1603,13 +1611,13 @@ "path": "cftaplam-customCloudfrontLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1637,7 +1645,7 @@ "path": "cftaplam-customCloudfrontLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1645,25 +1653,25 @@ "path": "cftaplam-customCloudfrontLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1671,7 +1679,7 @@ "path": "cftaplam-customCloudfrontLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1679,13 +1687,13 @@ "path": "cftaplam-customCloudfrontLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1699,7 +1707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.ts b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.ts index c34b89242..fa0056313 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.ts +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-customCloudfrontLoggingBucket.ts @@ -19,6 +19,7 @@ import { BucketEncryption } from "aws-cdk-lib/aws-s3"; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings, CreateApiAuthorizer } from '@aws-solutions-constructs/core'; import * as apigateway from 'aws-cdk-lib/aws-apigateway'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -34,7 +35,7 @@ new CloudFrontToApiGatewayToLambda(stack, 'cf-apigw-lambda', { }, lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, cloudFrontLoggingBucketProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/cftaplam-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/cftaplam-no-arguments.assets.json index 27bc94996..d8896edb2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/cftaplam-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/cftaplam-no-arguments.assets.json @@ -14,20 +14,20 @@ } } }, - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "590eb76d74281a48edf9608c952776de7c3f63fa04fab3ad56cb1d6b1bbf9e7f": { + "16776d1f39263a222b949e3403b22bbe0984974b4c2e9c05e23b913000437362": { "source": { "path": "cftaplam-no-arguments.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "590eb76d74281a48edf9608c952776de7c3f63fa04fab3ad56cb1d6b1bbf9e7f.json", + "objectKey": "16776d1f39263a222b949e3403b22bbe0984974b4c2e9c05e23b913000437362.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/cftaplam-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/cftaplam-no-arguments.template.json index 4f9a15225..876b4f9db 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/cftaplam-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/cftaplam-no-arguments.template.json @@ -48,7 +48,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "cftaplamnoargumentsauthorizerAuthFunctionServiceRole122160C6" @@ -283,7 +283,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -1164,7 +1164,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1175,7 +1175,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1240,6 +1248,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/manifest.json index 05819a532..0e721fc48 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/manifest.json @@ -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}/590eb76d74281a48edf9608c952776de7c3f63fa04fab3ad56cb1d6b1bbf9e7f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/16776d1f39263a222b949e3403b22bbe0984974b4c2e9c05e23b913000437362.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -256,6 +256,12 @@ "data": "testcloudfrontapigatewaylambdaCloudFrontToApiGatewayCloudFrontDistribution0AFC98FC" } ], + "/cftaplam-no-arguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cftaplam-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -279,15 +285,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testcloudfrontapigatewaylambdaCloudFrontToApiGatewayCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResource2395E2A2": [ - { - "type": "aws:cdk:logicalId", - "data": "testcloudfrontapigatewaylambdaCloudFrontToApiGatewayCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResource2395E2A2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "cftaplam-no-arguments" diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/tree.json index f951bf33a..23dfb67b4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "cftaplam-no-arguments/cftaplam-no-arguments-authorizerAuthFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -60,13 +60,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Code": { @@ -78,7 +78,7 @@ "path": "cftaplam-no-arguments/cftaplam-no-arguments-authorizerAuthFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -86,13 +86,13 @@ "path": "cftaplam-no-arguments/cftaplam-no-arguments-authorizerAuthFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -114,12 +114,12 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } }, "cftaplamnoargumentscftaplamnoargumentsauthorizer14876A7B:Permissions": { @@ -167,13 +167,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "cftaplam-no-arguments-authorizer": { @@ -246,13 +246,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAuthorizer", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.RequestAuthorizer", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cloudfront-apigateway-lambda": { @@ -268,7 +268,7 @@ "path": "cftaplam-no-arguments/test-cloudfront-apigateway-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -331,7 +331,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -367,19 +367,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -395,7 +395,7 @@ "path": "cftaplam-no-arguments/test-cloudfront-apigateway-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -403,13 +403,13 @@ "path": "cftaplam-no-arguments/test-cloudfront-apigateway-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -436,7 +436,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -444,13 +444,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "ApiAccessLogGroup": { @@ -466,13 +466,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaRestApi": { @@ -495,7 +495,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.143.0" + "version": "2.147.3" } }, "Deployment": { @@ -516,13 +516,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.143.0" + "version": "2.147.3" } }, "DeploymentStage.prod": { @@ -564,13 +564,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.143.0" + "version": "2.147.3" } }, "Endpoint": { @@ -578,7 +578,7 @@ "path": "cftaplam-no-arguments/test-cloudfront-apigateway-lambda/LambdaRestApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.143.0" + "version": "2.147.3" } }, "Default": { @@ -609,7 +609,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "ANY": { @@ -662,7 +662,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "ApiPermission.Test.cftaplamnoargumentstestcloudfrontapigatewaylambdaLambdaRestApiF14A7709.ANY..{proxy+}": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -758,19 +758,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ProxyResource", - "version": "2.143.0" + "version": "2.147.3" } }, "ANY": { @@ -823,7 +823,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "ApiPermission.Test.cftaplamnoargumentstestcloudfrontapigatewaylambdaLambdaRestApiF14A7709.ANY..": { @@ -868,7 +868,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -922,19 +922,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.143.0" + "version": "2.147.3" } }, "UsagePlan": { @@ -962,19 +962,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnUsagePlan", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.UsagePlan", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.LambdaRestApi", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaRestApiCloudWatchRole": { @@ -986,7 +986,7 @@ "path": "cftaplam-no-arguments/test-cloudfront-apigateway-lambda/LambdaRestApiCloudWatchRole/ImportLambdaRestApiCloudWatchRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1053,13 +1053,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaRestApiAccount": { @@ -1078,7 +1078,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAccount", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontToApiGateway": { @@ -1106,13 +1106,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -1147,7 +1147,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1242,19 +1242,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -1307,7 +1307,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1405,13 +1405,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1423,19 +1423,19 @@ "path": "cftaplam-no-arguments/test-cloudfront-apigateway-lambda/CloudFrontToApiGateway/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -1557,25 +1557,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-apigateway.CloudFrontToApiGateway", - "version": "2.58.1" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-apigateway-lambda.CloudFrontToApiGatewayToLambda", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cftaplam-no-arguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1587,7 +1595,7 @@ "path": "cftaplam-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1595,7 +1603,7 @@ "path": "cftaplam-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1603,13 +1611,13 @@ "path": "cftaplam-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1637,7 +1645,7 @@ "path": "cftaplam-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1645,25 +1653,25 @@ "path": "cftaplam-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1671,7 +1679,7 @@ "path": "cftaplam-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1679,13 +1687,13 @@ "path": "cftaplam-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1699,7 +1707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.ts index e9f72af48..041614d55 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-no-arguments.ts @@ -18,6 +18,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings, CreateApiAuthorizer } from '@aws-solutions-constructs/core'; import * as apigateway from 'aws-cdk-lib/aws-apigateway'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-cloudfront-apigate const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/cftaplam-override-behavior.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/cftaplam-override-behavior.assets.json index dd9d618f1..28e714c40 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/cftaplam-override-behavior.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/cftaplam-override-behavior.assets.json @@ -14,20 +14,20 @@ } } }, - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "126b6c72d316536b4b73b1c1928345a5eb78d6d1d127a369e1b5690526ab0cb7": { + "17472da3bceb13e92a48ce1b86167eded806adf5230767ad290f20c5dfd99b1a": { "source": { "path": "cftaplam-override-behavior.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "126b6c72d316536b4b73b1c1928345a5eb78d6d1d127a369e1b5690526ab0cb7.json", + "objectKey": "17472da3bceb13e92a48ce1b86167eded806adf5230767ad290f20c5dfd99b1a.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/cftaplam-override-behavior.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/cftaplam-override-behavior.template.json index 69eb8309e..61b0d15d9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/cftaplam-override-behavior.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/cftaplam-override-behavior.template.json @@ -96,7 +96,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "cftaplamoverridebehaviorauthorizerAuthFunctionServiceRoleA606974F" @@ -331,7 +331,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -1223,7 +1223,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1234,7 +1234,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1299,6 +1307,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/manifest.json index 5b2dceb23..48329b7fe 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/manifest.json @@ -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}/126b6c72d316536b4b73b1c1928345a5eb78d6d1d127a369e1b5690526ab0cb7.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/17472da3bceb13e92a48ce1b86167eded806adf5230767ad290f20c5dfd99b1a.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -262,6 +262,12 @@ "data": "cfapilambdaoverrideCloudFrontToApiGatewayCloudFrontDistribution94A35932" } ], + "/cftaplam-override-behavior/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cftaplam-override-behavior/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -285,15 +291,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "cfapilambdaoverrideCloudFrontToApiGatewayCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResource33279C95": [ - { - "type": "aws:cdk:logicalId", - "data": "cfapilambdaoverrideCloudFrontToApiGatewayCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResource33279C95", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "cftaplam-override-behavior" diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/tree.json index 3c2c1622c..b4989ea9b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.js.snapshot/tree.json @@ -41,13 +41,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnCachePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CachePolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "NoCachePolicy": { @@ -83,13 +83,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnCachePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CachePolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "cftaplam-override-behavior-authorizerAuthFunction": { @@ -105,7 +105,7 @@ "path": "cftaplam-override-behavior/cftaplam-override-behavior-authorizerAuthFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -144,13 +144,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Code": { @@ -162,7 +162,7 @@ "path": "cftaplam-override-behavior/cftaplam-override-behavior-authorizerAuthFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -170,13 +170,13 @@ "path": "cftaplam-override-behavior/cftaplam-override-behavior-authorizerAuthFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -198,12 +198,12 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } }, "cftaplamoverridebehaviorcftaplamoverridebehaviorauthorizer3042C32C:Permissions": { @@ -251,13 +251,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "cftaplam-override-behavior-authorizer": { @@ -330,13 +330,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAuthorizer", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.RequestAuthorizer", - "version": "2.143.0" + "version": "2.147.3" } }, "cf-api-lambda-override": { @@ -352,7 +352,7 @@ "path": "cftaplam-override-behavior/cf-api-lambda-override/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -415,7 +415,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -451,19 +451,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -479,7 +479,7 @@ "path": "cftaplam-override-behavior/cf-api-lambda-override/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -487,13 +487,13 @@ "path": "cftaplam-override-behavior/cf-api-lambda-override/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -520,7 +520,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -528,13 +528,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "ApiAccessLogGroup": { @@ -550,13 +550,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaRestApi": { @@ -579,7 +579,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.143.0" + "version": "2.147.3" } }, "Deployment": { @@ -600,13 +600,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.143.0" + "version": "2.147.3" } }, "DeploymentStage.prod": { @@ -648,13 +648,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.143.0" + "version": "2.147.3" } }, "Endpoint": { @@ -662,7 +662,7 @@ "path": "cftaplam-override-behavior/cf-api-lambda-override/LambdaRestApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.143.0" + "version": "2.147.3" } }, "Default": { @@ -693,7 +693,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "GET": { @@ -726,19 +726,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "dynamic": { @@ -765,7 +765,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "GET": { @@ -818,7 +818,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "ApiPermission.Test.cftaplamoverridebehaviorcfapilambdaoverrideLambdaRestApiE3676062.GET..dynamic": { @@ -863,7 +863,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -914,25 +914,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Resource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.143.0" + "version": "2.147.3" } }, "UsagePlan": { @@ -960,19 +960,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnUsagePlan", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.UsagePlan", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.LambdaRestApi", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaRestApiCloudWatchRole": { @@ -984,7 +984,7 @@ "path": "cftaplam-override-behavior/cf-api-lambda-override/LambdaRestApiCloudWatchRole/ImportLambdaRestApiCloudWatchRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1051,13 +1051,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaRestApiAccount": { @@ -1076,7 +1076,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAccount", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontToApiGateway": { @@ -1104,13 +1104,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -1145,7 +1145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1240,19 +1240,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -1305,7 +1305,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1403,13 +1403,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1421,19 +1421,19 @@ "path": "cftaplam-override-behavior/cf-api-lambda-override/CloudFrontToApiGateway/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -1633,7 +1633,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } }, "Origin2": { @@ -1647,19 +1647,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-apigateway.CloudFrontToApiGateway", - "version": "2.58.1" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-apigateway-lambda.CloudFrontToApiGatewayToLambda", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cftaplam-override-behavior/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1671,7 +1679,7 @@ "path": "cftaplam-override-behavior/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1679,7 +1687,7 @@ "path": "cftaplam-override-behavior/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1687,13 +1695,13 @@ "path": "cftaplam-override-behavior/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1721,7 +1729,7 @@ "path": "cftaplam-override-behavior/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1729,25 +1737,25 @@ "path": "cftaplam-override-behavior/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1755,7 +1763,7 @@ "path": "cftaplam-override-behavior/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1763,13 +1771,13 @@ "path": "cftaplam-override-behavior/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1783,7 +1791,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.ts b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.ts index 5ba5538eb..d6e4fff07 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.ts +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/integ.cftaplam-override-behavior.ts @@ -22,6 +22,7 @@ import { Duration } from "aws-cdk-lib"; import * as origins from 'aws-cdk-lib/aws-cloudfront-origins'; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings, CreateApiAuthorizer } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -30,7 +31,7 @@ stack.templateOptions.description = 'Integration Test for aws-cloudfront-apigate const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/test.cloudfront-apigateway-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/test.cloudfront-apigateway-lambda.test.ts index 3b0849a12..c6e1ca349 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/test.cloudfront-apigateway-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/test/test.cloudfront-apigateway-lambda.test.ts @@ -17,11 +17,12 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as api from 'aws-cdk-lib/aws-apigateway'; import * as s3 from "aws-cdk-lib/aws-s3"; import { Template } from 'aws-cdk-lib/assertions'; +import * as defaults from '@aws-solutions-constructs/core'; function deployNewFunc(stack: cdk.Stack) { const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -33,7 +34,7 @@ function deployNewFunc(stack: cdk.Stack) { function useExistingFunc(stack: cdk.Stack) { const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; @@ -72,7 +73,7 @@ test('check lambda function properties for deploy: true', () => { "Arn" ] }, - Runtime: "nodejs16.x", + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1" @@ -150,7 +151,7 @@ test('override api gateway properties with existingLambdaObj', () => { const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -183,7 +184,7 @@ test('override api gateway properties without existingLambdaObj', () => { new CloudFrontToApiGatewayToLambda(stack, 'test-cloudfront-apigateway-lambda', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, apiGatewayProps: { @@ -214,7 +215,7 @@ test('Cloudfront logging bucket with destroy removal policy and auto delete obje new CloudFrontToApiGatewayToLambda(stack, 'test-cloudfront-apigateway-lambda', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, apiGatewayProps: { @@ -254,7 +255,7 @@ test('Cloudfront logging bucket error when providing existing log bucket and log const app = () => { new CloudFrontToApiGatewayToLambda(stack, 'cloudfront-s3', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, apiGatewayProps: { @@ -278,7 +279,7 @@ test('Cloudfront logging bucket error when providing existing log bucket and log test('Confirm CheckLambdaProps is being called', () => { const stack = new cdk.Stack(); const existingLambdaObj = new lambda.Function(stack, 'ExistingLambda', { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -287,7 +288,7 @@ test('Confirm CheckLambdaProps is being called', () => { apiGatewayProps: { defaultMethodOptions: { authorizationType: api.AuthorizationType.NONE }}, existingLambdaObj, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), } @@ -306,7 +307,7 @@ test("Confirm CheckCloudFrontProps is being called", () => { new CloudFrontToApiGatewayToLambda(stack, "test-cloudfront-apigateway-lambda", { apiGatewayProps: { defaultMethodOptions: { authorizationType: api.AuthorizationType.NONE }}, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -329,7 +330,7 @@ test('confirm error thrown for AWS_IAM authorization', () => { const stack = new cdk.Stack(); const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -348,7 +349,7 @@ test('confirm error thrown for unspecified authorization', () => { const stack = new cdk.Stack(); const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/cftapi-customCloudfrontLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/cftapi-customCloudfrontLoggingBucket.assets.json index f20da7072..0e3252712 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/cftapi-customCloudfrontLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/cftapi-customCloudfrontLoggingBucket.assets.json @@ -14,20 +14,20 @@ } } }, - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "5c05be8814cec8163b17c3f2ec6a9fcab2adbd62cc9ee122d56719c94ed0e875": { + "7e8838ebab0fe9fee433b78802ef839fab55d5b939b72e66fedc4be43e9ac85d": { "source": { "path": "cftapi-customCloudfrontLoggingBucket.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "5c05be8814cec8163b17c3f2ec6a9fcab2adbd62cc9ee122d56719c94ed0e875.json", + "objectKey": "7e8838ebab0fe9fee433b78802ef839fab55d5b939b72e66fedc4be43e9ac85d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/cftapi-customCloudfrontLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/cftapi-customCloudfrontLoggingBucket.template.json index 212007d83..ae6502231 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/cftapi-customCloudfrontLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/cftapi-customCloudfrontLoggingBucket.template.json @@ -48,7 +48,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "cftapicustomCloudfrontLoggingBucketapiFunctionServiceRole487119AE" @@ -119,7 +119,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "cftapicustomCloudfrontLoggingBucketapiauthorizerAuthFunctionServiceRole13E010C8" @@ -1000,7 +1000,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1011,7 +1011,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1076,6 +1084,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/manifest.json index e972b8d4f..534bffecd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/manifest.json @@ -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}/5c05be8814cec8163b17c3f2ec6a9fcab2adbd62cc9ee122d56719c94ed0e875.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7e8838ebab0fe9fee433b78802ef839fab55d5b939b72e66fedc4be43e9ac85d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -226,6 +226,12 @@ "data": "cfapigwCloudFrontDistribution2DD013DF" } ], + "/cftapi-customCloudfrontLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cftapi-customCloudfrontLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -249,15 +255,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "cfapigwCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResource861BCB32": [ - { - "type": "aws:cdk:logicalId", - "data": "cfapigwCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResource861BCB32", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "cftapi-customCloudfrontLoggingBucket" diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/tree.json index 1aa2c265d..1f1f648ab 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-customCloudfrontLoggingBucket.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "cftapi-customCloudfrontLoggingBucket/cftapi-customCloudfrontLoggingBucket-apiFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -60,13 +60,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Code": { @@ -78,7 +78,7 @@ "path": "cftapi-customCloudfrontLoggingBucket/cftapi-customCloudfrontLoggingBucket-apiFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -86,13 +86,13 @@ "path": "cftapi-customCloudfrontLoggingBucket/cftapi-customCloudfrontLoggingBucket-apiFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -114,18 +114,18 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "cftapi-customCloudfrontLoggingBucket-api-authorizerAuthFunction": { @@ -141,7 +141,7 @@ "path": "cftapi-customCloudfrontLoggingBucket/cftapi-customCloudfrontLoggingBucket-api-authorizerAuthFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -180,13 +180,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Code": { @@ -198,7 +198,7 @@ "path": "cftapi-customCloudfrontLoggingBucket/cftapi-customCloudfrontLoggingBucket-api-authorizerAuthFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -206,13 +206,13 @@ "path": "cftapi-customCloudfrontLoggingBucket/cftapi-customCloudfrontLoggingBucket-api-authorizerAuthFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -234,12 +234,12 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } }, "cftapicustomCloudfrontLoggingBucketcftapicustomCloudfrontLoggingBucketapiauthorizerFD948D42:Permissions": { @@ -287,13 +287,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "cftapi-customCloudfrontLoggingBucket-api-authorizer": { @@ -366,13 +366,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAuthorizer", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.RequestAuthorizer", - "version": "2.143.0" + "version": "2.147.3" } }, "cftapi-customCloudfrontLoggingBucket-apiApi": { @@ -390,7 +390,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.143.0" + "version": "2.147.3" } }, "Deployment": { @@ -411,13 +411,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.143.0" + "version": "2.147.3" } }, "DeploymentStage.prod": { @@ -441,13 +441,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.143.0" + "version": "2.147.3" } }, "Endpoint": { @@ -455,7 +455,7 @@ "path": "cftapi-customCloudfrontLoggingBucket/cftapi-customCloudfrontLoggingBucket-apiApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.143.0" + "version": "2.147.3" } }, "Default": { @@ -486,7 +486,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "ANY": { @@ -539,7 +539,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "ApiPermission.Test.cftapicustomCloudfrontLoggingBucketcftapicustomCloudfrontLoggingBucketapiApi78AFA9D9.ANY..{proxy+}": { @@ -584,7 +584,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -635,19 +635,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ProxyResource", - "version": "2.143.0" + "version": "2.147.3" } }, "ANY": { @@ -700,7 +700,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "ApiPermission.Test.cftapicustomCloudfrontLoggingBucketcftapicustomCloudfrontLoggingBucketapiApi78AFA9D9.ANY..": { @@ -745,7 +745,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -799,25 +799,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.LambdaRestApi", - "version": "2.143.0" + "version": "2.147.3" } }, "cf-apigw": { @@ -845,13 +845,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -886,7 +886,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -981,19 +981,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -1046,7 +1046,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1144,13 +1144,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1162,19 +1162,19 @@ "path": "cftapi-customCloudfrontLoggingBucket/cf-apigw/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -1296,19 +1296,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-apigateway.CloudFrontToApiGateway", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cftapi-customCloudfrontLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1320,7 +1328,7 @@ "path": "cftapi-customCloudfrontLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1328,7 +1336,7 @@ "path": "cftapi-customCloudfrontLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1336,13 +1344,13 @@ "path": "cftapi-customCloudfrontLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1370,7 +1378,7 @@ "path": "cftapi-customCloudfrontLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1378,25 +1386,25 @@ "path": "cftapi-customCloudfrontLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1404,7 +1412,7 @@ "path": "cftapi-customCloudfrontLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1412,13 +1420,13 @@ "path": "cftapi-customCloudfrontLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1432,7 +1440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/cftapi-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/cftapi-no-arguments.assets.json index fba7c50e2..87c27eb12 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/cftapi-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/cftapi-no-arguments.assets.json @@ -14,20 +14,20 @@ } } }, - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "5916072b9f01260833dba9cc6022794c4d7679966039d2ce970f44e4757a660c": { + "574b7b43409a49a1d942d25937aa86c626994579c634c1931343de3327a48762": { "source": { "path": "cftapi-no-arguments.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "5916072b9f01260833dba9cc6022794c4d7679966039d2ce970f44e4757a660c.json", + "objectKey": "574b7b43409a49a1d942d25937aa86c626994579c634c1931343de3327a48762.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/cftapi-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/cftapi-no-arguments.template.json index 6583b7521..c88e2625f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/cftapi-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/cftapi-no-arguments.template.json @@ -48,7 +48,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "cftapinoargumentsapiFunctionServiceRole6D0B7CBA" @@ -119,7 +119,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "cftapinoargumentsapiauthorizerAuthFunctionServiceRole33BC576C" @@ -1000,7 +1000,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1011,7 +1011,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1076,6 +1084,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/manifest.json index e72592941..45adfce11 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/manifest.json @@ -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}/5916072b9f01260833dba9cc6022794c4d7679966039d2ce970f44e4757a660c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/574b7b43409a49a1d942d25937aa86c626994579c634c1931343de3327a48762.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -226,6 +226,12 @@ "data": "testcloudfrontapigatewayCloudFrontDistribution159820CC" } ], + "/cftapi-no-arguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cftapi-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -249,15 +255,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testcloudfrontapigatewayCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResourceCAC0A05B": [ - { - "type": "aws:cdk:logicalId", - "data": "testcloudfrontapigatewayCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResourceCAC0A05B", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "cftapi-no-arguments" diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/tree.json index de6c75656..d4137671d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/integ.cftapi-no-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "cftapi-no-arguments/cftapi-no-arguments-apiFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -60,13 +60,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Code": { @@ -78,7 +78,7 @@ "path": "cftapi-no-arguments/cftapi-no-arguments-apiFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -86,13 +86,13 @@ "path": "cftapi-no-arguments/cftapi-no-arguments-apiFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -114,18 +114,18 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "cftapi-no-arguments-api-authorizerAuthFunction": { @@ -141,7 +141,7 @@ "path": "cftapi-no-arguments/cftapi-no-arguments-api-authorizerAuthFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -180,13 +180,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Code": { @@ -198,7 +198,7 @@ "path": "cftapi-no-arguments/cftapi-no-arguments-api-authorizerAuthFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -206,13 +206,13 @@ "path": "cftapi-no-arguments/cftapi-no-arguments-api-authorizerAuthFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -234,12 +234,12 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } }, "cftapinoargumentscftapinoargumentsapiauthorizerCA624E68:Permissions": { @@ -287,13 +287,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "cftapi-no-arguments-api-authorizer": { @@ -366,13 +366,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAuthorizer", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.RequestAuthorizer", - "version": "2.143.0" + "version": "2.147.3" } }, "cftapi-no-arguments-apiApi": { @@ -390,7 +390,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.143.0" + "version": "2.147.3" } }, "Deployment": { @@ -411,13 +411,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.143.0" + "version": "2.147.3" } }, "DeploymentStage.prod": { @@ -441,13 +441,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.143.0" + "version": "2.147.3" } }, "Endpoint": { @@ -455,7 +455,7 @@ "path": "cftapi-no-arguments/cftapi-no-arguments-apiApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.143.0" + "version": "2.147.3" } }, "Default": { @@ -486,7 +486,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "ANY": { @@ -539,7 +539,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "ApiPermission.Test.cftapinoargumentscftapinoargumentsapiApiC6105EBE.ANY..{proxy+}": { @@ -584,7 +584,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -635,19 +635,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ProxyResource", - "version": "2.143.0" + "version": "2.147.3" } }, "ANY": { @@ -700,7 +700,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "ApiPermission.Test.cftapinoargumentscftapinoargumentsapiApiC6105EBE.ANY..": { @@ -745,7 +745,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -799,25 +799,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.LambdaRestApi", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cloudfront-apigateway": { @@ -845,13 +845,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -886,7 +886,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -981,19 +981,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -1046,7 +1046,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1144,13 +1144,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1162,19 +1162,19 @@ "path": "cftapi-no-arguments/test-cloudfront-apigateway/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -1296,19 +1296,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-apigateway.CloudFrontToApiGateway", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cftapi-no-arguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1320,7 +1328,7 @@ "path": "cftapi-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1328,7 +1336,7 @@ "path": "cftapi-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1336,13 +1344,13 @@ "path": "cftapi-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1370,7 +1378,7 @@ "path": "cftapi-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1378,25 +1386,25 @@ "path": "cftapi-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1404,7 +1412,7 @@ "path": "cftapi-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1412,13 +1420,13 @@ "path": "cftapi-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1432,7 +1440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/test.cloudfront-apigateway.test.ts b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/test.cloudfront-apigateway.test.ts index c78c782ab..ee0f18a18 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/test.cloudfront-apigateway.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/test/test.cloudfront-apigateway.test.ts @@ -22,7 +22,7 @@ function deploy(stack: cdk.Stack) { const inProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -167,7 +167,7 @@ function createApi() { const inProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/cftmed-customCloudFrontLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/cftmed-customCloudFrontLoggingBucket.assets.json index 5c14f676e..fc326d44b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/cftmed-customCloudFrontLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/cftmed-customCloudFrontLoggingBucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "361a96ca72e5587bf2d587f50d609acfdfa36eab0f2324527762f85382ab5486": { + "e57b25dd1513e3375a9f73cb233102cfc7801ac26410ac410c1c19561b9d0720": { "source": { "path": "cftmed-customCloudFrontLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "361a96ca72e5587bf2d587f50d609acfdfa36eab0f2324527762f85382ab5486.json", + "objectKey": "e57b25dd1513e3375a9f73cb233102cfc7801ac26410ac410c1c19561b9d0720.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/cftmed-customCloudFrontLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/cftmed-customCloudFrontLoggingBucket.template.json index c2e3a79df..c653a928f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/cftmed-customCloudFrontLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/cftmed-customCloudFrontLoggingBucket.template.json @@ -531,7 +531,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -542,7 +542,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -579,6 +587,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/manifest.json index c17b14fac..b3dfdb5f8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/manifest.json @@ -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}/361a96ca72e5587bf2d587f50d609acfdfa36eab0f2324527762f85382ab5486.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e57b25dd1513e3375a9f73cb233102cfc7801ac26410ac410c1c19561b9d0720.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -142,6 +142,12 @@ "data": "cloudfrontmediastoreCloudFrontDistribution639346BB" } ], + "/cftmed-customCloudFrontLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cftmed-customCloudFrontLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -165,15 +171,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "cloudfrontmediastoreCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResource5D7907AB": [ - { - "type": "aws:cdk:logicalId", - "data": "cloudfrontmediastoreCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResource5D7907AB", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "cftmed-customCloudFrontLoggingBucket" diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/tree.json index ecc450e69..776f719f1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-customCloudFrontLoggingBucket.js.snapshot/tree.json @@ -43,13 +43,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnCloudFrontOriginAccessIdentity", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.OriginAccessIdentity", - "version": "2.143.0" + "version": "2.147.3" } }, "MediaStoreContainer": { @@ -115,7 +115,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_mediastore.CfnContainer", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -150,7 +150,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -245,19 +245,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -310,7 +310,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -408,13 +408,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -426,19 +426,19 @@ "path": "cftmed-customCloudFrontLoggingBucket/cloudfront-mediastore/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontOriginRequestPolicy": { @@ -488,13 +488,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginRequestPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.OriginRequestPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "SetHttpSecurityHeaders": { @@ -518,13 +518,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -638,19 +638,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-mediastore.CloudFrontToMediaStore", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cftmed-customCloudFrontLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -662,7 +670,7 @@ "path": "cftmed-customCloudFrontLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -670,7 +678,7 @@ "path": "cftmed-customCloudFrontLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -678,13 +686,13 @@ "path": "cftmed-customCloudFrontLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -712,7 +720,7 @@ "path": "cftmed-customCloudFrontLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -720,25 +728,25 @@ "path": "cftmed-customCloudFrontLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -746,7 +754,7 @@ "path": "cftmed-customCloudFrontLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -754,13 +762,13 @@ "path": "cftmed-customCloudFrontLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -774,7 +782,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/cftmed-default.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/cftmed-default.assets.json index 4bf843a68..716127861 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/cftmed-default.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/cftmed-default.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "ae6ba352ae89f5f874a12d7a7193326a71f8cbda34b77f8f0a8a1b866d9f9491": { + "277fbe87ef1b97a460864cb3747b224fb33417992cdf8a1e2c76e282d61e03e4": { "source": { "path": "cftmed-default.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ae6ba352ae89f5f874a12d7a7193326a71f8cbda34b77f8f0a8a1b866d9f9491.json", + "objectKey": "277fbe87ef1b97a460864cb3747b224fb33417992cdf8a1e2c76e282d61e03e4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/cftmed-default.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/cftmed-default.template.json index 760c5f0dc..2db58e426 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/cftmed-default.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/cftmed-default.template.json @@ -531,7 +531,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -542,7 +542,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -579,6 +587,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/manifest.json index ddc0337dc..5f23ddf7e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/manifest.json @@ -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}/ae6ba352ae89f5f874a12d7a7193326a71f8cbda34b77f8f0a8a1b866d9f9491.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/277fbe87ef1b97a460864cb3747b224fb33417992cdf8a1e2c76e282d61e03e4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -142,6 +142,12 @@ "data": "testcloudfrontmediastoreCloudFrontDistributionED9265B1" } ], + "/cftmed-default/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cftmed-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -165,15 +171,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testcloudfrontmediastoreCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResourceAE9C7ABE": [ - { - "type": "aws:cdk:logicalId", - "data": "testcloudfrontmediastoreCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResourceAE9C7ABE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "cftmed-default" diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/tree.json index 82a33a903..279ce8000 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-default.js.snapshot/tree.json @@ -43,13 +43,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnCloudFrontOriginAccessIdentity", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.OriginAccessIdentity", - "version": "2.143.0" + "version": "2.147.3" } }, "MediaStoreContainer": { @@ -115,7 +115,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_mediastore.CfnContainer", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -150,7 +150,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -245,19 +245,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -310,7 +310,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -408,13 +408,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -426,19 +426,19 @@ "path": "cftmed-default/test-cloudfront-mediastore/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontOriginRequestPolicy": { @@ -488,13 +488,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginRequestPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.OriginRequestPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "SetHttpSecurityHeaders": { @@ -518,13 +518,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -638,19 +638,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-mediastore.CloudFrontToMediaStore", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cftmed-default/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -662,7 +670,7 @@ "path": "cftmed-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -670,7 +678,7 @@ "path": "cftmed-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -678,13 +686,13 @@ "path": "cftmed-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -712,7 +720,7 @@ "path": "cftmed-default/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -720,25 +728,25 @@ "path": "cftmed-default/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -746,7 +754,7 @@ "path": "cftmed-default/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -754,13 +762,13 @@ "path": "cftmed-default/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -774,7 +782,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/cftmed-existingContainer.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/cftmed-existingContainer.assets.json index 24fc8f52d..35cbd2354 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/cftmed-existingContainer.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/cftmed-existingContainer.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "76e7206fab711b60931802afaa014f71dbf0c7b00c96787a2d8399c7d43216bd": { + "8b066af8bc7e1616eed792200b4cca324397c9a58a47e8682e8fe9df81978f46": { "source": { "path": "cftmed-existingContainer.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "76e7206fab711b60931802afaa014f71dbf0c7b00c96787a2d8399c7d43216bd.json", + "objectKey": "8b066af8bc7e1616eed792200b4cca324397c9a58a47e8682e8fe9df81978f46.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/cftmed-existingContainer.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/cftmed-existingContainer.template.json index f85c05288..2e336da12 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/cftmed-existingContainer.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/cftmed-existingContainer.template.json @@ -448,7 +448,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -459,7 +459,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -496,6 +504,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/manifest.json index fec4dacc9..3258a9f8e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/manifest.json @@ -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}/76e7206fab711b60931802afaa014f71dbf0c7b00c96787a2d8399c7d43216bd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8b066af8bc7e1616eed792200b4cca324397c9a58a47e8682e8fe9df81978f46.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -136,6 +136,12 @@ "data": "testcloudfrontmediastoreCloudFrontDistributionED9265B1" } ], + "/cftmed-existingContainer/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cftmed-existingContainer/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -159,15 +165,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testcloudfrontmediastoreCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResourceAE9C7ABE": [ - { - "type": "aws:cdk:logicalId", - "data": "testcloudfrontmediastoreCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResourceAE9C7ABE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "cftmed-existingContainer" diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/tree.json index 47b7ce528..cb14b779c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-existingContainer.js.snapshot/tree.json @@ -19,7 +19,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_mediastore.CfnContainer", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cloudfront-mediastore": { @@ -58,7 +58,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -153,19 +153,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -218,7 +218,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -316,13 +316,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -334,19 +334,19 @@ "path": "cftmed-existingContainer/test-cloudfront-mediastore/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontOriginRequestPolicy": { @@ -396,13 +396,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginRequestPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.OriginRequestPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "SetHttpSecurityHeaders": { @@ -426,13 +426,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -538,19 +538,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-mediastore.CloudFrontToMediaStore", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cftmed-existingContainer/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -562,7 +570,7 @@ "path": "cftmed-existingContainer/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -570,7 +578,7 @@ "path": "cftmed-existingContainer/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -578,13 +586,13 @@ "path": "cftmed-existingContainer/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -612,7 +620,7 @@ "path": "cftmed-existingContainer/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -620,25 +628,25 @@ "path": "cftmed-existingContainer/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -646,7 +654,7 @@ "path": "cftmed-existingContainer/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -654,13 +662,13 @@ "path": "cftmed-existingContainer/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -674,7 +682,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/cftmed-overrideProperties.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/cftmed-overrideProperties.assets.json index 163991957..dd06da386 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/cftmed-overrideProperties.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/cftmed-overrideProperties.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "60fd322c17d9053b04cee93a986684a4b9971820d1a64e08fbb0c3e75f1ae16d": { + "6638cc122f4e0654cd6a866aa7b6c825be20314d132a1f264b9c0584e0e701c3": { "source": { "path": "cftmed-overrideProperties.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "60fd322c17d9053b04cee93a986684a4b9971820d1a64e08fbb0c3e75f1ae16d.json", + "objectKey": "6638cc122f4e0654cd6a866aa7b6c825be20314d132a1f264b9c0584e0e701c3.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/cftmed-overrideProperties.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/cftmed-overrideProperties.template.json index 8ece78e0d..3a3bbfa98 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/cftmed-overrideProperties.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/cftmed-overrideProperties.template.json @@ -490,7 +490,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -501,7 +501,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -538,6 +546,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/manifest.json index df984a83b..8203e4d12 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/manifest.json @@ -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}/60fd322c17d9053b04cee93a986684a4b9971820d1a64e08fbb0c3e75f1ae16d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6638cc122f4e0654cd6a866aa7b6c825be20314d132a1f264b9c0584e0e701c3.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -136,6 +136,12 @@ "data": "testcloudfrontmediastoreCloudFrontDistributionED9265B1" } ], + "/cftmed-overrideProperties/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cftmed-overrideProperties/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -159,15 +165,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testcloudfrontmediastoreCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResourceAE9C7ABE": [ - { - "type": "aws:cdk:logicalId", - "data": "testcloudfrontmediastoreCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResourceAE9C7ABE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "cftmed-overrideProperties" diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/tree.json index bab10c2fe..f5b4d3aff 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-overrideProperties.js.snapshot/tree.json @@ -61,7 +61,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_mediastore.CfnContainer", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -96,7 +96,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -191,19 +191,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -256,7 +256,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -354,13 +354,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -372,19 +372,19 @@ "path": "cftmed-overrideProperties/test-cloudfront-mediastore/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontOriginRequestPolicy": { @@ -434,13 +434,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginRequestPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.OriginRequestPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "SetHttpSecurityHeaders": { @@ -464,13 +464,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -579,19 +579,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-mediastore.CloudFrontToMediaStore", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cftmed-overrideProperties/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -603,7 +611,7 @@ "path": "cftmed-overrideProperties/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -611,7 +619,7 @@ "path": "cftmed-overrideProperties/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -619,13 +627,13 @@ "path": "cftmed-overrideProperties/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -653,7 +661,7 @@ "path": "cftmed-overrideProperties/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -661,25 +669,25 @@ "path": "cftmed-overrideProperties/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -687,7 +695,7 @@ "path": "cftmed-overrideProperties/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -695,13 +703,13 @@ "path": "cftmed-overrideProperties/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -715,7 +723,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/cftmed-withoutHttpSecurityHeaders.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/cftmed-withoutHttpSecurityHeaders.assets.json index 136ac4784..56a7bad2f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/cftmed-withoutHttpSecurityHeaders.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/cftmed-withoutHttpSecurityHeaders.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "9b24329e3b130dd9c7485e23024400bded8cf4542177d7c747ba3abe9e4b52cb": { + "133c7589491d0af5aa545dd79673ab37d917692cbd67a561dc4d3e4d6f6950cb": { "source": { "path": "cftmed-withoutHttpSecurityHeaders.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9b24329e3b130dd9c7485e23024400bded8cf4542177d7c747ba3abe9e4b52cb.json", + "objectKey": "133c7589491d0af5aa545dd79673ab37d917692cbd67a561dc4d3e4d6f6950cb.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/cftmed-withoutHttpSecurityHeaders.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/cftmed-withoutHttpSecurityHeaders.template.json index e7e126df5..d4d7f8bcb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/cftmed-withoutHttpSecurityHeaders.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/cftmed-withoutHttpSecurityHeaders.template.json @@ -508,7 +508,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -519,7 +519,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -556,6 +564,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/manifest.json index f7854edd0..ff3fcfefc 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/manifest.json @@ -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}/9b24329e3b130dd9c7485e23024400bded8cf4542177d7c747ba3abe9e4b52cb.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/133c7589491d0af5aa545dd79673ab37d917692cbd67a561dc4d3e4d6f6950cb.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -136,6 +136,12 @@ "data": "testcloudfrontmediastoreCloudFrontDistributionED9265B1" } ], + "/cftmed-withoutHttpSecurityHeaders/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cftmed-withoutHttpSecurityHeaders/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -159,15 +165,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testcloudfrontmediastoreCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResourceAE9C7ABE": [ - { - "type": "aws:cdk:logicalId", - "data": "testcloudfrontmediastoreCloudfrontLoggingBucketAccessLogAutoDeleteObjectsCustomResourceAE9C7ABE", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "cftmed-withoutHttpSecurityHeaders" diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/tree.json index cd4cdd5bf..bc067739d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-mediastore/test/integ.cftmed-withoutHttpSecurityHeaders.js.snapshot/tree.json @@ -43,13 +43,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnCloudFrontOriginAccessIdentity", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.OriginAccessIdentity", - "version": "2.143.0" + "version": "2.147.3" } }, "MediaStoreContainer": { @@ -115,7 +115,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_mediastore.CfnContainer", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -150,7 +150,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -245,19 +245,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -310,7 +310,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -408,13 +408,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -426,19 +426,19 @@ "path": "cftmed-withoutHttpSecurityHeaders/test-cloudfront-mediastore/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontOriginRequestPolicy": { @@ -488,13 +488,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginRequestPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.OriginRequestPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -597,19 +597,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-mediastore.CloudFrontToMediaStore", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cftmed-withoutHttpSecurityHeaders/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -621,7 +629,7 @@ "path": "cftmed-withoutHttpSecurityHeaders/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -629,7 +637,7 @@ "path": "cftmed-withoutHttpSecurityHeaders/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -637,13 +645,13 @@ "path": "cftmed-withoutHttpSecurityHeaders/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -671,7 +679,7 @@ "path": "cftmed-withoutHttpSecurityHeaders/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -679,25 +687,25 @@ "path": "cftmed-withoutHttpSecurityHeaders/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -705,7 +713,7 @@ "path": "cftmed-withoutHttpSecurityHeaders/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -713,13 +721,13 @@ "path": "cftmed-withoutHttpSecurityHeaders/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -733,7 +741,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.assets.json index a03ccc239..233321b88 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -40,7 +40,7 @@ } } }, - "b5c890659cc73595bbd8f3fc00358dcdf0310920c7ad6c01e3f7aa3984921deb": { + "2d06d0e01b2f839d69483ee2d7e84d8510f9207807fe0b7a87c666d16ab20053": { "source": { "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b5c890659cc73595bbd8f3fc00358dcdf0310920c7ad6c01e3f7aa3984921deb.json", + "objectKey": "2d06d0e01b2f839d69483ee2d7e84d8510f9207807fe0b7a87c666d16ab20053.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json index 9a393a0bb..f5d7dec9e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.template.json @@ -248,7 +248,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -259,7 +259,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1022,6 +1030,11 @@ "S3Key": "4a4b024f310aca2784b69bcb790e9ccaef785e9ad5d1b73624144f88c4465b4f.zip" }, "Description": "Custom resource function that updates a provided key policy to allow CloudFront access.", + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "Role": { "Fn::GetAtt": [ @@ -1029,7 +1042,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -1187,7 +1200,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Timeout": 900 }, "DependsOn": [ @@ -1236,6 +1257,115 @@ "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/manifest.json index c4331138b..498025d32 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/manifest.json @@ -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}/b5c890659cc73595bbd8f3fc00358dcdf0310920c7ad6c01e3f7aa3984921deb.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2d06d0e01b2f839d69483ee2d7e84d8510f9207807fe0b7a87c666d16ab20053.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -106,6 +106,12 @@ "data": "existings3bucketencryptedwithcmkS3LoggingBucketAutoDeleteObjectsCustomResource2638E7B9" } ], + "/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/tree.json index dbb7f42f9..be9ad8410 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket.js.snapshot/tree.json @@ -51,13 +51,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "existing-s3-bucket-encrypted-with-cmkS3LoggingBucket": { @@ -98,7 +98,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -232,13 +232,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -250,19 +250,27 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/existing-s3-bucket-encrypted-with-cmkS3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -274,7 +282,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -282,7 +290,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -290,13 +298,13 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "existing-s3-bucket-encrypted-with-cmkS3Bucket": { @@ -361,7 +369,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -499,13 +507,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -517,19 +525,19 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/existing-s3-bucket-encrypted-with-cmkS3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cloudfront-s3-cmk-encryption-key": { @@ -574,7 +582,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -708,13 +716,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -726,19 +734,19 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -791,7 +799,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -889,13 +897,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -907,19 +915,19 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontOac": { @@ -959,7 +967,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -1019,13 +1027,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -1037,7 +1045,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1100,7 +1108,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1136,19 +1144,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1164,7 +1172,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1172,13 +1180,13 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1194,6 +1202,11 @@ "s3Key": "4a4b024f310aca2784b69bcb790e9ccaef785e9ad5d1b73624144f88c4465b4f.zip" }, "description": "Custom resource function that updates a provided key policy to allow CloudFront access.", + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "role": { "Fn::GetAtt": [ @@ -1201,7 +1214,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -1209,13 +1222,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cloudfront-s3-cmk-encryption-keyResourceCmkPolicy": { @@ -1257,13 +1270,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "KmsKeyPolicyUpdateProvider": { @@ -1283,7 +1296,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1322,7 +1335,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1376,19 +1389,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Code": { @@ -1400,7 +1413,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider/framework-onEvent/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1408,13 +1421,13 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1447,25 +1460,33 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "timeout": 900 } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.custom_resources.Provider", - "version": "2.143.0" + "version": "2.147.3" } }, "KmsKeyPolicyUpdater": { @@ -1477,19 +1498,19 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdater/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -1517,7 +1538,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1525,25 +1546,25 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1551,7 +1572,7 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1559,13 +1580,13 @@ "path": "cfts3-bucket-encrypted-with-cmk-provided-as-existingbucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1579,7 +1600,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.assets.json index 148aa2b3f..80d0fc23e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "d523cd6d078a61c19eb8c081d0b346a12e902cfbed3d0d26454eeecd53eaef78": { + "142c8f3e9da90bc74ce4f76f2affb74d2bb563e50c14705080422f8d4ff5a5f8": { "source": { "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d523cd6d078a61c19eb8c081d0b346a12e902cfbed3d0d26454eeecd53eaef78.json", + "objectKey": "142c8f3e9da90bc74ce4f76f2affb74d2bb563e50c14705080422f8d4ff5a5f8.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json index eec626b09..c395a2a71 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.template.json @@ -212,7 +212,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -223,7 +223,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -882,6 +890,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/manifest.json index c5906de3c..5a494a589 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/manifest.json @@ -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}/d523cd6d078a61c19eb8c081d0b346a12e902cfbed3d0d26454eeecd53eaef78.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/142c8f3e9da90bc74ce4f76f2affb74d2bb563e50c14705080422f8d4ff5a5f8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "existings3bucketencryptedwiths3managedkeyS3LoggingBucketAutoDeleteObjectsCustomResourceB3A19532" } ], + "/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/tree.json index 19055470a..7daf8e99f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/tree.json @@ -46,7 +46,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -180,13 +180,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -198,19 +198,27 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/existing-s3-bucket-encrypted-with-s3-managed-keyS3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -222,7 +230,7 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -230,7 +238,7 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -238,13 +246,13 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "existing-s3-bucket-encrypted-with-s3-managed-keyS3Bucket": { @@ -303,7 +311,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -441,13 +449,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -459,19 +467,19 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/existing-s3-bucket-encrypted-with-s3-managed-keyS3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cloudfront-s3-managed-key": { @@ -516,7 +524,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -650,13 +658,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -668,19 +676,19 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/test-cloudfront-s3-managed-key/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -733,7 +741,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -831,13 +839,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -849,19 +857,19 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/test-cloudfront-s3-managed-key/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontOac": { @@ -901,7 +909,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -961,19 +969,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -1001,7 +1009,7 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1009,25 +1017,25 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1035,7 +1043,7 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1043,13 +1051,13 @@ "path": "cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1063,7 +1071,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.assets.json index 3e60324bf..333072f58 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -40,7 +40,7 @@ } } }, - "b600c632d91d6de51136e0e11d2d67dc6ae69d623784688738a75e56ccf845bf": { + "68db7c60542ae375f494fcb6deeb6e4e22c8fc1698d1e0988d5329665db4ccfe": { "source": { "path": "cfts3-cmk-provided-as-bucket-prop.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b600c632d91d6de51136e0e11d2d67dc6ae69d623784688738a75e56ccf845bf.json", + "objectKey": "68db7c60542ae375f494fcb6deeb6e4e22c8fc1698d1e0988d5329665db4ccfe.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.template.json index 5fb22a5ce..440c71261 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/cfts3-cmk-provided-as-bucket-prop.template.json @@ -882,6 +882,11 @@ "S3Key": "4a4b024f310aca2784b69bcb790e9ccaef785e9ad5d1b73624144f88c4465b4f.zip" }, "Description": "Custom resource function that updates a provided key policy to allow CloudFront access.", + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "Role": { "Fn::GetAtt": [ @@ -889,7 +894,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -1047,7 +1052,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Timeout": 900 }, "DependsOn": [ @@ -1124,7 +1137,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1135,7 +1148,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1172,6 +1193,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/manifest.json index fac3fb7aa..d72a8550f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/manifest.json @@ -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}/b600c632d91d6de51136e0e11d2d67dc6ae69d623784688738a75e56ccf845bf.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/68db7c60542ae375f494fcb6deeb6e4e22c8fc1698d1e0988d5329665db4ccfe.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -214,6 +214,12 @@ "data": "testcloudfronts3cmkencryptionkeyKmsKeyPolicyUpdaterFAFEBF0F" } ], + "/cfts3-cmk-provided-as-bucket-prop/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cfts3-cmk-provided-as-bucket-prop/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/tree.json index 46a00e72d..707980939 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-cmk-provided-as-bucket-prop.js.snapshot/tree.json @@ -51,13 +51,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cloudfront-s3-cmk-encryption-key": { @@ -102,7 +102,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -236,13 +236,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -254,19 +254,19 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -325,7 +325,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -424,19 +424,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -477,7 +477,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -611,13 +611,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -629,19 +629,19 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -694,7 +694,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -792,13 +792,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -810,19 +810,19 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontOac": { @@ -862,7 +862,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -922,13 +922,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -940,7 +940,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1003,7 +1003,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1039,19 +1039,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1067,7 +1067,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1075,13 +1075,13 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1097,6 +1097,11 @@ "s3Key": "4a4b024f310aca2784b69bcb790e9ccaef785e9ad5d1b73624144f88c4465b4f.zip" }, "description": "Custom resource function that updates a provided key policy to allow CloudFront access.", + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "role": { "Fn::GetAtt": [ @@ -1104,7 +1109,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -1112,13 +1117,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cloudfront-s3-cmk-encryption-keyResourceCmkPolicy": { @@ -1160,13 +1165,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "KmsKeyPolicyUpdateProvider": { @@ -1186,7 +1191,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1225,7 +1230,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1279,19 +1284,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Code": { @@ -1303,7 +1308,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider/framework-onEvent/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1311,13 +1316,13 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdateProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1350,25 +1355,33 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "timeout": 900 } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.custom_resources.Provider", - "version": "2.143.0" + "version": "2.147.3" } }, "KmsKeyPolicyUpdater": { @@ -1380,19 +1393,27 @@ "path": "cfts3-cmk-provided-as-bucket-prop/test-cloudfront-s3-cmk-encryption-key/KmsKeyPolicyUpdater/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cfts3-cmk-provided-as-bucket-prop/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1404,7 +1425,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1412,7 +1433,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1420,13 +1441,13 @@ "path": "cfts3-cmk-provided-as-bucket-prop/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1454,7 +1475,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1462,25 +1483,25 @@ "path": "cfts3-cmk-provided-as-bucket-prop/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1488,7 +1509,7 @@ "path": "cfts3-cmk-provided-as-bucket-prop/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1496,13 +1517,13 @@ "path": "cfts3-cmk-provided-as-bucket-prop/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1516,7 +1537,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.assets.json index 174627757..854a45062 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "e1d604a1ce62c31db7d1aeac06dd965b571030bfdff170852b841196a3ba5bdd": { + "c7f8abe83848738ecc477035de709f04301f6515f764df535e91408c4f04e7d5": { "source": { "path": "cfts3-custom-headers.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e1d604a1ce62c31db7d1aeac06dd965b571030bfdff170852b841196a3ba5bdd.json", + "objectKey": "c7f8abe83848738ecc477035de709f04301f6515f764df535e91408c4f04e7d5.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.template.json index 7e7dee03e..c930c6889 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/cfts3-custom-headers.template.json @@ -889,7 +889,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -900,7 +900,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -937,6 +945,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/manifest.json index 64e69d94c..7f8c36abc 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/manifest.json @@ -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}/e1d604a1ce62c31db7d1aeac06dd965b571030bfdff170852b841196a3ba5bdd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c7f8abe83848738ecc477035de709f04301f6515f764df535e91408c4f04e7d5.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -178,6 +178,12 @@ "data": "testcloudfronts3CloudFrontDistribution0565DEE8" } ], + "/cfts3-custom-headers/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cfts3-custom-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/tree.json index f081389e4..85c46171c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-headers.js.snapshot/tree.json @@ -49,13 +49,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cloudfront-s3": { @@ -100,7 +100,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -234,13 +234,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -252,19 +252,19 @@ "path": "cfts3-custom-headers/test-cloudfront-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -323,7 +323,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -461,13 +461,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -479,19 +479,19 @@ "path": "cfts3-custom-headers/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "SetHttpSecurityHeaders": { @@ -515,13 +515,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -562,7 +562,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -696,13 +696,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -714,19 +714,19 @@ "path": "cfts3-custom-headers/test-cloudfront-s3/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -779,7 +779,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -877,13 +877,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -895,19 +895,19 @@ "path": "cfts3-custom-headers/test-cloudfront-s3/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontOac": { @@ -947,7 +947,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -1018,19 +1018,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cfts3-custom-headers/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1042,7 +1050,7 @@ "path": "cfts3-custom-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1050,7 +1058,7 @@ "path": "cfts3-custom-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1058,13 +1066,13 @@ "path": "cfts3-custom-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1092,7 +1100,7 @@ "path": "cfts3-custom-headers/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1100,25 +1108,25 @@ "path": "cfts3-custom-headers/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1126,7 +1134,7 @@ "path": "cfts3-custom-headers/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1134,13 +1142,13 @@ "path": "cfts3-custom-headers/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1154,7 +1162,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.assets.json index baad8efcf..1a8eae811 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "f09d15493c40e759f7324a499555aaa362c003b1865a4c2d94cfd6efe637a732": { + "dc86110403531fedd01fbbe10d81b4792ac9def3c281c6a4c279c22dad26a464": { "source": { "path": "cfts3-custom-originPath.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f09d15493c40e759f7324a499555aaa362c003b1865a4c2d94cfd6efe637a732.json", + "objectKey": "dc86110403531fedd01fbbe10d81b4792ac9def3c281c6a4c279c22dad26a464.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.template.json index 84a99b99f..41dc127ed 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/cfts3-custom-originPath.template.json @@ -858,7 +858,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -869,7 +869,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -906,6 +914,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/manifest.json index cf5c984a5..6309b9fd3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/manifest.json @@ -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}/f09d15493c40e759f7324a499555aaa362c003b1865a4c2d94cfd6efe637a732.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dc86110403531fedd01fbbe10d81b4792ac9def3c281c6a4c279c22dad26a464.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "testcloudfronts3CloudFrontDistribution0565DEE8" } ], + "/cfts3-custom-originPath/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cfts3-custom-originPath/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/tree.json index 7a4f20c17..e2f2b67ea 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-custom-originPath.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "cfts3-custom-originPath/test-cloudfront-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -411,13 +411,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -429,19 +429,19 @@ "path": "cfts3-custom-originPath/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "SetHttpSecurityHeaders": { @@ -465,13 +465,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -512,7 +512,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -646,13 +646,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -664,19 +664,19 @@ "path": "cfts3-custom-originPath/test-cloudfront-s3/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -729,7 +729,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -827,13 +827,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -845,19 +845,19 @@ "path": "cfts3-custom-originPath/test-cloudfront-s3/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontOac": { @@ -897,7 +897,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -968,19 +968,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cfts3-custom-originPath/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -992,7 +1000,7 @@ "path": "cfts3-custom-originPath/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1000,7 +1008,7 @@ "path": "cfts3-custom-originPath/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1008,13 +1016,13 @@ "path": "cfts3-custom-originPath/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1042,7 +1050,7 @@ "path": "cfts3-custom-originPath/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1050,25 +1058,25 @@ "path": "cfts3-custom-originPath/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1076,7 +1084,7 @@ "path": "cfts3-custom-originPath/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1084,13 +1092,13 @@ "path": "cfts3-custom-originPath/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1104,7 +1112,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.assets.json index a1831d8cc..bfcb4b6f0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "72edeaeb86849ae6e96868136c389997c90e114b4e2b06cd4d656de02019ddfe": { + "e73913f2dc1078006851b19aef324461986808186854e69427b069843ac09e61": { "source": { "path": "cfts3-customLoggingBuckets.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "72edeaeb86849ae6e96868136c389997c90e114b4e2b06cd4d656de02019ddfe.json", + "objectKey": "e73913f2dc1078006851b19aef324461986808186854e69427b069843ac09e61.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.template.json index 376d60af9..a4fdaa8d3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/cfts3-customLoggingBuckets.template.json @@ -882,7 +882,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -893,7 +893,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -930,6 +938,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/manifest.json index 65ad20f1d..c1f9dca97 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/manifest.json @@ -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}/72edeaeb86849ae6e96868136c389997c90e114b4e2b06cd4d656de02019ddfe.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e73913f2dc1078006851b19aef324461986808186854e69427b069843ac09e61.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "testcloudfronts3CloudFrontDistribution0565DEE8" } ], + "/cfts3-customLoggingBuckets/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cfts3-customLoggingBuckets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/tree.json index 3747dea85..125f84644 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-customLoggingBuckets.js.snapshot/tree.json @@ -63,7 +63,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -197,13 +197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -215,19 +215,19 @@ "path": "cfts3-customLoggingBuckets/test-cloudfront-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -286,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -424,13 +424,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -442,19 +442,19 @@ "path": "cfts3-customLoggingBuckets/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "SetHttpSecurityHeaders": { @@ -478,13 +478,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -525,7 +525,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -659,13 +659,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -677,19 +677,19 @@ "path": "cfts3-customLoggingBuckets/test-cloudfront-s3/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -755,7 +755,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -853,13 +853,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -871,19 +871,19 @@ "path": "cfts3-customLoggingBuckets/test-cloudfront-s3/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontOac": { @@ -923,7 +923,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -994,19 +994,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cfts3-customLoggingBuckets/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1018,7 +1026,7 @@ "path": "cfts3-customLoggingBuckets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1026,7 +1034,7 @@ "path": "cfts3-customLoggingBuckets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1034,13 +1042,13 @@ "path": "cfts3-customLoggingBuckets/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1068,7 +1076,7 @@ "path": "cfts3-customLoggingBuckets/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1076,25 +1084,25 @@ "path": "cfts3-customLoggingBuckets/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1102,7 +1110,7 @@ "path": "cfts3-customLoggingBuckets/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1110,13 +1118,13 @@ "path": "cfts3-customLoggingBuckets/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1130,7 +1138,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.assets.json index 41088d557..c158a1958 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "0fd1d32663abd422abc8a1c59aa382f95a1e7f4f75b861f1112dba88bd8f487f": { + "3159996f03fb754ec656e68407ca916da9542a39ffd55b07854e7c5b28ef3e67": { "source": { "path": "cfts3-existing-bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0fd1d32663abd422abc8a1c59aa382f95a1e7f4f75b861f1112dba88bd8f487f.json", + "objectKey": "3159996f03fb754ec656e68407ca916da9542a39ffd55b07854e7c5b28ef3e67.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.template.json index 2e1192015..4fb7ed284 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/cfts3-existing-bucket.template.json @@ -205,7 +205,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -216,7 +216,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -970,6 +978,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/manifest.json index bd30176eb..34809f7ec 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/manifest.json @@ -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}/0fd1d32663abd422abc8a1c59aa382f95a1e7f4f75b861f1112dba88bd8f487f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3159996f03fb754ec656e68407ca916da9542a39ffd55b07854e7c5b28ef3e67.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/cfts3-existing-bucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cfts3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/tree.json index 010883c95..55a2cc94a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-existing-bucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "cfts3-existing-bucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cfts3-existing-bucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "cfts3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "cfts3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "cfts3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -442,13 +450,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -460,19 +468,19 @@ "path": "cfts3-existing-bucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cloudfront-s3": { @@ -500,13 +508,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -547,7 +555,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -681,13 +689,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -699,19 +707,19 @@ "path": "cfts3-existing-bucket/test-cloudfront-s3/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -764,7 +772,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -862,13 +870,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -880,19 +888,19 @@ "path": "cfts3-existing-bucket/test-cloudfront-s3/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontOac": { @@ -932,7 +940,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -1036,7 +1044,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } }, "Origin2": { @@ -1060,13 +1068,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnCloudFrontOriginAccessIdentity", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.OriginAccessIdentity", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -1078,13 +1086,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.58.1" + "version": "2.60.0" } }, "myCachePolicy": { @@ -1120,13 +1128,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnCachePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CachePolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1154,7 +1162,7 @@ "path": "cfts3-existing-bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1162,25 +1170,25 @@ "path": "cfts3-existing-bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1188,7 +1196,7 @@ "path": "cfts3-existing-bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1196,13 +1204,13 @@ "path": "cfts3-existing-bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1216,7 +1224,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.assets.json index 6bf04fb8d..7da87544b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "e72848c7923f76660dc8145c8e253ba8ac54fc6285c7fc06c78c5f3dc61e0c23": { + "8b921451ffafbc41e8d2ba51a3407ad7694217e500ed5032c7f1f14b7c89a329": { "source": { "path": "cfts3-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e72848c7923f76660dc8145c8e253ba8ac54fc6285c7fc06c78c5f3dc61e0c23.json", + "objectKey": "8b921451ffafbc41e8d2ba51a3407ad7694217e500ed5032c7f1f14b7c89a329.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.template.json index 21256223d..3b8759821 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/cfts3-no-arguments.template.json @@ -867,7 +867,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -878,7 +878,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -915,6 +923,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/manifest.json index 4239a4916..87f81efe9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/manifest.json @@ -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}/e72848c7923f76660dc8145c8e253ba8ac54fc6285c7fc06c78c5f3dc61e0c23.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8b921451ffafbc41e8d2ba51a3407ad7694217e500ed5032c7f1f14b7c89a329.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "testcloudfronts3CloudFrontDistribution0565DEE8" } ], + "/cfts3-no-arguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cfts3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/tree.json index c2f6d00c1..4927249e8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-arguments.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "cfts3-no-arguments/test-cloudfront-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -411,13 +411,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -429,19 +429,19 @@ "path": "cfts3-no-arguments/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "SetHttpSecurityHeaders": { @@ -465,13 +465,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -512,7 +512,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -646,13 +646,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -664,19 +664,19 @@ "path": "cfts3-no-arguments/test-cloudfront-s3/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -729,7 +729,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -827,13 +827,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -845,19 +845,19 @@ "path": "cfts3-no-arguments/test-cloudfront-s3/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontOac": { @@ -897,7 +897,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -968,19 +968,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cfts3-no-arguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -992,7 +1000,7 @@ "path": "cfts3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1000,7 +1008,7 @@ "path": "cfts3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1008,13 +1016,13 @@ "path": "cfts3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1042,7 +1050,7 @@ "path": "cfts3-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1050,25 +1058,25 @@ "path": "cfts3-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1076,7 +1084,7 @@ "path": "cfts3-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1084,13 +1092,13 @@ "path": "cfts3-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1104,7 +1112,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.assets.json index cb49e3c6b..c36b076a9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "4c525710315524310fe48071370bc56910286d917d2220bd18ba5eb8289bea35": { + "1b6403c9ed49e45f98967f4b122d393d13663756a40577955c38ab45ef221211": { "source": { "path": "cfts3-no-logging.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4c525710315524310fe48071370bc56910286d917d2220bd18ba5eb8289bea35.json", + "objectKey": "1b6403c9ed49e45f98967f4b122d393d13663756a40577955c38ab45ef221211.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.template.json index f4e3029de..ae4ca9393 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/cfts3-no-logging.template.json @@ -349,7 +349,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -360,7 +360,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -397,6 +405,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/manifest.json index 6853530b6..2c0a2334e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/manifest.json @@ -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}/4c525710315524310fe48071370bc56910286d917d2220bd18ba5eb8289bea35.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1b6403c9ed49e45f98967f4b122d393d13663756a40577955c38ab45ef221211.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -118,6 +118,12 @@ "data": "testcloudfronts3CloudFrontDistribution0565DEE8" } ], + "/cfts3-no-logging/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/tree.json index 2f0702a49..a78ae19c5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-logging.js.snapshot/tree.json @@ -63,7 +63,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -201,13 +201,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -219,19 +219,19 @@ "path": "cfts3-no-logging/test-cloudfront-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "SetHttpSecurityHeaders": { @@ -255,13 +255,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontOac": { @@ -301,7 +301,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -364,19 +364,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cfts3-no-logging/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -388,7 +396,7 @@ "path": "cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -396,7 +404,7 @@ "path": "cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -404,13 +412,13 @@ "path": "cfts3-no-logging/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -438,7 +446,7 @@ "path": "cfts3-no-logging/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -446,25 +454,25 @@ "path": "cfts3-no-logging/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -472,7 +480,7 @@ "path": "cfts3-no-logging/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -480,13 +488,13 @@ "path": "cfts3-no-logging/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -500,7 +508,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.assets.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.assets.json index ee710ce23..56f3cd6e4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "b81bc785d75ef4ac4f26316462e91986864e3a787c96b3f51a61fce507f2d147": { + "d713968c3a9fada0edc53db4912991a93dc7fde082e5627e5c2d4bb3803adf56": { "source": { "path": "cfts3-no-security-headers.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b81bc785d75ef4ac4f26316462e91986864e3a787c96b3f51a61fce507f2d147.json", + "objectKey": "d713968c3a9fada0edc53db4912991a93dc7fde082e5627e5c2d4bb3803adf56.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.template.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.template.json index dbcbf11e9..d6dd22780 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/cfts3-no-security-headers.template.json @@ -834,7 +834,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -845,7 +845,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -882,6 +890,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/manifest.json index 7abe7e568..53fba8fb9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/manifest.json @@ -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}/b81bc785d75ef4ac4f26316462e91986864e3a787c96b3f51a61fce507f2d147.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d713968c3a9fada0edc53db4912991a93dc7fde082e5627e5c2d4bb3803adf56.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -166,6 +166,12 @@ "data": "testcloudfronts3nosecurityheadersCloudFrontDistribution3BC8CDED" } ], + "/cfts3-no-security-headers/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/cfts3-no-security-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/tree.json index abb6beab1..41bfa7a61 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cloudfront-s3/test/integ.cfts3-no-security-headers.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "cfts3-no-security-headers/test-cloudfront-s3-no-security-headers/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -411,13 +411,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -429,19 +429,19 @@ "path": "cfts3-no-security-headers/test-cloudfront-s3-no-security-headers/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucketAccessLog": { @@ -482,7 +482,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -616,13 +616,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -634,19 +634,19 @@ "path": "cfts3-no-security-headers/test-cloudfront-s3-no-security-headers/CloudfrontLoggingBucketAccessLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudfrontLoggingBucket": { @@ -699,7 +699,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -797,13 +797,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -815,19 +815,19 @@ "path": "cfts3-no-security-headers/test-cloudfront-s3-no-security-headers/CloudfrontLoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontOac": { @@ -867,7 +867,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnOriginAccessControl", - "version": "2.143.0" + "version": "2.147.3" } }, "CloudFrontDistribution": { @@ -927,19 +927,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cloudfront-s3.CloudFrontToS3", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "cfts3-no-security-headers/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -951,7 +959,7 @@ "path": "cfts3-no-security-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -959,7 +967,7 @@ "path": "cfts3-no-security-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -967,13 +975,13 @@ "path": "cfts3-no-security-headers/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1001,7 +1009,7 @@ "path": "cfts3-no-security-headers/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1009,25 +1017,25 @@ "path": "cfts3-no-security-headers/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1035,7 +1043,7 @@ "path": "cfts3-no-security-headers/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1043,13 +1051,13 @@ "path": "cfts3-no-security-headers/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1063,7 +1071,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/cogapilam-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/cogapilam-no-arguments.assets.json index 5a1c7490e..1b22bb3fb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/cogapilam-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/cogapilam-no-arguments.assets.json @@ -14,7 +14,7 @@ } } }, - "e8c5a5735a1a959cb02d04eb9a0b57bd5ec395afd0de3da960012b87a99e0bd4": { + "01e356d443181f9e0421695a734f9a45f70713fd1db09ade6d79f3938b1dda74": { "source": { "path": "cogapilam-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e8c5a5735a1a959cb02d04eb9a0b57bd5ec395afd0de3da960012b87a99e0bd4.json", + "objectKey": "01e356d443181f9e0421695a734f9a45f70713fd1db09ade6d79f3938b1dda74.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/cogapilam-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/cogapilam-no-arguments.template.json index 460946231..54fa27d7f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/cogapilam-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/cogapilam-no-arguments.template.json @@ -110,7 +110,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/manifest.json index b7add41ca..840b997b4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/manifest.json @@ -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}/e8c5a5735a1a959cb02d04eb9a0b57bd5ec395afd0de3da960012b87a99e0bd4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/01e356d443181f9e0421695a734f9a45f70713fd1db09ade6d79f3938b1dda74.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/tree.json index 3133cdec4..39c3c104f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "cogapilam-no-arguments/test-cognito-apigateway-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -120,19 +120,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -148,7 +148,7 @@ "path": "cogapilam-no-arguments/test-cognito-apigateway-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -156,13 +156,13 @@ "path": "cogapilam-no-arguments/test-cognito-apigateway-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -189,7 +189,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -197,13 +197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiAccessLogGroup": { @@ -219,13 +219,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaRestApi": { @@ -248,7 +248,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "Deployment": { @@ -269,13 +269,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.118.0" + "version": "2.145.0" } }, "DeploymentStage.prod": { @@ -317,13 +317,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.118.0" + "version": "2.145.0" } }, "Endpoint": { @@ -331,7 +331,7 @@ "path": "cogapilam-no-arguments/test-cognito-apigateway-lambda/LambdaRestApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.118.0" + "version": "2.145.0" } }, "Default": { @@ -362,7 +362,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -415,7 +415,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.cogapilamnoargumentstestcognitoapigatewaylambdaLambdaRestApi67DF35F8.ANY..{proxy+}": { @@ -460,7 +460,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -508,19 +508,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ProxyResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -573,7 +573,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.cogapilamnoargumentstestcognitoapigatewaylambdaLambdaRestApi67DF35F8.ANY..": { @@ -618,7 +618,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -669,19 +669,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.118.0" + "version": "2.145.0" } }, "UsagePlan": { @@ -709,19 +709,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnUsagePlan", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.UsagePlan", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.LambdaRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaRestApiCloudWatchRole": { @@ -733,7 +733,7 @@ "path": "cogapilam-no-arguments/test-cognito-apigateway-lambda/LambdaRestApiCloudWatchRole/ImportLambdaRestApiCloudWatchRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -800,13 +800,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaRestApiAccount": { @@ -825,7 +825,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAccount", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoUserPool": { @@ -869,13 +869,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoUserPoolClient": { @@ -913,13 +913,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoAuthorizer": { @@ -946,13 +946,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAuthorizer", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-cognito-apigateway-lambda.CognitoToApiGatewayToLambda", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -968,7 +968,7 @@ "path": "cogapilam-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -980,7 +980,7 @@ "path": "cogapilam-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -988,25 +988,25 @@ "path": "cogapilam-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -1014,7 +1014,7 @@ "path": "cogapilam-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1022,13 +1022,13 @@ "path": "cogapilam-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -1036,13 +1036,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.ts index b677402a7..8b133f840 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/integ.cogapilam-no-arguments.ts @@ -18,6 +18,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as cdk from 'aws-cdk-lib'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -25,7 +26,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; diff --git a/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/test.cognito-apigateway-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/test.cognito-apigateway-lambda.test.ts index 1628f0026..7ad988b33 100644 --- a/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/test.cognito-apigateway-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-cognito-apigateway-lambda/test/test.cognito-apigateway-lambda.test.ts @@ -17,11 +17,12 @@ import * as cognito from 'aws-cdk-lib/aws-cognito'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as api from 'aws-cdk-lib/aws-apigateway'; import { Template } from "aws-cdk-lib/assertions"; +import * as defaults from '@aws-solutions-constructs/core'; function deployNewFunc(stack: cdk.Stack) { const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -35,7 +36,7 @@ test('override cognito properties', () => { const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -103,7 +104,7 @@ test('override cognito cognitoUserPoolClientProps', () => { const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -132,7 +133,7 @@ test('Check for default Cognito Auth Type', () => { const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -171,7 +172,7 @@ test('override Auth Type to COGNITO', () => { const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -215,7 +216,7 @@ test('Try to override Auth Type to NONE', () => { const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -259,7 +260,7 @@ test('Override apiGatewayProps', () => { const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -305,7 +306,7 @@ test('Override apiGatewayProps to support CORS', () => { const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -371,7 +372,7 @@ test('Override apiGatewayProps with proxy = false and add POST method', () => { const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -410,7 +411,7 @@ test('Override apiGatewayProps with proxy = false and add OPTIONS method', () => const lambdaFunctionProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -444,7 +445,7 @@ test('Override apiGatewayProps with proxy = false and add OPTIONS method', () => test('Confirm CheckLambdaProps is being called', () => { const stack = new cdk.Stack(); const existingLambdaObj = new lambda.Function(stack, 'ExistingLambda', { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -452,7 +453,7 @@ test('Confirm CheckLambdaProps is being called', () => { const props: CognitoToApiGatewayToLambdaProps = { existingLambdaObj, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), } diff --git a/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/facs3-defaults.assets.json b/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/facs3-defaults.assets.json index 48131e383..297de0cb7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/facs3-defaults.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/facs3-defaults.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "1e17b90810968629b1054d57627dec33416d760d218b930f17bf30a9de550ecb": { + "dd47204c33ee84e713fb37738872afcc3b4f6ab12d83a0305d7ceb2525aecdc8": { "source": { "path": "facs3-defaults.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1e17b90810968629b1054d57627dec33416d760d218b930f17bf30a9de550ecb.json", + "objectKey": "dd47204c33ee84e713fb37738872afcc3b4f6ab12d83a0305d7ceb2525aecdc8.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/facs3-defaults.template.json b/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/facs3-defaults.template.json index 3dd48a7ee..8cca9ec62 100644 --- a/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/facs3-defaults.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/facs3-defaults.template.json @@ -301,7 +301,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -312,7 +312,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -349,6 +357,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/manifest.json index 2c77d258b..5cd844b85 100644 --- a/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/manifest.json @@ -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}/1e17b90810968629b1054d57627dec33416d760d218b930f17bf30a9de550ecb.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dd47204c33ee84e713fb37738872afcc3b4f6ab12d83a0305d7ceb2525aecdc8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -112,6 +112,12 @@ "data": "integtesttestS3BucketPolicy54E2DE38" } ], + "/facs3-defaults/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/facs3-defaults/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/tree.json index 7e8f8f7df..a2b59b7dd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-constructs-factories/test/s3/integ.facs3-defaults.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "facs3-defaults/integ-test/testS3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "testS3Bucket": { @@ -267,7 +267,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -326,25 +326,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-constructs-factories.ConstructsFactories", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "facs3-defaults/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -356,7 +364,7 @@ "path": "facs3-defaults/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -364,7 +372,7 @@ "path": "facs3-defaults/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -372,13 +380,13 @@ "path": "facs3-defaults/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -406,7 +414,7 @@ "path": "facs3-defaults/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -414,25 +422,25 @@ "path": "facs3-defaults/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -440,7 +448,7 @@ "path": "facs3-defaults/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -448,13 +456,13 @@ "path": "facs3-defaults/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -468,7 +476,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/dynamodbstreams-lambda-elasticsearch-kibana.test.ts b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/dynamodbstreams-lambda-elasticsearch-kibana.test.ts index d273f24f0..2f28d8925 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/dynamodbstreams-lambda-elasticsearch-kibana.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/dynamodbstreams-lambda-elasticsearch-kibana.test.ts @@ -30,7 +30,7 @@ function deployNewFunc(stack: cdk.Stack) { function getDefaultTestLambdaProps(): lambda.FunctionProps { return { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }; } @@ -249,7 +249,7 @@ test('Confirm CheckVpcProps is being called', () => { test('Confirm CheckLambdaProps is being called', () => { const stack = new cdk.Stack(); const existingLambdaObj = new lambda.Function(stack, 'ExistingLambda', { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -258,7 +258,7 @@ test('Confirm CheckLambdaProps is being called', () => { domainName: 'test-name', existingLambdaObj, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), } diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/dbslamels-deploy-with-vpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/dbslamels-deploy-with-vpc.assets.json index a489456a1..61d02a100 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/dbslamels-deploy-with-vpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/dbslamels-deploy-with-vpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "2cc77cbeb62332eb7020ce4ef8f6b15d935f48451d961274f61e61528c08625c": { + "143767da2e83c36e62a38c471262f37f5cb4d0680e0c5e3a7c72b1a30c097f23": { "source": { "path": "dbslamels-deploy-with-vpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2cc77cbeb62332eb7020ce4ef8f6b15d935f48451d961274f61e61528c08625c.json", + "objectKey": "143767da2e83c36e62a38c471262f37f5cb4d0680e0c5e3a7c72b1a30c097f23.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/dbslamels-deploy-with-vpc.template.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/dbslamels-deploy-with-vpc.template.json index 60bc66aad..c615b27b2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/dbslamels-deploy-with-vpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/dbslamels-deploy-with-vpc.template.json @@ -180,7 +180,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1391,7 +1391,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1402,7 +1402,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1428,6 +1436,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/manifest.json index 52bb58dd2..e6c7a40c2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/manifest.json @@ -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}/2cc77cbeb62332eb7020ce4ef8f6b15d935f48451d961274f61e61528c08625c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/143767da2e83c36e62a38c471262f37f5cb4d0680e0c5e3a7c72b1a30c097f23.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -310,6 +310,12 @@ "data": "testddbstreamslambdaeskDynamoDBStreamsToLambdaSqsDlqQueuePolicyD4864CD5" } ], + "/dbslamels-deploy-with-vpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/dbslamels-deploy-with-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/tree.json index 1adf17ed3..e85d9714c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.js.snapshot/tree.json @@ -25,7 +25,7 @@ "path": "dbslamels-deploy-with-vpc/test-ddbstreams-lambda-esk/LambdaToElasticSearch/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -88,7 +88,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -158,19 +158,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -198,13 +198,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -220,7 +220,7 @@ "path": "dbslamels-deploy-with-vpc/test-ddbstreams-lambda-esk/LambdaToElasticSearch/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -228,13 +228,13 @@ "path": "dbslamels-deploy-with-vpc/test-ddbstreams-lambda-esk/LambdaToElasticSearch/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -267,7 +267,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -293,7 +293,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } }, "DynamoDBEventSource:dbslamelsdeploywithvpctestddbstreamslambdaeskDynamoDBStreamsToLambdaDynamoTable3450D243": { @@ -334,19 +334,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPool": { @@ -390,13 +390,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPoolClient": { @@ -434,13 +434,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoIdentityPool": { @@ -468,7 +468,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.147.3" } }, "UserPoolDomain": { @@ -515,7 +515,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoAuthorizedRole": { @@ -527,7 +527,7 @@ "path": "dbslamels-deploy-with-vpc/test-ddbstreams-lambda-esk/LambdaToElasticSearch/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -628,13 +628,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IdentityPoolRoleMapping": { @@ -658,7 +658,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoKibanaConfigureRole": { @@ -670,7 +670,7 @@ "path": "dbslamels-deploy-with-vpc/test-ddbstreams-lambda-esk/LambdaToElasticSearch/CognitoKibanaConfigureRole/ImportCognitoKibanaConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -695,13 +695,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoKibanaConfigureRolePolicy": { @@ -843,13 +843,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "ElasticsearchDomain": { @@ -1030,7 +1030,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticsearch.CfnDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusRedAlarm": { @@ -1055,13 +1055,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusYellowAlarm": { @@ -1086,13 +1086,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "FreeStorageSpaceTooLowAlarm": { @@ -1117,13 +1117,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "IndexWritesBlockedTooHighAlarm": { @@ -1148,13 +1148,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1179,13 +1179,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "CPUUtilizationTooHighAlarm": { @@ -1210,13 +1210,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1241,13 +1241,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1272,13 +1272,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1303,19 +1303,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-elasticsearch-kibana.LambdaToElasticSearchAndKibana", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -1342,7 +1342,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -1386,7 +1386,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1394,7 +1394,7 @@ "path": "dbslamels-deploy-with-vpc/test-ddbstreams-lambda-esk/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1416,7 +1416,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1435,13 +1435,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -1485,7 +1485,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1493,7 +1493,7 @@ "path": "dbslamels-deploy-with-vpc/test-ddbstreams-lambda-esk/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1515,7 +1515,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1534,13 +1534,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1552,13 +1552,13 @@ "path": "dbslamels-deploy-with-vpc/test-ddbstreams-lambda-esk/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1574,7 +1574,7 @@ "path": "dbslamels-deploy-with-vpc/test-ddbstreams-lambda-esk/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1605,7 +1605,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1657,19 +1657,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1693,13 +1693,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1733,19 +1733,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "DynamoDBStreamsToLambda": { @@ -1788,7 +1788,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.118.0" + "version": "2.147.3" } }, "ScalingRole": { @@ -1796,13 +1796,13 @@ "path": "dbslamels-deploy-with-vpc/test-ddbstreams-lambda-esk/DynamoDBStreamsToLambda/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.118.0" + "version": "2.147.3" } }, "SqsDlqQueue": { @@ -1820,7 +1820,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -1903,31 +1903,39 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-dynamodbstreams-lambda.DynamoDBStreamsToLambda", - "version": "2.51.0" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana.DynamoDBStreamsToLambdaToElasticSearchAndKibana", - "version": "2.51.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "dbslamels-deploy-with-vpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1939,7 +1947,7 @@ "path": "dbslamels-deploy-with-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1947,7 +1955,7 @@ "path": "dbslamels-deploy-with-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1955,13 +1963,13 @@ "path": "dbslamels-deploy-with-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1989,7 +1997,7 @@ "path": "dbslamels-deploy-with-vpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1997,25 +2005,25 @@ "path": "dbslamels-deploy-with-vpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2023,7 +2031,7 @@ "path": "dbslamels-deploy-with-vpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2031,13 +2039,13 @@ "path": "dbslamels-deploy-with-vpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -2051,7 +2059,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.ts b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.ts index 45d39caa0..5defcbf41 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-deploy-with-vpc.ts @@ -17,6 +17,7 @@ import { DynamoDBStreamsToLambdaToElasticSearchAndKibanaProps, DynamoDBStreamsTo import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, CreateShortUniqueTestName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); @@ -26,7 +27,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const props: DynamoDBStreamsToLambdaToElasticSearchAndKibanaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, domainName: CreateShortUniqueTestName("dmn"), diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/dbslamels-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/dbslamels-no-arguments.assets.json index 1d23c3cd7..b04647d3f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/dbslamels-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/dbslamels-no-arguments.assets.json @@ -14,7 +14,7 @@ } } }, - "dab447c2fff85dba815a02dda8bcbd94a0f4c04f4ed00750f937a7092bfd352a": { + "14d34fb9c9c277e49559106c6c38712ac06b9730490f4acb17b3127b63f4d722": { "source": { "path": "dbslamels-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dab447c2fff85dba815a02dda8bcbd94a0f4c04f4ed00750f937a7092bfd352a.json", + "objectKey": "14d34fb9c9c277e49559106c6c38712ac06b9730490f4acb17b3127b63f4d722.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/dbslamels-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/dbslamels-no-arguments.template.json index bfd1729b8..753b84a13 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/dbslamels-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/dbslamels-no-arguments.template.json @@ -145,7 +145,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/manifest.json index b56d42105..a6eca4793 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/manifest.json @@ -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}/dab447c2fff85dba815a02dda8bcbd94a0f4c04f4ed00750f937a7092bfd352a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/14d34fb9c9c277e49559106c6c38712ac06b9730490f4acb17b3127b63f4d722.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/tree.json index 35bc08acf..864bc6467 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.js.snapshot/tree.json @@ -25,7 +25,7 @@ "path": "dbslamels-no-arguments/test-ddbstreams-lambda-esk/LambdaToElasticSearch/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -88,7 +88,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -153,19 +153,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -181,7 +181,7 @@ "path": "dbslamels-no-arguments/test-ddbstreams-lambda-esk/LambdaToElasticSearch/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -189,13 +189,13 @@ "path": "dbslamels-no-arguments/test-ddbstreams-lambda-esk/LambdaToElasticSearch/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -228,7 +228,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -236,7 +236,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "DynamoDBEventSource:dbslamelsnoargumentstestddbstreamslambdaeskDynamoDBStreamsToLambdaDynamoTableE5DA3737": { @@ -277,19 +277,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoUserPool": { @@ -333,13 +333,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoUserPoolClient": { @@ -377,13 +377,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoIdentityPool": { @@ -411,7 +411,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.145.0" } }, "UserPoolDomain": { @@ -458,7 +458,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoAuthorizedRole": { @@ -470,7 +470,7 @@ "path": "dbslamels-no-arguments/test-ddbstreams-lambda-esk/LambdaToElasticSearch/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -571,13 +571,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "IdentityPoolRoleMapping": { @@ -601,7 +601,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoKibanaConfigureRole": { @@ -613,7 +613,7 @@ "path": "dbslamels-no-arguments/test-ddbstreams-lambda-esk/LambdaToElasticSearch/CognitoKibanaConfigureRole/ImportCognitoKibanaConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -638,13 +638,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoKibanaConfigureRolePolicy": { @@ -786,13 +786,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } }, "ElasticsearchDomain": { @@ -955,7 +955,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticsearch.CfnDomain", - "version": "2.118.0" + "version": "2.145.0" } }, "StatusRedAlarm": { @@ -980,13 +980,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "StatusYellowAlarm": { @@ -1011,13 +1011,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "FreeStorageSpaceTooLowAlarm": { @@ -1042,13 +1042,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "IndexWritesBlockedTooHighAlarm": { @@ -1073,13 +1073,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1104,13 +1104,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "CPUUtilizationTooHighAlarm": { @@ -1135,13 +1135,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1166,13 +1166,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1197,13 +1197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1228,19 +1228,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-elasticsearch-kibana.LambdaToElasticSearchAndKibana", - "version": "2.50.0" + "version": "2.60.0" } }, "DynamoDBStreamsToLambda": { @@ -1283,7 +1283,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.118.0" + "version": "2.145.0" } }, "ScalingRole": { @@ -1291,13 +1291,13 @@ "path": "dbslamels-no-arguments/test-ddbstreams-lambda-esk/DynamoDBStreamsToLambda/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.118.0" + "version": "2.145.0" } }, "SqsDlqQueue": { @@ -1315,7 +1315,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.145.0" } }, "Policy": { @@ -1398,31 +1398,31 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-dynamodbstreams-lambda.DynamoDBStreamsToLambda", - "version": "2.50.0" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana.DynamoDBStreamsToLambdaToElasticSearchAndKibana", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -1438,7 +1438,7 @@ "path": "dbslamels-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -1450,7 +1450,7 @@ "path": "dbslamels-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1458,25 +1458,25 @@ "path": "dbslamels-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -1484,7 +1484,7 @@ "path": "dbslamels-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1492,13 +1492,13 @@ "path": "dbslamels-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -1506,13 +1506,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.ts index a6feb6ac7..5962a9ff8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda-elasticsearch-kibana/test/integ.dbslamels-no-arguments.ts @@ -17,6 +17,7 @@ import { DynamoDBStreamsToLambdaToElasticSearchAndKibanaProps, DynamoDBStreamsTo import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, CreateShortUniqueTestName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); @@ -26,7 +27,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const props: DynamoDBStreamsToLambdaToElasticSearchAndKibanaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, domainName: CreateShortUniqueTestName("dmn"), diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/dynamodbstreams-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/dynamodbstreams-lambda.test.ts index c6922d01a..0a70ce883 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/dynamodbstreams-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/dynamodbstreams-lambda.test.ts @@ -16,12 +16,13 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'; import * as cdk from "aws-cdk-lib"; import { Template } from "aws-cdk-lib/assertions"; +import * as defaults from '@aws-solutions-constructs/core'; function deployNewFunc(stack: cdk.Stack) { const props: DynamoDBStreamsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, }; @@ -57,7 +58,7 @@ test('check DynamoEventSourceProps override', () => { const props: DynamoDBStreamsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, dynamoEventSourceProps: { @@ -144,7 +145,7 @@ test('check dynamodb table stream override', () => { const props: DynamoDBStreamsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, dynamoTableProps: { @@ -206,7 +207,7 @@ test('check getter methods with existingTableInterface', () => { }), lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, }); @@ -237,7 +238,7 @@ test('check dynamodb table stream override with ITable', () => { const props: DynamoDBStreamsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingTableInterface @@ -299,14 +300,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new cdk.Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: DynamoDBStreamsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/dbslam-existing-table.assets.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/dbslam-existing-table.assets.json index aaf2aa05a..dce6085b5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/dbslam-existing-table.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/dbslam-existing-table.assets.json @@ -14,7 +14,7 @@ } } }, - "a0235316fbe245fc4c80d459c1e107f793b958bdb2099e3776aa30f6003a7273": { + "986ac120121bee4342c962555c67e101b2a94a542818f5743fe044b030f7ba1d": { "source": { "path": "dbslam-existing-table.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a0235316fbe245fc4c80d459c1e107f793b958bdb2099e3776aa30f6003a7273.json", + "objectKey": "986ac120121bee4342c962555c67e101b2a94a542818f5743fe044b030f7ba1d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/dbslam-existing-table.template.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/dbslam-existing-table.template.json index eb7d68be5..64490c9ab 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/dbslam-existing-table.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/dbslam-existing-table.template.json @@ -168,7 +168,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/manifest.json index 438deb876..f4fbd3ef7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/manifest.json @@ -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}/a0235316fbe245fc4c80d459c1e107f793b958bdb2099e3776aa30f6003a7273.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/986ac120121bee4342c962555c67e101b2a94a542818f5743fe044b030f7ba1d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/tree.json index a491430be..6c2988823 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.js.snapshot/tree.json @@ -44,7 +44,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.118.0" + "version": "2.145.0" } }, "ScalingRole": { @@ -52,13 +52,13 @@ "path": "dbslam-existing-table/mytable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.118.0" + "version": "2.145.0" } }, "test-dynamodbstreams-lambda": { @@ -74,7 +74,7 @@ "path": "dbslam-existing-table/test-dynamodbstreams-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -137,7 +137,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -202,19 +202,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -230,7 +230,7 @@ "path": "dbslam-existing-table/test-dynamodbstreams-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -238,13 +238,13 @@ "path": "dbslam-existing-table/test-dynamodbstreams-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -271,7 +271,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -279,7 +279,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "DynamoDBEventSource:dbslamexistingtablemytable00A85A16": { @@ -320,19 +320,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "SqsDlqQueue": { @@ -350,7 +350,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.145.0" } }, "Policy": { @@ -433,25 +433,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-dynamodbstreams-lambda.DynamoDBStreamsToLambda", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -467,7 +467,7 @@ "path": "dbslam-existing-table/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -479,7 +479,7 @@ "path": "dbslam-existing-table/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -487,25 +487,25 @@ "path": "dbslam-existing-table/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -513,7 +513,7 @@ "path": "dbslam-existing-table/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -521,13 +521,13 @@ "path": "dbslam-existing-table/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -535,13 +535,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.ts b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.ts index 56b3bf32c..dd2bcc35b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.ts +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-existing-table.ts @@ -18,6 +18,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); @@ -37,7 +38,7 @@ const table = new dynamodb.Table(stack, 'mytable', { const props: DynamoDBStreamsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingTableInterface: table diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/dbslam-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/dbslam-no-arguments.assets.json index 15f186dcb..80b54ec06 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/dbslam-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/dbslam-no-arguments.assets.json @@ -14,7 +14,7 @@ } } }, - "a8a3c302344f84651e414b63ecbbb5d856844c1c7588bdbe3f876c19a465a1cb": { + "2b103fa3ac85e34f5bed972fcae6dd422f1d7f3cacfb2988ca39b02fbe112ea4": { "source": { "path": "dbslam-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a8a3c302344f84651e414b63ecbbb5d856844c1c7588bdbe3f876c19a465a1cb.json", + "objectKey": "2b103fa3ac85e34f5bed972fcae6dd422f1d7f3cacfb2988ca39b02fbe112ea4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/dbslam-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/dbslam-no-arguments.template.json index 4d471e259..7413f2d4f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/dbslam-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/dbslam-no-arguments.template.json @@ -139,7 +139,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/manifest.json index 4d6e680fa..74de2cf19 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/manifest.json @@ -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}/a8a3c302344f84651e414b63ecbbb5d856844c1c7588bdbe3f876c19a465a1cb.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2b103fa3ac85e34f5bed972fcae6dd422f1d7f3cacfb2988ca39b02fbe112ea4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/tree.json index 071f39ab1..15d6ba682 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "dbslam-no-arguments/test-dynamodbstreams-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -149,19 +149,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -177,7 +177,7 @@ "path": "dbslam-no-arguments/test-dynamodbstreams-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -185,13 +185,13 @@ "path": "dbslam-no-arguments/test-dynamodbstreams-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -218,7 +218,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -226,7 +226,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "DynamoDBEventSource:dbslamnoargumentstestdynamodbstreamslambdaDynamoTable052A3271": { @@ -267,19 +267,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "DynamoTable": { @@ -318,7 +318,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.118.0" + "version": "2.145.0" } }, "ScalingRole": { @@ -326,13 +326,13 @@ "path": "dbslam-no-arguments/test-dynamodbstreams-lambda/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.118.0" + "version": "2.145.0" } }, "SqsDlqQueue": { @@ -350,7 +350,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.118.0" + "version": "2.145.0" } }, "Policy": { @@ -433,25 +433,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-dynamodbstreams-lambda.DynamoDBStreamsToLambda", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -467,7 +467,7 @@ "path": "dbslam-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -479,7 +479,7 @@ "path": "dbslam-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -487,25 +487,25 @@ "path": "dbslam-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -513,7 +513,7 @@ "path": "dbslam-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -521,13 +521,13 @@ "path": "dbslam-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -535,13 +535,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.ts index db3fd155b..ea7e9b071 100644 --- a/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-dynamodbstreams-lambda/test/integ.dbslam-no-arguments.ts @@ -17,6 +17,7 @@ import { DynamoDBStreamsToLambdaProps, DynamoDBStreamsToLambda } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); @@ -26,7 +27,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const props: DynamoDBStreamsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, dynamoEventSourceProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/evtfhss3-customLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/evtfhss3-customLoggingBucket.assets.json index f33eca0d0..46f8c19a2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/evtfhss3-customLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/evtfhss3-customLoggingBucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "05b44dcacfb62ae1d40568e79d611768bce92af67e49dc8b3887b8093502f963": { + "1668565fe44035ddafd23c4303f9c5f2fae9b451163db0200662f0a26b2e8d0a": { "source": { "path": "evtfhss3-customLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "05b44dcacfb62ae1d40568e79d611768bce92af67e49dc8b3887b8093502f963.json", + "objectKey": "1668565fe44035ddafd23c4303f9c5f2fae9b451163db0200662f0a26b2e8d0a.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/evtfhss3-customLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/evtfhss3-customLoggingBucket.template.json index b865b1afa..d47111101 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/evtfhss3-customLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/evtfhss3-customLoggingBucket.template.json @@ -636,7 +636,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -647,7 +647,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -684,6 +692,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/manifest.json index f3ccfb877..6d8b42b4e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/manifest.json @@ -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}/05b44dcacfb62ae1d40568e79d611768bce92af67e49dc8b3887b8093502f963.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1668565fe44035ddafd23c4303f9c5f2fae9b451163db0200662f0a26b2e8d0a.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -166,6 +166,12 @@ "data": "evtfhss3customlogbucketEventsRuleA7736706" } ], + "/evtfhss3-customLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/evtfhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/tree.json index 08984f6cf..ff4b309a5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-customLoggingBucket.js.snapshot/tree.json @@ -67,7 +67,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -201,13 +201,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -219,19 +219,19 @@ "path": "evtfhss3-customLoggingBucket/evtfhss3-custom-log-bucket/KinesisFirehoseToS3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -290,7 +290,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -388,13 +388,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -406,19 +406,19 @@ "path": "evtfhss3-customLoggingBucket/evtfhss3-custom-log-bucket/KinesisFirehoseToS3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -434,7 +434,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -454,19 +454,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -478,7 +478,7 @@ "path": "evtfhss3-customLoggingBucket/evtfhss3-custom-log-bucket/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -503,13 +503,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -601,13 +601,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -676,13 +676,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -690,7 +690,7 @@ "path": "evtfhss3-customLoggingBucket/evtfhss3-custom-log-bucket/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRuleInvokeKinesisFirehoseRole": { @@ -702,7 +702,7 @@ "path": "evtfhss3-customLoggingBucket/evtfhss3-custom-log-bucket/EventsRuleInvokeKinesisFirehoseRole/ImportEventsRuleInvokeKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -728,13 +728,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRuleInvokeKinesisFirehosePolicy": { @@ -775,13 +775,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRule": { @@ -817,19 +817,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3.EventbridgeToKinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "evtfhss3-customLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -841,7 +849,7 @@ "path": "evtfhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -849,7 +857,7 @@ "path": "evtfhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -857,13 +865,13 @@ "path": "evtfhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -879,7 +887,7 @@ "path": "evtfhss3-customLoggingBucket/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -891,7 +899,7 @@ "path": "evtfhss3-customLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -899,25 +907,25 @@ "path": "evtfhss3-customLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -925,7 +933,7 @@ "path": "evtfhss3-customLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -933,13 +941,13 @@ "path": "evtfhss3-customLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -947,13 +955,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/evtfhss3-existing-eventbus.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/evtfhss3-existing-eventbus.assets.json index 7abc25f88..248dc0395 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/evtfhss3-existing-eventbus.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/evtfhss3-existing-eventbus.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "60d5bc71dacb082ffc42997dc838b711997eec257f157353da1ea7a660231f97": { + "01163a2b86e72f309b7d72bad2c8391e5bca6abe5492e0d76247630092b93ef1": { "source": { "path": "evtfhss3-existing-eventbus.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "60d5bc71dacb082ffc42997dc838b711997eec257f157353da1ea7a660231f97.json", + "objectKey": "01163a2b86e72f309b7d72bad2c8391e5bca6abe5492e0d76247630092b93ef1.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/evtfhss3-existing-eventbus.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/evtfhss3-existing-eventbus.template.json index 4c8c78b0b..1721af508 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/evtfhss3-existing-eventbus.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/evtfhss3-existing-eventbus.template.json @@ -460,7 +460,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -471,7 +471,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -508,6 +516,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/manifest.json index 4994010a5..0f6c72f48 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/manifest.json @@ -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}/60d5bc71dacb082ffc42997dc838b711997eec257f157353da1ea7a660231f97.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/01163a2b86e72f309b7d72bad2c8391e5bca6abe5492e0d76247630092b93ef1.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -154,6 +154,12 @@ "data": "evtfhss3existingbusEventsRule7E0DBD3A" } ], + "/evtfhss3-existing-eventbus/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/evtfhss3-existing-eventbus/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/tree.json index 15caeb9e4..a37061d0b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existing-eventbus.js.snapshot/tree.json @@ -23,13 +23,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.118.0" + "version": "2.147.3" } }, "evtfhss3-existing-bus": { @@ -91,7 +91,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -189,13 +189,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -207,19 +207,19 @@ "path": "evtfhss3-existing-eventbus/evtfhss3-existing-bus/KinesisFirehoseToS3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -235,7 +235,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -255,19 +255,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -279,7 +279,7 @@ "path": "evtfhss3-existing-eventbus/evtfhss3-existing-bus/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -304,13 +304,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -402,13 +402,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -477,13 +477,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -491,7 +491,7 @@ "path": "evtfhss3-existing-eventbus/evtfhss3-existing-bus/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRuleInvokeKinesisFirehoseRole": { @@ -503,7 +503,7 @@ "path": "evtfhss3-existing-eventbus/evtfhss3-existing-bus/EventsRuleInvokeKinesisFirehoseRole/ImportEventsRuleInvokeKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -529,13 +529,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRuleInvokeKinesisFirehosePolicy": { @@ -576,13 +576,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRule": { @@ -625,19 +625,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3.EventbridgeToKinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "evtfhss3-existing-eventbus/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -649,7 +657,7 @@ "path": "evtfhss3-existing-eventbus/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -657,7 +665,7 @@ "path": "evtfhss3-existing-eventbus/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -665,13 +673,13 @@ "path": "evtfhss3-existing-eventbus/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -687,7 +695,7 @@ "path": "evtfhss3-existing-eventbus/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -699,7 +707,7 @@ "path": "evtfhss3-existing-eventbus/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -707,25 +715,25 @@ "path": "evtfhss3-existing-eventbus/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -733,7 +741,7 @@ "path": "evtfhss3-existing-eventbus/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -741,13 +749,13 @@ "path": "evtfhss3-existing-eventbus/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -755,13 +763,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/evtfhss3-existingLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/evtfhss3-existingLoggingBucket.assets.json index 9180eecaf..960381967 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/evtfhss3-existingLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/evtfhss3-existingLoggingBucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "e9d284e09be69996dfc9ecfbaaaf2a08820fcdfb1150f6b6f5fd2c192a5756bd": { + "666312ef03d20906ed18b48a849d5a0edcfd5807c9e6babd4b1a79dbc50b62a4": { "source": { "path": "evtfhss3-existingLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e9d284e09be69996dfc9ecfbaaaf2a08820fcdfb1150f6b6f5fd2c192a5756bd.json", + "objectKey": "666312ef03d20906ed18b48a849d5a0edcfd5807c9e6babd4b1a79dbc50b62a4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/evtfhss3-existingLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/evtfhss3-existingLoggingBucket.template.json index ab15fc2eb..3deccc25d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/evtfhss3-existingLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/evtfhss3-existingLoggingBucket.template.json @@ -205,7 +205,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -216,7 +216,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -772,6 +780,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/manifest.json index 92c0ea083..bc90f56e3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/manifest.json @@ -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}/e9d284e09be69996dfc9ecfbaaaf2a08820fcdfb1150f6b6f5fd2c192a5756bd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/666312ef03d20906ed18b48a849d5a0edcfd5807c9e6babd4b1a79dbc50b62a4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/evtfhss3-existingLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/evtfhss3-existingLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/tree.json index 0e298530d..dfa1e4f11 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-existingLoggingBucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "evtfhss3-existingLoggingBucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "evtfhss3-existingLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "evtfhss3-existingLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "evtfhss3-existingLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "evtfhss3-existingLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -412,13 +420,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -430,19 +438,19 @@ "path": "evtfhss3-existingLoggingBucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "evtfhss3-existing-log-bucket": { @@ -503,7 +511,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -562,19 +570,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -590,7 +598,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -610,19 +618,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -634,7 +642,7 @@ "path": "evtfhss3-existingLoggingBucket/evtfhss3-existing-log-bucket/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -659,13 +667,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -757,13 +765,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -832,13 +840,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -846,7 +854,7 @@ "path": "evtfhss3-existingLoggingBucket/evtfhss3-existing-log-bucket/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRuleInvokeKinesisFirehoseRole": { @@ -858,7 +866,7 @@ "path": "evtfhss3-existingLoggingBucket/evtfhss3-existing-log-bucket/EventsRuleInvokeKinesisFirehoseRole/ImportEventsRuleInvokeKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -884,13 +892,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRuleInvokeKinesisFirehosePolicy": { @@ -931,13 +939,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRule": { @@ -973,19 +981,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3.EventbridgeToKinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -1001,7 +1009,7 @@ "path": "evtfhss3-existingLoggingBucket/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -1013,7 +1021,7 @@ "path": "evtfhss3-existingLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1021,25 +1029,25 @@ "path": "evtfhss3-existingLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1047,7 +1055,7 @@ "path": "evtfhss3-existingLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1055,13 +1063,13 @@ "path": "evtfhss3-existingLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1069,13 +1077,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/evtfhss3-new-eventbus.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/evtfhss3-new-eventbus.assets.json index a6eb16240..907bea5ce 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/evtfhss3-new-eventbus.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/evtfhss3-new-eventbus.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "cbdc960873372015e7bf43973e2e6af23982cfe719eabcba949f94e10d976acd": { + "650d26afc264a01412398ce6e3c67d5b4f9cfcae7a12fa3fa60b33325e41d93d": { "source": { "path": "evtfhss3-new-eventbus.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "cbdc960873372015e7bf43973e2e6af23982cfe719eabcba949f94e10d976acd.json", + "objectKey": "650d26afc264a01412398ce6e3c67d5b4f9cfcae7a12fa3fa60b33325e41d93d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/evtfhss3-new-eventbus.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/evtfhss3-new-eventbus.template.json index a8f41d3b9..d8b4abe85 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/evtfhss3-new-eventbus.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/evtfhss3-new-eventbus.template.json @@ -460,7 +460,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -471,7 +471,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -508,6 +516,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/manifest.json index e60f39f2c..f78d768c9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/manifest.json @@ -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}/cbdc960873372015e7bf43973e2e6af23982cfe719eabcba949f94e10d976acd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/650d26afc264a01412398ce6e3c67d5b4f9cfcae7a12fa3fa60b33325e41d93d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -154,6 +154,12 @@ "data": "evtfhss3newbusEventsRule997850BF" } ], + "/evtfhss3-new-eventbus/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/evtfhss3-new-eventbus/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/tree.json index 57dec6b71..acb040408 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-new-eventbus.js.snapshot/tree.json @@ -67,7 +67,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -165,13 +165,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -183,19 +183,19 @@ "path": "evtfhss3-new-eventbus/evtfhss3-new-bus/KinesisFirehoseToS3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -211,7 +211,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -231,19 +231,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -255,7 +255,7 @@ "path": "evtfhss3-new-eventbus/evtfhss3-new-bus/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -280,13 +280,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -378,13 +378,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -453,13 +453,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -467,7 +467,7 @@ "path": "evtfhss3-new-eventbus/evtfhss3-new-bus/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRuleInvokeKinesisFirehoseRole": { @@ -479,7 +479,7 @@ "path": "evtfhss3-new-eventbus/evtfhss3-new-bus/EventsRuleInvokeKinesisFirehoseRole/ImportEventsRuleInvokeKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -505,13 +505,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRuleInvokeKinesisFirehosePolicy": { @@ -552,13 +552,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "evtfhss3-new-eventbus": { @@ -576,13 +576,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRule": { @@ -625,19 +625,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3.EventbridgeToKinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "evtfhss3-new-eventbus/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -649,7 +657,7 @@ "path": "evtfhss3-new-eventbus/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -657,7 +665,7 @@ "path": "evtfhss3-new-eventbus/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -665,13 +673,13 @@ "path": "evtfhss3-new-eventbus/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -687,7 +695,7 @@ "path": "evtfhss3-new-eventbus/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -699,7 +707,7 @@ "path": "evtfhss3-new-eventbus/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -707,25 +715,25 @@ "path": "evtfhss3-new-eventbus/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -733,7 +741,7 @@ "path": "evtfhss3-new-eventbus/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -741,13 +749,13 @@ "path": "evtfhss3-new-eventbus/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -755,13 +763,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/evtfhss3-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/evtfhss3-no-arguments.assets.json index 0eb682ccb..c7fc61394 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/evtfhss3-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/evtfhss3-no-arguments.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "f8b6a42f8c5dcea73af8a9953bcf28f965decb4c7bee656ce1405924335c5a6c": { + "9f940d25816586dfb41ead7730286e2d5303fef59b3916053f4d96ccd78d5df4": { "source": { "path": "evtfhss3-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f8b6a42f8c5dcea73af8a9953bcf28f965decb4c7bee656ce1405924335c5a6c.json", + "objectKey": "9f940d25816586dfb41ead7730286e2d5303fef59b3916053f4d96ccd78d5df4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/evtfhss3-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/evtfhss3-no-arguments.template.json index c91270d64..025b41f89 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/evtfhss3-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/evtfhss3-no-arguments.template.json @@ -624,7 +624,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -635,7 +635,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -672,6 +680,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/manifest.json index c1b34fb74..79d5699be 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/manifest.json @@ -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}/f8b6a42f8c5dcea73af8a9953bcf28f965decb4c7bee656ce1405924335c5a6c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9f940d25816586dfb41ead7730286e2d5303fef59b3916053f4d96ccd78d5df4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -166,6 +166,12 @@ "data": "evtfhss3noargsEventsRule810B5DF6" } ], + "/evtfhss3-no-arguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/evtfhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/tree.json index c6c3bab51..8809a5c52 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3/test/integ.evtfhss3-no-arguments.js.snapshot/tree.json @@ -54,7 +54,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -188,13 +188,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -206,19 +206,19 @@ "path": "evtfhss3-no-arguments/evtfhss3-no-args/KinesisFirehoseToS3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -277,7 +277,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -375,13 +375,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -393,19 +393,19 @@ "path": "evtfhss3-no-arguments/evtfhss3-no-args/KinesisFirehoseToS3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -421,7 +421,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -441,19 +441,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -465,7 +465,7 @@ "path": "evtfhss3-no-arguments/evtfhss3-no-args/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -490,13 +490,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -588,13 +588,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -663,13 +663,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -677,7 +677,7 @@ "path": "evtfhss3-no-arguments/evtfhss3-no-args/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRuleInvokeKinesisFirehoseRole": { @@ -689,7 +689,7 @@ "path": "evtfhss3-no-arguments/evtfhss3-no-args/EventsRuleInvokeKinesisFirehoseRole/ImportEventsRuleInvokeKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -715,13 +715,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRuleInvokeKinesisFirehosePolicy": { @@ -762,13 +762,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "EventsRule": { @@ -804,19 +804,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-kinesisfirehose-s3.EventbridgeToKinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "evtfhss3-no-arguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -828,7 +836,7 @@ "path": "evtfhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -836,7 +844,7 @@ "path": "evtfhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -844,13 +852,13 @@ "path": "evtfhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -866,7 +874,7 @@ "path": "evtfhss3-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -878,7 +886,7 @@ "path": "evtfhss3-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -886,25 +894,25 @@ "path": "evtfhss3-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -912,7 +920,7 @@ "path": "evtfhss3-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -920,13 +928,13 @@ "path": "evtfhss3-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -934,13 +942,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/eventbridge-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/eventbridge-lambda.test.ts index d9699e8fc..b73e244c8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/eventbridge-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/eventbridge-lambda.test.ts @@ -16,12 +16,13 @@ import * as events from 'aws-cdk-lib/aws-events'; import { EventbridgeToLambdaProps, EventbridgeToLambda } from '../lib/index'; import { Template } from 'aws-cdk-lib/assertions'; import * as cdk from 'aws-cdk-lib'; +import * as defaults from '@aws-solutions-constructs/core'; function deployNewFunc(stack: cdk.Stack) { const props: EventbridgeToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, eventRuleProps: { @@ -36,7 +37,7 @@ function deployNewEventBus(stack: cdk.Stack) { const props: EventbridgeToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, eventBusProps: { eventBusName: 'test' }, @@ -63,7 +64,7 @@ test('check lambda function properties for deploy: true', () => { "Arn" ] }, - Runtime: "nodejs16.x", + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1" @@ -223,7 +224,7 @@ test('check custom event bus resource with props when deploy:true', () => { const props: EventbridgeToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, eventBusProps: { @@ -247,14 +248,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new cdk.Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: EventbridgeToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -278,7 +279,7 @@ test('Confirm CheckEventBridgeProps is being called', () => { const props: EventbridgeToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, eventRuleProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/evtlam-eventbridge-existing-eventbus.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/evtlam-eventbridge-existing-eventbus.assets.json index 1406d7db9..7f2d68860 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/evtlam-eventbridge-existing-eventbus.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/evtlam-eventbridge-existing-eventbus.assets.json @@ -14,7 +14,7 @@ } } }, - "1ee369c1edfc781ec36a2a7f9b31469bdc778252c6b164faf4f616d5d611fa6a": { + "7855c8384df054be6a7cbddf1b23e11bac90c0491fd8e72a47a1bea0258853e5": { "source": { "path": "evtlam-eventbridge-existing-eventbus.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1ee369c1edfc781ec36a2a7f9b31469bdc778252c6b164faf4f616d5d611fa6a.json", + "objectKey": "7855c8384df054be6a7cbddf1b23e11bac90c0491fd8e72a47a1bea0258853e5.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/evtlam-eventbridge-existing-eventbus.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/evtlam-eventbridge-existing-eventbus.template.json index 2ac7c87f6..3c81ef167 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/evtlam-eventbridge-existing-eventbus.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/evtlam-eventbridge-existing-eventbus.template.json @@ -116,7 +116,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/manifest.json index dea2bd3c4..26fb83f09 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/manifest.json @@ -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}/1ee369c1edfc781ec36a2a7f9b31469bdc778252c6b164faf4f616d5d611fa6a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7855c8384df054be6a7cbddf1b23e11bac90c0491fd8e72a47a1bea0258853e5.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/tree.json index d6798dabb..593605241 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.js.snapshot/tree.json @@ -23,13 +23,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.118.0" + "version": "2.145.0" } }, "test-eventbridge-lambda": { @@ -45,7 +45,7 @@ "path": "evtlam-eventbridge-existing-eventbus/test-eventbridge-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -108,7 +108,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -144,19 +144,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -172,7 +172,7 @@ "path": "evtlam-eventbridge-existing-eventbus/test-eventbridge-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -180,13 +180,13 @@ "path": "evtlam-eventbridge-existing-eventbus/test-eventbridge-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -213,7 +213,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -221,7 +221,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "AwsEventsLambdaInvokePermission-1": { @@ -248,13 +248,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "EventsRule": { @@ -291,19 +291,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-lambda.EventbridgeToLambda", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -319,7 +319,7 @@ "path": "evtlam-eventbridge-existing-eventbus/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -331,7 +331,7 @@ "path": "evtlam-eventbridge-existing-eventbus/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -339,25 +339,25 @@ "path": "evtlam-eventbridge-existing-eventbus/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -365,7 +365,7 @@ "path": "evtlam-eventbridge-existing-eventbus/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -373,13 +373,13 @@ "path": "evtlam-eventbridge-existing-eventbus/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -387,13 +387,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.ts b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.ts index bab1cea5e..d093b5b67 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.ts +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-existing-eventbus.ts @@ -18,6 +18,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as events from 'aws-cdk-lib/aws-events'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -27,7 +28,7 @@ const existingEventBus = new events.EventBus(stack, `existing-event-bus`, { eve const props: EventbridgeToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingEventBusInterface: existingEventBus, diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/evtlam-eventbridge-new-eventbus.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/evtlam-eventbridge-new-eventbus.assets.json index 347667810..6a5c5cb82 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/evtlam-eventbridge-new-eventbus.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/evtlam-eventbridge-new-eventbus.assets.json @@ -14,7 +14,7 @@ } } }, - "22232c3094695e64d7c3cb4a5dfbd7cb670519c1eed726e91c304dc85d41251e": { + "a252a7fb9ea31d0d23855b480dab06a33e9641aef77026ad4dad3b9d3834f157": { "source": { "path": "evtlam-eventbridge-new-eventbus.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "22232c3094695e64d7c3cb4a5dfbd7cb670519c1eed726e91c304dc85d41251e.json", + "objectKey": "a252a7fb9ea31d0d23855b480dab06a33e9641aef77026ad4dad3b9d3834f157.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/evtlam-eventbridge-new-eventbus.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/evtlam-eventbridge-new-eventbus.template.json index 23164d64c..9499d2458 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/evtlam-eventbridge-new-eventbus.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/evtlam-eventbridge-new-eventbus.template.json @@ -110,7 +110,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/manifest.json index 58ea3fd11..2667ca62c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/manifest.json @@ -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}/22232c3094695e64d7c3cb4a5dfbd7cb670519c1eed726e91c304dc85d41251e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a252a7fb9ea31d0d23855b480dab06a33e9641aef77026ad4dad3b9d3834f157.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/tree.json index c9112c7c0..108f29f73 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "evtlam-eventbridge-new-eventbus/test-eventbridge-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -120,19 +120,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -148,7 +148,7 @@ "path": "evtlam-eventbridge-new-eventbus/test-eventbridge-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -156,13 +156,13 @@ "path": "evtlam-eventbridge-new-eventbus/test-eventbridge-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -189,7 +189,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -197,7 +197,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "AwsEventsLambdaInvokePermission-1": { @@ -224,13 +224,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "test-new-lambda": { @@ -248,13 +248,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.118.0" + "version": "2.145.0" } }, "EventsRule": { @@ -291,19 +291,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-lambda.EventbridgeToLambda", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -319,7 +319,7 @@ "path": "evtlam-eventbridge-new-eventbus/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -331,7 +331,7 @@ "path": "evtlam-eventbridge-new-eventbus/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -339,25 +339,25 @@ "path": "evtlam-eventbridge-new-eventbus/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -365,7 +365,7 @@ "path": "evtlam-eventbridge-new-eventbus/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -373,13 +373,13 @@ "path": "evtlam-eventbridge-new-eventbus/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -387,13 +387,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.ts b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.ts index 2be61a57b..f77faa927 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.ts +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-new-eventbus.ts @@ -17,6 +17,7 @@ import { EventbridgeToLambda, EventbridgeToLambdaProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -24,7 +25,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const props: EventbridgeToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, eventBusProps: { eventBusName: 'test-new-lambda' }, diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/evtlam-eventbridge-no-argument.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/evtlam-eventbridge-no-argument.assets.json index 311c09932..25dc73fed 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/evtlam-eventbridge-no-argument.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/evtlam-eventbridge-no-argument.assets.json @@ -14,7 +14,7 @@ } } }, - "a1283312d3fa1ef8e86ff0d4e9c798155ba259b64914ce5565f3b43e3f746732": { + "928f310ae52870cab3214c39b43bffb25a5a6eb9104791b8e545a2b89f476ab3": { "source": { "path": "evtlam-eventbridge-no-argument.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a1283312d3fa1ef8e86ff0d4e9c798155ba259b64914ce5565f3b43e3f746732.json", + "objectKey": "928f310ae52870cab3214c39b43bffb25a5a6eb9104791b8e545a2b89f476ab3.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/evtlam-eventbridge-no-argument.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/evtlam-eventbridge-no-argument.template.json index 2464a840e..38b2e2b5f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/evtlam-eventbridge-no-argument.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/evtlam-eventbridge-no-argument.template.json @@ -110,7 +110,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/manifest.json index bd73c1e6f..468a3e200 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/manifest.json @@ -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}/a1283312d3fa1ef8e86ff0d4e9c798155ba259b64914ce5565f3b43e3f746732.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/928f310ae52870cab3214c39b43bffb25a5a6eb9104791b8e545a2b89f476ab3.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/tree.json index 5372c088c..2dd2e79e8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "evtlam-eventbridge-no-argument/test-eventbridge-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -120,19 +120,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -148,7 +148,7 @@ "path": "evtlam-eventbridge-no-argument/test-eventbridge-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -156,13 +156,13 @@ "path": "evtlam-eventbridge-no-argument/test-eventbridge-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -189,7 +189,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -197,7 +197,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "AwsEventsLambdaInvokePermission-1": { @@ -224,13 +224,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "EventsRule": { @@ -260,19 +260,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-lambda.EventbridgeToLambda", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -288,7 +288,7 @@ "path": "evtlam-eventbridge-no-argument/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -300,7 +300,7 @@ "path": "evtlam-eventbridge-no-argument/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -308,25 +308,25 @@ "path": "evtlam-eventbridge-no-argument/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -334,7 +334,7 @@ "path": "evtlam-eventbridge-no-argument/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -342,13 +342,13 @@ "path": "evtlam-eventbridge-no-argument/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -356,13 +356,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.ts b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.ts index 035cc5459..1b5cce0a5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.ts +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-lambda/test/integ.evtlam-eventbridge-no-argument.ts @@ -19,6 +19,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as events from 'aws-cdk-lib/aws-events'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -26,7 +27,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const props: EventbridgeToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, eventRuleProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-existing-eventbus.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-existing-eventbus.assets.json index b8088c18b..e969eb683 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-existing-eventbus.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-existing-eventbus.assets.json @@ -14,7 +14,7 @@ } } }, - "ad8ab564a1918f4dcd4f380744be433d1ddd07d98528aa35913bc98a4d2a0683": { + "b2da6be256d18706f254d6146d6db3472b135728c0c7f07640d932c8b9bd36ae": { "source": { "path": "evtstp-eventbridge-stepfunctions-existing-eventbus.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ad8ab564a1918f4dcd4f380744be433d1ddd07d98528aa35913bc98a4d2a0683.json", + "objectKey": "b2da6be256d18706f254d6146d6db3472b135728c0c7f07640d932c8b9bd36ae.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-existing-eventbus.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-existing-eventbus.template.json index ad1183c12..cad087ab8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-existing-eventbus.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-existing-eventbus.template.json @@ -110,7 +110,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/manifest.json index ea23e771e..8061d7b53 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/manifest.json @@ -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}/ad8ab564a1918f4dcd4f380744be433d1ddd07d98528aa35913bc98a4d2a0683.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b2da6be256d18706f254d6146d6db3472b135728c0c7f07640d932c8b9bd36ae.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/tree.json index 7660cfeea..f05d822d5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "evtstp-eventbridge-stepfunctions-existing-eventbus/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -116,19 +116,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -144,7 +144,7 @@ "path": "evtstp-eventbridge-stepfunctions-existing-eventbus/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.127.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -152,13 +152,13 @@ "path": "evtstp-eventbridge-stepfunctions-existing-eventbus/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -185,7 +185,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.127.0" + "version": "2.145.0" } }, "LambdaTask": { @@ -207,7 +207,7 @@ "path": "evtstp-eventbridge-stepfunctions-existing-eventbus/LambdaTask", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.127.0" + "version": "2.145.0" } }, "StartState": { @@ -215,7 +215,7 @@ "path": "evtstp-eventbridge-stepfunctions-existing-eventbus/StartState", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.Pass", - "version": "2.127.0" + "version": "2.145.0" } }, "existing-event-bus": { @@ -233,13 +233,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.127.0" + "version": "2.145.0" } }, "test-eventbridge-stepfunctions-new-eventbus-construct": { @@ -281,13 +281,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.127.0" + "version": "2.145.0" } }, "StateMachine": { @@ -303,7 +303,7 @@ "path": "evtstp-eventbridge-stepfunctions-existing-eventbus/test-eventbridge-stepfunctions-new-eventbus-construct/StateMachine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -328,7 +328,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -396,19 +396,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -461,13 +461,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", - "version": "2.127.0" + "version": "2.145.0" } }, "EventsRuleRole": { @@ -479,7 +479,7 @@ "path": "evtstp-eventbridge-stepfunctions-existing-eventbus/test-eventbridge-stepfunctions-new-eventbus-construct/EventsRuleRole/ImportEventsRuleRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -504,7 +504,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -539,19 +539,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "EventsRule": { @@ -591,13 +591,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionFailedAlarm": { @@ -630,13 +630,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionThrottledAlarm": { @@ -669,13 +669,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionAbortedAlarm": { @@ -708,19 +708,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-stepfunctions.EventbridgeToStepfunctions", - "version": "2.53.0" + "version": "2.60.0" } }, "Integ": { @@ -748,7 +748,7 @@ "path": "evtstp-eventbridge-stepfunctions-existing-eventbus/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.127.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -756,25 +756,25 @@ "path": "evtstp-eventbridge-stepfunctions-existing-eventbus/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.127.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.127.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -782,7 +782,7 @@ "path": "evtstp-eventbridge-stepfunctions-existing-eventbus/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.127.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -790,13 +790,13 @@ "path": "evtstp-eventbridge-stepfunctions-existing-eventbus/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.127.0" + "version": "2.145.0" } }, "Tree": { @@ -810,7 +810,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.127.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.ts b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.ts index bd111b8df..3c53b14bd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.ts +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-existing-eventbus.ts @@ -23,12 +23,13 @@ import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import { EventBus } from "aws-cdk-lib/aws-events"; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); const submitLambda = deployLambdaFunction(stack, { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda`), handler: 'index.handler' }); diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-new-eventbus.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-new-eventbus.assets.json index 60595aadd..d3f56076a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-new-eventbus.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-new-eventbus.assets.json @@ -14,7 +14,7 @@ } } }, - "317f1eec8d886232ed0717798a08a6dff5b18b1f4e4c3e718fafce0763125def": { + "e122b8069ce8f8a8497be17fa3632b2e6a51f1a38589679f45ec02bb79c0c5b4": { "source": { "path": "evtstp-eventbridge-stepfunctions-new-eventbus.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "317f1eec8d886232ed0717798a08a6dff5b18b1f4e4c3e718fafce0763125def.json", + "objectKey": "e122b8069ce8f8a8497be17fa3632b2e6a51f1a38589679f45ec02bb79c0c5b4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-new-eventbus.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-new-eventbus.template.json index 061fc9a56..e7ff95b28 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-new-eventbus.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/evtstp-eventbridge-stepfunctions-new-eventbus.template.json @@ -110,7 +110,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/manifest.json index 75494e45e..3dc03a153 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/manifest.json @@ -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}/317f1eec8d886232ed0717798a08a6dff5b18b1f4e4c3e718fafce0763125def.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e122b8069ce8f8a8497be17fa3632b2e6a51f1a38589679f45ec02bb79c0c5b4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/tree.json index f35f5e9a6..ca55a73e5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "evtstp-eventbridge-stepfunctions-new-eventbus/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -116,19 +116,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -144,7 +144,7 @@ "path": "evtstp-eventbridge-stepfunctions-new-eventbus/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.127.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -152,13 +152,13 @@ "path": "evtstp-eventbridge-stepfunctions-new-eventbus/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -185,7 +185,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.127.0" + "version": "2.145.0" } }, "LambdaTask": { @@ -207,7 +207,7 @@ "path": "evtstp-eventbridge-stepfunctions-new-eventbus/LambdaTask", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.127.0" + "version": "2.145.0" } }, "StartState": { @@ -215,7 +215,7 @@ "path": "evtstp-eventbridge-stepfunctions-new-eventbus/StartState", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.Pass", - "version": "2.127.0" + "version": "2.145.0" } }, "test-eventbridge-stepfunctions-new-eventbus-construct": { @@ -257,13 +257,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.127.0" + "version": "2.145.0" } }, "StateMachine": { @@ -279,7 +279,7 @@ "path": "evtstp-eventbridge-stepfunctions-new-eventbus/test-eventbridge-stepfunctions-new-eventbus-construct/StateMachine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -304,7 +304,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -372,19 +372,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -437,13 +437,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", - "version": "2.127.0" + "version": "2.145.0" } }, "EventsRuleRole": { @@ -455,7 +455,7 @@ "path": "evtstp-eventbridge-stepfunctions-new-eventbus/test-eventbridge-stepfunctions-new-eventbus-construct/EventsRuleRole/ImportEventsRuleRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -480,7 +480,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -515,19 +515,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "test-new": { @@ -545,13 +545,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.127.0" + "version": "2.145.0" } }, "EventsRule": { @@ -591,13 +591,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionFailedAlarm": { @@ -630,13 +630,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionThrottledAlarm": { @@ -669,13 +669,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionAbortedAlarm": { @@ -708,19 +708,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-stepfunctions.EventbridgeToStepfunctions", - "version": "2.53.0" + "version": "2.60.0" } }, "Integ": { @@ -748,7 +748,7 @@ "path": "evtstp-eventbridge-stepfunctions-new-eventbus/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.127.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -756,25 +756,25 @@ "path": "evtstp-eventbridge-stepfunctions-new-eventbus/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.127.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.127.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -782,7 +782,7 @@ "path": "evtstp-eventbridge-stepfunctions-new-eventbus/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.127.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -790,13 +790,13 @@ "path": "evtstp-eventbridge-stepfunctions-new-eventbus/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.127.0" + "version": "2.145.0" } }, "Tree": { @@ -810,7 +810,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.127.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.ts b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.ts index b7987dfd8..79c5acb8b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.ts +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-new-eventbus.ts @@ -22,12 +22,13 @@ import { deployLambdaFunction } from '@aws-solutions-constructs/core'; import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); const submitLambda = deployLambdaFunction(stack, { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda`), handler: 'index.handler' }); diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/evtstp-eventbridge-stepfunctions-with-lambda.assets.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/evtstp-eventbridge-stepfunctions-with-lambda.assets.json index 44264bba7..fed09c9ad 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/evtstp-eventbridge-stepfunctions-with-lambda.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/evtstp-eventbridge-stepfunctions-with-lambda.assets.json @@ -14,7 +14,7 @@ } } }, - "f6a91ec79f4b0e904c3972f5610c93ec664d93fbf0a3b2228bf301f53cfbc87a": { + "abfa53bef07c7d0e63e0004928bb85376ed62a6422c6f1ef263be2bd60a4fea4": { "source": { "path": "evtstp-eventbridge-stepfunctions-with-lambda.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f6a91ec79f4b0e904c3972f5610c93ec664d93fbf0a3b2228bf301f53cfbc87a.json", + "objectKey": "abfa53bef07c7d0e63e0004928bb85376ed62a6422c6f1ef263be2bd60a4fea4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/evtstp-eventbridge-stepfunctions-with-lambda.template.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/evtstp-eventbridge-stepfunctions-with-lambda.template.json index a3a0f9f06..e4e77e0fa 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/evtstp-eventbridge-stepfunctions-with-lambda.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/evtstp-eventbridge-stepfunctions-with-lambda.template.json @@ -110,7 +110,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/manifest.json index f179af01c..863efcbcf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/manifest.json @@ -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}/f6a91ec79f4b0e904c3972f5610c93ec664d93fbf0a3b2228bf301f53cfbc87a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/abfa53bef07c7d0e63e0004928bb85376ed62a6422c6f1ef263be2bd60a4fea4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/tree.json index db8af8d15..b0e3de700 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "evtstp-eventbridge-stepfunctions-with-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -116,19 +116,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -144,7 +144,7 @@ "path": "evtstp-eventbridge-stepfunctions-with-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.127.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -152,13 +152,13 @@ "path": "evtstp-eventbridge-stepfunctions-with-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -185,7 +185,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.127.0" + "version": "2.145.0" } }, "LambdaTask": { @@ -207,7 +207,7 @@ "path": "evtstp-eventbridge-stepfunctions-with-lambda/LambdaTask", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.127.0" + "version": "2.145.0" } }, "StartState": { @@ -215,7 +215,7 @@ "path": "evtstp-eventbridge-stepfunctions-with-lambda/StartState", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.Pass", - "version": "2.127.0" + "version": "2.145.0" } }, "test-eventbridge-stepfunctions-and-lambda-construct": { @@ -257,13 +257,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.127.0" + "version": "2.145.0" } }, "StateMachine": { @@ -279,7 +279,7 @@ "path": "evtstp-eventbridge-stepfunctions-with-lambda/test-eventbridge-stepfunctions-and-lambda-construct/StateMachine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -304,7 +304,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -372,19 +372,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -437,13 +437,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", - "version": "2.127.0" + "version": "2.145.0" } }, "EventsRuleRole": { @@ -455,7 +455,7 @@ "path": "evtstp-eventbridge-stepfunctions-with-lambda/test-eventbridge-stepfunctions-and-lambda-construct/EventsRuleRole/ImportEventsRuleRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -480,7 +480,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -515,19 +515,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "EventsRule": { @@ -560,13 +560,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionFailedAlarm": { @@ -599,13 +599,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionThrottledAlarm": { @@ -638,13 +638,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionAbortedAlarm": { @@ -677,19 +677,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-stepfunctions.EventbridgeToStepfunctions", - "version": "2.53.0" + "version": "2.60.0" } }, "Integ": { @@ -717,7 +717,7 @@ "path": "evtstp-eventbridge-stepfunctions-with-lambda/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.127.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -725,25 +725,25 @@ "path": "evtstp-eventbridge-stepfunctions-with-lambda/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.127.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.127.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -751,7 +751,7 @@ "path": "evtstp-eventbridge-stepfunctions-with-lambda/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.127.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -759,13 +759,13 @@ "path": "evtstp-eventbridge-stepfunctions-with-lambda/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.127.0" + "version": "2.145.0" } }, "Tree": { @@ -779,7 +779,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.127.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.ts b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.ts index 1b84def00..6f80ad9cf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.ts +++ b/source/patterns/@aws-solutions-constructs/aws-eventbridge-stepfunctions/test/integ.evtstp-eventbridge-stepfunctions-with-lambda.ts @@ -23,12 +23,13 @@ import { deployLambdaFunction } from '@aws-solutions-constructs/core'; import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); const submitLambda = deployLambdaFunction(stack, { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda`), handler: 'index.handler' }); diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/farddb-existing-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/farddb-existing-resources.assets.json index 7848d2039..85454e171 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/farddb-existing-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/farddb-existing-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "0f466c0cfee8b05f25147fefefdcae095ed0898621ce7cb9b2cf0b817c6af936": { + "ee0bfa6e7bfe1b2fb2e9456abc3ffd1d29b9fd32269193190b12da2c0e8a5513": { "source": { "path": "farddb-existing-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "0f466c0cfee8b05f25147fefefdcae095ed0898621ce7cb9b2cf0b817c6af936.json", + "objectKey": "ee0bfa6e7bfe1b2fb2e9456abc3ffd1d29b9fd32269193190b12da2c0e8a5513.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/farddb-existing-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/farddb-existing-resources.template.json index 2b6e3c235..25728f6a1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/farddb-existing-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/farddb-existing-resources.template.json @@ -750,7 +750,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/manifest.json index 6ffb4d897..2e7258815 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/0f466c0cfee8b05f25147fefefdcae095ed0898621ce7cb9b2cf0b817c6af936.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/ee0bfa6e7bfe1b2fb2e9456abc3ffd1d29b9fd32269193190b12da2c0e8a5513.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/tree.json index 346b7da00..d297c7cf6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-existing-resources.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "farddb-existing-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "farddb-existing-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "farddb-existing-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "farddb-existing-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "farddb-existing-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "farddb-existing-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -880,13 +880,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -925,13 +925,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -978,13 +978,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "DDB": { @@ -1031,19 +1031,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1055,7 +1055,7 @@ "path": "farddb-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1063,7 +1063,7 @@ "path": "farddb-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1071,13 +1071,13 @@ "path": "farddb-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "DynamoTable": { @@ -1113,7 +1113,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.143.0" + "version": "2.147.3" } }, "ScalingRole": { @@ -1121,13 +1121,13 @@ "path": "farddb-existing-resources/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.143.0" + "version": "2.147.3" } }, "farddb-existing-resources-ECR_API-security-group": { @@ -1183,13 +1183,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farddb-existing-resources-ECR_DKR-security-group": { @@ -1245,13 +1245,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1267,13 +1267,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1289,7 +1289,7 @@ "path": "farddb-existing-resources/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1314,7 +1314,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1370,19 +1370,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1439,7 +1439,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -1447,13 +1447,13 @@ "path": "farddb-existing-resources/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -1481,13 +1481,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -1539,13 +1539,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct": { @@ -1553,7 +1553,7 @@ "path": "farddb-existing-resources/test-construct", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-dynamodb.FargateToDynamoDB", - "version": "2.57.0" + "version": "2.60.0" } }, "Integ": { @@ -1581,7 +1581,7 @@ "path": "farddb-existing-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1589,25 +1589,25 @@ "path": "farddb-existing-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1615,7 +1615,7 @@ "path": "farddb-existing-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1623,13 +1623,13 @@ "path": "farddb-existing-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1643,7 +1643,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/farddb-new-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/farddb-new-resources.assets.json index 30e3af877..d00005e94 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/farddb-new-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/farddb-new-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "3d2778d0a8c93e1800176d87bfd958db6600820aa55a12f7de2ebd9d2f2815c4": { + "8353ef282c32955192f25fabb219db4444fd216c254fb5160cd0bdac4f0a335b": { "source": { "path": "farddb-new-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "3d2778d0a8c93e1800176d87bfd958db6600820aa55a12f7de2ebd9d2f2815c4.json", + "objectKey": "8353ef282c32955192f25fabb219db4444fd216c254fb5160cd0bdac4f0a335b.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/farddb-new-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/farddb-new-resources.template.json index 346362fbc..6d91d7855 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/farddb-new-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/farddb-new-resources.template.json @@ -776,7 +776,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/manifest.json index 651738c6c..bb95a10d7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/3d2778d0a8c93e1800176d87bfd958db6600820aa55a12f7de2ebd9d2f2815c4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/8353ef282c32955192f25fabb219db4444fd216c254fb5160cd0bdac4f0a335b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/tree.json index e0caead6d..1b24af35b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-dynamodb/test/integ.farddb-new-resources.js.snapshot/tree.json @@ -45,7 +45,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.143.0" + "version": "2.147.3" } }, "ScalingRole": { @@ -53,19 +53,19 @@ "path": "farddb-new-resources/test-construct/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-dynamodb.FargateToDynamoDB", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -92,7 +92,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -136,7 +136,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -144,7 +144,7 @@ "path": "farddb-new-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -166,7 +166,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -185,7 +185,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -205,7 +205,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -225,7 +225,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -253,13 +253,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -303,7 +303,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -311,7 +311,7 @@ "path": "farddb-new-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -333,7 +333,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -352,7 +352,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -372,7 +372,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -392,7 +392,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -420,13 +420,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -470,7 +470,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -478,7 +478,7 @@ "path": "farddb-new-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -500,7 +500,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -519,7 +519,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -539,13 +539,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -589,7 +589,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -597,7 +597,7 @@ "path": "farddb-new-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -619,7 +619,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -638,7 +638,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -658,13 +658,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -683,7 +683,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -702,7 +702,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -714,13 +714,13 @@ "path": "farddb-new-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -736,7 +736,7 @@ "path": "farddb-new-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -767,7 +767,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -819,19 +819,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -855,13 +855,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -895,13 +895,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "DDB": { @@ -948,13 +948,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -993,13 +993,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1038,13 +1038,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1091,19 +1091,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1115,7 +1115,7 @@ "path": "farddb-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1123,7 +1123,7 @@ "path": "farddb-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1131,13 +1131,13 @@ "path": "farddb-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farddb-new-resources-ECR_API-security-group": { @@ -1193,13 +1193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farddb-new-resources-ECR_DKR-security-group": { @@ -1255,13 +1255,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-cluster": { @@ -1277,13 +1277,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-taskdef": { @@ -1299,7 +1299,7 @@ "path": "farddb-new-resources/test-construct-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1324,7 +1324,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1380,19 +1380,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1449,7 +1449,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-container": { @@ -1457,13 +1457,13 @@ "path": "farddb-new-resources/test-construct-taskdef/test-construct-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-sg": { @@ -1491,13 +1491,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-service": { @@ -1549,13 +1549,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1583,7 +1583,7 @@ "path": "farddb-new-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1591,25 +1591,25 @@ "path": "farddb-new-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1617,7 +1617,7 @@ "path": "farddb-new-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1625,13 +1625,13 @@ "path": "farddb-new-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1645,7 +1645,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/farevt-existing-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/farevt-existing-resources.assets.json index 623fd4909..2ae18c18c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/farevt-existing-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/farevt-existing-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "8bb1d4d86a44930c70c9080dfaa8aabb96f412c0fb9aa173d24deb7ce813a7f7": { + "455d47d01b68c9591b6a568022af4cc6c0e98c3dce43fbbe0e6dd6ae6489d299": { "source": { "path": "farevt-existing-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "8bb1d4d86a44930c70c9080dfaa8aabb96f412c0fb9aa173d24deb7ce813a7f7.json", + "objectKey": "455d47d01b68c9591b6a568022af4cc6c0e98c3dce43fbbe0e6dd6ae6489d299.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/farevt-existing-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/farevt-existing-resources.template.json index 228da1429..dae006a67 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/farevt-existing-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/farevt-existing-resources.template.json @@ -742,7 +742,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/manifest.json index 2ba6adf68..41411dcaf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/8bb1d4d86a44930c70c9080dfaa8aabb96f412c0fb9aa173d24deb7ce813a7f7.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/455d47d01b68c9591b6a568022af4cc6c0e98c3dce43fbbe0e6dd6ae6489d299.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/tree.json index c56cedc68..5134e9f83 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-existing-resources.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "farevt-existing-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "farevt-existing-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "farevt-existing-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "farevt-existing-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "farevt-existing-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "farevt-existing-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -880,13 +880,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -925,13 +925,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -978,13 +978,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "CLOUDWATCH_EVENTS": { @@ -1023,19 +1023,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1047,7 +1047,7 @@ "path": "farevt-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1055,7 +1055,7 @@ "path": "farevt-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1063,13 +1063,13 @@ "path": "farevt-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farevt-existing-resources-ECR_API-security-group": { @@ -1125,13 +1125,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farevt-existing-resources-ECR_DKR-security-group": { @@ -1187,13 +1187,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1209,13 +1209,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1231,7 +1231,7 @@ "path": "farevt-existing-resources/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1256,7 +1256,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1294,19 +1294,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1354,7 +1354,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -1362,13 +1362,13 @@ "path": "farevt-existing-resources/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -1396,13 +1396,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -1454,13 +1454,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "existing-event-bus": { @@ -1478,13 +1478,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct": { @@ -1492,7 +1492,7 @@ "path": "farevt-existing-resources/test-construct", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-eventbridge.FargateToEventbridge", - "version": "2.57.0" + "version": "2.60.0" } }, "farevt-existing-resources-CLOUDWATCH_EVENTS-security-group": { @@ -1548,13 +1548,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1582,7 +1582,7 @@ "path": "farevt-existing-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1590,25 +1590,25 @@ "path": "farevt-existing-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1616,7 +1616,7 @@ "path": "farevt-existing-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1624,13 +1624,13 @@ "path": "farevt-existing-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1644,7 +1644,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/farevt-new-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/farevt-new-resources.assets.json index 399697e72..e04e998f4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/farevt-new-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/farevt-new-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "f70cca2b07ee8c4c94e477f17cb678b6b1854464ed7629d7c0e57af12f8b0900": { + "a1c5f7dcbec107aaffc2591c58d7916834c16fdd9b811b165fcd490ff5ceee4b": { "source": { "path": "farevt-new-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "f70cca2b07ee8c4c94e477f17cb678b6b1854464ed7629d7c0e57af12f8b0900.json", + "objectKey": "a1c5f7dcbec107aaffc2591c58d7916834c16fdd9b811b165fcd490ff5ceee4b.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/farevt-new-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/farevt-new-resources.template.json index 2f6abe663..8f7e77413 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/farevt-new-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/farevt-new-resources.template.json @@ -748,7 +748,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/manifest.json index 1a8997f03..2ba6c5da7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/f70cca2b07ee8c4c94e477f17cb678b6b1854464ed7629d7c0e57af12f8b0900.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/a1c5f7dcbec107aaffc2591c58d7916834c16fdd9b811b165fcd490ff5ceee4b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/tree.json index dbee753cc..ae36a6f07 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-eventbridge/test/integ.farevt-new-resources.js.snapshot/tree.json @@ -27,19 +27,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-eventbridge.FargateToEventbridge", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -66,7 +66,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -110,7 +110,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -118,7 +118,7 @@ "path": "farevt-new-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -140,7 +140,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -159,7 +159,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -179,7 +179,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -199,7 +199,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -227,13 +227,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -277,7 +277,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -285,7 +285,7 @@ "path": "farevt-new-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -307,7 +307,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -326,7 +326,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -346,7 +346,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -366,7 +366,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -394,13 +394,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -444,7 +444,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -452,7 +452,7 @@ "path": "farevt-new-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -474,7 +474,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -493,7 +493,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -513,13 +513,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -563,7 +563,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -571,7 +571,7 @@ "path": "farevt-new-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -593,7 +593,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -612,7 +612,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -632,13 +632,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -657,7 +657,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -676,7 +676,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -688,13 +688,13 @@ "path": "farevt-new-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -710,7 +710,7 @@ "path": "farevt-new-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -741,7 +741,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -793,19 +793,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -829,13 +829,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -869,13 +869,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "CLOUDWATCH_EVENTS": { @@ -914,13 +914,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -959,13 +959,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1004,13 +1004,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1057,19 +1057,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1081,7 +1081,7 @@ "path": "farevt-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1089,7 +1089,7 @@ "path": "farevt-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1097,13 +1097,13 @@ "path": "farevt-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farevt-new-resources-CLOUDWATCH_EVENTS-security-group": { @@ -1159,13 +1159,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farevt-new-resources-ECR_API-security-group": { @@ -1221,13 +1221,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farevt-new-resources-ECR_DKR-security-group": { @@ -1283,13 +1283,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-cluster": { @@ -1305,13 +1305,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-taskdef": { @@ -1327,7 +1327,7 @@ "path": "farevt-new-resources/test-construct-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1352,7 +1352,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1390,19 +1390,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1450,7 +1450,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-container": { @@ -1458,13 +1458,13 @@ "path": "farevt-new-resources/test-construct-taskdef/test-construct-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-sg": { @@ -1492,13 +1492,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-service": { @@ -1550,13 +1550,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1584,7 +1584,7 @@ "path": "farevt-new-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1592,25 +1592,25 @@ "path": "farevt-new-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1618,7 +1618,7 @@ "path": "farevt-new-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1626,13 +1626,13 @@ "path": "farevt-new-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1646,7 +1646,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/farfhs-existingFargateService.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/farfhs-existingFargateService.assets.json index 69c4c42f2..5c10b448b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/farfhs-existingFargateService.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/farfhs-existingFargateService.assets.json @@ -14,20 +14,20 @@ } } }, - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "47cec524dcaa9e14e526dea0e738b6354fd6d0d80dc5aa3a2b51ad785671b21e": { + "4ea1b9d1871b863c6622d05b340b5a6696bf65c96b607f410f6f1828da82ae6c": { "source": { "path": "farfhs-existingFargateService.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "47cec524dcaa9e14e526dea0e738b6354fd6d0d80dc5aa3a2b51ad785671b21e.json", + "objectKey": "4ea1b9d1871b863c6622d05b340b5a6696bf65c96b607f410f6f1828da82ae6c.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/farfhs-existingFargateService.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/farfhs-existingFargateService.template.json index 54ff63075..d04e0ad62 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/farfhs-existingFargateService.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/farfhs-existingFargateService.template.json @@ -782,7 +782,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1359,7 +1367,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1370,7 +1378,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1744,6 +1760,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/manifest.json index e9ff349da..01b37e329 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/manifest.json @@ -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}/47cec524dcaa9e14e526dea0e738b6354fd6d0d80dc5aa3a2b51ad785671b21e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4ea1b9d1871b863c6622d05b340b5a6696bf65c96b607f410f6f1828da82ae6c.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -274,6 +274,12 @@ "data": "VpcKINESISFIREHOSE4115B5D1" } ], + "/farfhs-existingFargateService/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/farfhs-existingFargateService/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/tree.json index 32a8eb99f..ad5dcd83e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingFargateService.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "farfhs-existingFargateService/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "farfhs-existingFargateService/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "farfhs-existingFargateService/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "farfhs-existingFargateService/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "farfhs-existingFargateService/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "farfhs-existingFargateService/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -891,13 +891,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -947,13 +947,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1000,13 +1000,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_FIREHOSE": { @@ -1056,19 +1056,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "farfhs-existingFargateService/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1080,7 +1088,7 @@ "path": "farfhs-existingFargateService/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1088,7 +1096,7 @@ "path": "farfhs-existingFargateService/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1096,13 +1104,13 @@ "path": "farfhs-existingFargateService/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "destination-firehose": { @@ -1147,7 +1155,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1281,13 +1289,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1299,19 +1307,19 @@ "path": "farfhs-existingFargateService/destination-firehose/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -1370,7 +1378,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1468,13 +1476,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1486,19 +1494,19 @@ "path": "farfhs-existingFargateService/destination-firehose/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -1514,7 +1522,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -1534,19 +1542,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -1558,7 +1566,7 @@ "path": "farfhs-existingFargateService/destination-firehose/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1583,13 +1591,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -1681,13 +1689,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -1756,13 +1764,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1774,7 +1782,7 @@ "path": "farfhs-existingFargateService/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1782,7 +1790,7 @@ "path": "farfhs-existingFargateService/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1790,13 +1798,13 @@ "path": "farfhs-existingFargateService/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "destination-firehoseaws-managed-key": { @@ -1804,7 +1812,7 @@ "path": "farfhs-existingFargateService/destination-firehoseaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-existingFargateService-ECR_API-security-group": { @@ -1860,13 +1868,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-existingFargateService-ECR_DKR-security-group": { @@ -1922,13 +1930,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1944,13 +1952,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1966,7 +1974,7 @@ "path": "farfhs-existingFargateService/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1991,7 +1999,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -2034,19 +2042,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -2092,7 +2100,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -2100,13 +2108,13 @@ "path": "farfhs-existingFargateService/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -2134,13 +2142,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -2192,13 +2200,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams": { @@ -2206,7 +2214,7 @@ "path": "farfhs-existingFargateService/test-fargate-kinesisstreams", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-kinesisfirehose.FargateToKinesisFirehose", - "version": "2.57.0" + "version": "2.60.0" } }, "farfhs-existingFargateService-KINESIS_FIREHOSE-security-group": { @@ -2262,13 +2270,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -2296,7 +2304,7 @@ "path": "farfhs-existingFargateService/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2304,25 +2312,25 @@ "path": "farfhs-existingFargateService/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2330,7 +2338,7 @@ "path": "farfhs-existingFargateService/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2338,13 +2346,13 @@ "path": "farfhs-existingFargateService/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -2358,7 +2366,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/farfhs-existingVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/farfhs-existingVpc.assets.json index bd7795e49..d6882cd6c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/farfhs-existingVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/farfhs-existingVpc.assets.json @@ -14,20 +14,20 @@ } } }, - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "9c87b02994a8671893524c0712414f19d969f6cfbaaecc3c27f23d2074271fc3": { + "99ef6afcb7938ceba0df532c66501a8a4653aeda4f3cc38bc2f270b8f079a072": { "source": { "path": "farfhs-existingVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9c87b02994a8671893524c0712414f19d969f6cfbaaecc3c27f23d2074271fc3.json", + "objectKey": "99ef6afcb7938ceba0df532c66501a8a4653aeda4f3cc38bc2f270b8f079a072.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/farfhs-existingVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/farfhs-existingVpc.template.json index 2a614c752..fef883222 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/farfhs-existingVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/farfhs-existingVpc.template.json @@ -782,7 +782,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1359,7 +1367,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1370,7 +1378,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1744,6 +1760,115 @@ ] } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/manifest.json index 9586c6760..0db0edb8e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/manifest.json @@ -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}/9c87b02994a8671893524c0712414f19d969f6cfbaaecc3c27f23d2074271fc3.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/99ef6afcb7938ceba0df532c66501a8a4653aeda4f3cc38bc2f270b8f079a072.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -274,6 +274,12 @@ "data": "VpcS3A5408339" } ], + "/farfhs-existingVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/farfhs-existingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/tree.json index a20685a72..e5138873c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-existingVpc.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "farfhs-existingVpc/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "farfhs-existingVpc/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "farfhs-existingVpc/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "farfhs-existingVpc/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "farfhs-existingVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "farfhs-existingVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_FIREHOSE": { @@ -891,13 +891,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -947,13 +947,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1003,13 +1003,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1056,19 +1056,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "farfhs-existingVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1080,7 +1088,7 @@ "path": "farfhs-existingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1088,7 +1096,7 @@ "path": "farfhs-existingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1096,13 +1104,13 @@ "path": "farfhs-existingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "destination-firehose": { @@ -1147,7 +1155,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1281,13 +1289,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1299,19 +1307,19 @@ "path": "farfhs-existingVpc/destination-firehose/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -1370,7 +1378,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1468,13 +1476,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1486,19 +1494,19 @@ "path": "farfhs-existingVpc/destination-firehose/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -1514,7 +1522,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -1534,19 +1542,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -1558,7 +1566,7 @@ "path": "farfhs-existingVpc/destination-firehose/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1583,13 +1591,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -1681,13 +1689,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -1756,13 +1764,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1774,7 +1782,7 @@ "path": "farfhs-existingVpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1782,7 +1790,7 @@ "path": "farfhs-existingVpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1790,13 +1798,13 @@ "path": "farfhs-existingVpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "destination-firehoseaws-managed-key": { @@ -1804,7 +1812,7 @@ "path": "farfhs-existingVpc/destination-firehoseaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams": { @@ -1812,7 +1820,7 @@ "path": "farfhs-existingVpc/test-fargate-kinesisstreams", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-kinesisfirehose.FargateToKinesisFirehose", - "version": "2.57.0" + "version": "2.60.0" } }, "farfhs-existingVpc-KINESIS_FIREHOSE-security-group": { @@ -1868,13 +1876,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-existingVpc-ECR_API-security-group": { @@ -1930,13 +1938,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-existingVpc-ECR_DKR-security-group": { @@ -1992,13 +2000,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-cluster": { @@ -2014,13 +2022,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-taskdef": { @@ -2036,7 +2044,7 @@ "path": "farfhs-existingVpc/test-fargate-kinesisstreams-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -2061,7 +2069,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -2104,19 +2112,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -2162,7 +2170,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-container": { @@ -2170,13 +2178,13 @@ "path": "farfhs-existingVpc/test-fargate-kinesisstreams-taskdef/test-fargate-kinesisstreams-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-sg": { @@ -2204,13 +2212,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-service": { @@ -2262,13 +2270,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -2296,7 +2304,7 @@ "path": "farfhs-existingVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2304,25 +2312,25 @@ "path": "farfhs-existingVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2330,7 +2338,7 @@ "path": "farfhs-existingVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2338,13 +2346,13 @@ "path": "farfhs-existingVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -2358,7 +2366,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/farfhs-fargateServiceFromProps.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/farfhs-fargateServiceFromProps.assets.json index df4cb3135..fe3f95441 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/farfhs-fargateServiceFromProps.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/farfhs-fargateServiceFromProps.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "8a9df70d333400024bf25e89e18eeb6751c0761b35f84602659d5e65348a5856": { + "1082ca8184268e7e442b6cc007693df73f53c51072a475454fc3e8ff50d46deb": { "source": { "path": "farfhs-fargateServiceFromProps.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "8a9df70d333400024bf25e89e18eeb6751c0761b35f84602659d5e65348a5856.json", + "objectKey": "1082ca8184268e7e442b6cc007693df73f53c51072a475454fc3e8ff50d46deb.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/farfhs-fargateServiceFromProps.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/farfhs-fargateServiceFromProps.template.json index 0643c1cf3..7a4e5dc01 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/farfhs-fargateServiceFromProps.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/farfhs-fargateServiceFromProps.template.json @@ -552,7 +552,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -563,7 +563,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1381,7 +1389,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1745,6 +1761,115 @@ ] } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/manifest.json index bfd0698a4..e63fd3c8d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/manifest.json @@ -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}/8a9df70d333400024bf25e89e18eeb6751c0761b35f84602659d5e65348a5856.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1082ca8184268e7e442b6cc007693df73f53c51072a475454fc3e8ff50d46deb.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -148,6 +148,12 @@ "data": "destinationfirehoseKinesisFirehoseE8EB5D91" } ], + "/farfhs-fargateServiceFromProps/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/farfhs-fargateServiceFromProps/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/tree.json index c5839234d..337901d13 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-fargateServiceFromProps.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "farfhs-fargateServiceFromProps/destination-firehose/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,19 +389,19 @@ "path": "farfhs-fargateServiceFromProps/destination-firehose/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -417,7 +417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -437,19 +437,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -461,7 +461,7 @@ "path": "farfhs-fargateServiceFromProps/destination-firehose/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -486,13 +486,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -584,13 +584,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -659,13 +659,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "farfhs-fargateServiceFromProps/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -677,7 +685,7 @@ "path": "farfhs-fargateServiceFromProps/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -685,7 +693,7 @@ "path": "farfhs-fargateServiceFromProps/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -693,13 +701,13 @@ "path": "farfhs-fargateServiceFromProps/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "destination-firehoseaws-managed-key": { @@ -707,7 +715,7 @@ "path": "farfhs-fargateServiceFromProps/destination-firehoseaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams": { @@ -715,7 +723,7 @@ "path": "farfhs-fargateServiceFromProps/test-fargate-kinesisstreams", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-kinesisfirehose.FargateToKinesisFirehose", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -742,7 +750,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -786,7 +794,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -794,7 +802,7 @@ "path": "farfhs-fargateServiceFromProps/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -816,7 +824,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -835,7 +843,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -855,7 +863,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -875,7 +883,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -903,13 +911,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -953,7 +961,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -961,7 +969,7 @@ "path": "farfhs-fargateServiceFromProps/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -983,7 +991,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1002,7 +1010,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1022,7 +1030,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -1042,7 +1050,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -1070,13 +1078,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -1120,7 +1128,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -1128,7 +1136,7 @@ "path": "farfhs-fargateServiceFromProps/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1150,7 +1158,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1169,7 +1177,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1189,13 +1197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -1239,7 +1247,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -1247,7 +1255,7 @@ "path": "farfhs-fargateServiceFromProps/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1269,7 +1277,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1288,7 +1296,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1308,13 +1316,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -1333,7 +1341,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -1352,7 +1360,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1364,13 +1372,13 @@ "path": "farfhs-fargateServiceFromProps/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1386,7 +1394,7 @@ "path": "farfhs-fargateServiceFromProps/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1417,7 +1425,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1469,19 +1477,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1505,13 +1513,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1545,13 +1553,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_FIREHOSE": { @@ -1601,13 +1609,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -1657,13 +1665,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1713,13 +1721,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1766,19 +1774,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1790,7 +1798,7 @@ "path": "farfhs-fargateServiceFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1798,7 +1806,7 @@ "path": "farfhs-fargateServiceFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1806,13 +1814,13 @@ "path": "farfhs-fargateServiceFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-fargateServiceFromProps-KINESIS_FIREHOSE-security-group": { @@ -1868,13 +1876,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-fargateServiceFromProps-ECR_API-security-group": { @@ -1930,13 +1938,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-fargateServiceFromProps-ECR_DKR-security-group": { @@ -1992,13 +2000,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-cluster": { @@ -2014,13 +2022,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-taskdef": { @@ -2036,7 +2044,7 @@ "path": "farfhs-fargateServiceFromProps/test-fargate-kinesisstreams-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -2061,7 +2069,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -2104,19 +2112,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -2162,7 +2170,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-container": { @@ -2170,13 +2178,13 @@ "path": "farfhs-fargateServiceFromProps/test-fargate-kinesisstreams-taskdef/test-fargate-kinesisstreams-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-sg": { @@ -2204,13 +2212,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-service": { @@ -2263,13 +2271,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -2297,7 +2305,7 @@ "path": "farfhs-fargateServiceFromProps/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2305,25 +2313,25 @@ "path": "farfhs-fargateServiceFromProps/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2331,7 +2339,7 @@ "path": "farfhs-fargateServiceFromProps/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2339,13 +2347,13 @@ "path": "farfhs-fargateServiceFromProps/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -2359,7 +2367,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/farfhs-noArguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/farfhs-noArguments.assets.json index c5f9e914f..f6cee6090 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/farfhs-noArguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/farfhs-noArguments.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } @@ -29,7 +29,7 @@ } } }, - "85fa1f275a80fab86988f3ef21fc30269c79061f2bfff2103b3e76d3db3e8a4a": { + "8e5aa0755a3c417ef3e234396fcbc280f494bc4e0aee588ebbc57e8b4869621e": { "source": { "path": "farfhs-noArguments.template.json", "packaging": "file" @@ -37,7 +37,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "85fa1f275a80fab86988f3ef21fc30269c79061f2bfff2103b3e76d3db3e8a4a.json", + "objectKey": "8e5aa0755a3c417ef3e234396fcbc280f494bc4e0aee588ebbc57e8b4869621e.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/farfhs-noArguments.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/farfhs-noArguments.template.json index 591933147..528e33d9d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/farfhs-noArguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/farfhs-noArguments.template.json @@ -544,7 +544,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -555,7 +555,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", @@ -1332,7 +1332,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/manifest.json index 67961e30d..6e5e54bf0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/85fa1f275a80fab86988f3ef21fc30269c79061f2bfff2103b3e76d3db3e8a4a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/8e5aa0755a3c417ef3e234396fcbc280f494bc4e0aee588ebbc57e8b4869621e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/tree.json index b28ceade8..1b68e7d28 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-noArguments.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "farfhs-noArguments/destination-firehose/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,19 +389,19 @@ "path": "farfhs-noArguments/destination-firehose/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -417,7 +417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -437,19 +437,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -461,7 +461,7 @@ "path": "farfhs-noArguments/destination-firehose/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -486,13 +486,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -584,13 +584,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -651,13 +651,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -669,7 +669,7 @@ "path": "farfhs-noArguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -677,7 +677,7 @@ "path": "farfhs-noArguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -685,13 +685,13 @@ "path": "farfhs-noArguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "destination-firehoseaws-managed-key": { @@ -699,7 +699,7 @@ "path": "farfhs-noArguments/destination-firehoseaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct": { @@ -707,7 +707,7 @@ "path": "farfhs-noArguments/test-construct", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-kinesisfirehose.FargateToKinesisFirehose", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -734,7 +734,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -778,7 +778,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -786,7 +786,7 @@ "path": "farfhs-noArguments/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -808,7 +808,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -827,7 +827,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -847,7 +847,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -867,7 +867,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -895,13 +895,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -945,7 +945,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -953,7 +953,7 @@ "path": "farfhs-noArguments/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -975,7 +975,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -994,7 +994,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1014,7 +1014,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -1034,7 +1034,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -1062,13 +1062,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -1112,7 +1112,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -1120,7 +1120,7 @@ "path": "farfhs-noArguments/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1142,7 +1142,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1161,7 +1161,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1181,13 +1181,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -1231,7 +1231,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -1239,7 +1239,7 @@ "path": "farfhs-noArguments/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1261,7 +1261,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1280,7 +1280,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1300,13 +1300,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -1325,7 +1325,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -1344,7 +1344,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1356,13 +1356,13 @@ "path": "farfhs-noArguments/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1378,7 +1378,7 @@ "path": "farfhs-noArguments/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1409,7 +1409,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1461,19 +1461,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1497,13 +1497,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1537,13 +1537,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_FIREHOSE": { @@ -1582,13 +1582,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -1627,13 +1627,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1672,13 +1672,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1725,19 +1725,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1749,7 +1749,7 @@ "path": "farfhs-noArguments/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1757,7 +1757,7 @@ "path": "farfhs-noArguments/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1765,13 +1765,13 @@ "path": "farfhs-noArguments/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-noArguments-KINESIS_FIREHOSE-security-group": { @@ -1827,13 +1827,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-noArguments-ECR_API-security-group": { @@ -1889,13 +1889,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-noArguments-ECR_DKR-security-group": { @@ -1951,13 +1951,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-cluster": { @@ -1973,13 +1973,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-taskdef": { @@ -1995,7 +1995,7 @@ "path": "farfhs-noArguments/test-construct-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -2020,7 +2020,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -2063,19 +2063,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -2121,7 +2121,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-container": { @@ -2129,13 +2129,13 @@ "path": "farfhs-noArguments/test-construct-taskdef/test-construct-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-sg": { @@ -2163,13 +2163,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-service": { @@ -2221,13 +2221,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -2255,7 +2255,7 @@ "path": "farfhs-noArguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2263,25 +2263,25 @@ "path": "farfhs-noArguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2289,7 +2289,7 @@ "path": "farfhs-noArguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2297,13 +2297,13 @@ "path": "farfhs-noArguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -2317,7 +2317,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/farfhs-vpcFromprops.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/farfhs-vpcFromprops.assets.json index ab11c4817..887892e70 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/farfhs-vpcFromprops.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/farfhs-vpcFromprops.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "000bb2b1d2dcb76829c0ba7bc5c0d64c4fff9d1c6b2069bff4bc7dd968ff3ad6": { + "d64197a6fb7f7a90799bd5367a06bcdcb0f4fa9e29a40bcfef4dbe0b22b5ab36": { "source": { "path": "farfhs-vpcFromprops.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "000bb2b1d2dcb76829c0ba7bc5c0d64c4fff9d1c6b2069bff4bc7dd968ff3ad6.json", + "objectKey": "d64197a6fb7f7a90799bd5367a06bcdcb0f4fa9e29a40bcfef4dbe0b22b5ab36.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/farfhs-vpcFromprops.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/farfhs-vpcFromprops.template.json index 39921cb57..602d27c28 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/farfhs-vpcFromprops.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/farfhs-vpcFromprops.template.json @@ -552,7 +552,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -563,7 +563,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1381,7 +1389,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1744,6 +1760,115 @@ ] } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/manifest.json index 083a31263..9c4a02927 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/manifest.json @@ -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}/000bb2b1d2dcb76829c0ba7bc5c0d64c4fff9d1c6b2069bff4bc7dd968ff3ad6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d64197a6fb7f7a90799bd5367a06bcdcb0f4fa9e29a40bcfef4dbe0b22b5ab36.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -148,6 +148,12 @@ "data": "destinationfirehoseKinesisFirehoseE8EB5D91" } ], + "/farfhs-vpcFromprops/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/farfhs-vpcFromprops/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/tree.json index 64307b6a6..6616653e9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisfirehose/test/integ.farfhs-vpcFromprops.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "farfhs-vpcFromprops/destination-firehose/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,19 +389,19 @@ "path": "farfhs-vpcFromprops/destination-firehose/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -417,7 +417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -437,19 +437,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -461,7 +461,7 @@ "path": "farfhs-vpcFromprops/destination-firehose/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -486,13 +486,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -584,13 +584,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -659,13 +659,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "farfhs-vpcFromprops/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -677,7 +685,7 @@ "path": "farfhs-vpcFromprops/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -685,7 +693,7 @@ "path": "farfhs-vpcFromprops/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -693,13 +701,13 @@ "path": "farfhs-vpcFromprops/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "destination-firehoseaws-managed-key": { @@ -707,7 +715,7 @@ "path": "farfhs-vpcFromprops/destination-firehoseaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams": { @@ -715,7 +723,7 @@ "path": "farfhs-vpcFromprops/test-fargate-kinesisstreams", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-kinesisfirehose.FargateToKinesisFirehose", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -742,7 +750,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -786,7 +794,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -794,7 +802,7 @@ "path": "farfhs-vpcFromprops/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -816,7 +824,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -835,7 +843,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -855,7 +863,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -875,7 +883,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -903,13 +911,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -953,7 +961,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -961,7 +969,7 @@ "path": "farfhs-vpcFromprops/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -983,7 +991,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1002,7 +1010,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1022,7 +1030,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -1042,7 +1050,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -1070,13 +1078,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -1120,7 +1128,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -1128,7 +1136,7 @@ "path": "farfhs-vpcFromprops/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1150,7 +1158,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1169,7 +1177,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1189,13 +1197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -1239,7 +1247,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -1247,7 +1255,7 @@ "path": "farfhs-vpcFromprops/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1269,7 +1277,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1288,7 +1296,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1308,13 +1316,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -1333,7 +1341,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -1352,7 +1360,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1364,13 +1372,13 @@ "path": "farfhs-vpcFromprops/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1386,7 +1394,7 @@ "path": "farfhs-vpcFromprops/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1417,7 +1425,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1469,19 +1477,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1505,13 +1513,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1545,13 +1553,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_FIREHOSE": { @@ -1601,13 +1609,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -1657,13 +1665,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1713,13 +1721,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1766,19 +1774,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1790,7 +1798,7 @@ "path": "farfhs-vpcFromprops/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1798,7 +1806,7 @@ "path": "farfhs-vpcFromprops/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1806,13 +1814,13 @@ "path": "farfhs-vpcFromprops/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-vpcFromprops-KINESIS_FIREHOSE-security-group": { @@ -1868,13 +1876,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-vpcFromprops-ECR_API-security-group": { @@ -1930,13 +1938,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farfhs-vpcFromprops-ECR_DKR-security-group": { @@ -1992,13 +2000,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-cluster": { @@ -2014,13 +2022,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-taskdef": { @@ -2036,7 +2044,7 @@ "path": "farfhs-vpcFromprops/test-fargate-kinesisstreams-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -2061,7 +2069,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -2104,19 +2112,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -2162,7 +2170,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-container": { @@ -2170,13 +2178,13 @@ "path": "farfhs-vpcFromprops/test-fargate-kinesisstreams-taskdef/test-fargate-kinesisstreams-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-sg": { @@ -2204,13 +2212,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-service": { @@ -2262,13 +2270,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -2296,7 +2304,7 @@ "path": "farfhs-vpcFromprops/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2304,25 +2312,25 @@ "path": "farfhs-vpcFromprops/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2330,7 +2338,7 @@ "path": "farfhs-vpcFromprops/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2338,13 +2346,13 @@ "path": "farfhs-vpcFromprops/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -2358,7 +2366,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/farkin-existingFargateService.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/farkin-existingFargateService.assets.json index 782eaea7d..6457a174b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/farkin-existingFargateService.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/farkin-existingFargateService.assets.json @@ -14,7 +14,7 @@ } } }, - "53b1e0a9804d72360b0dfcebdd3b5c9e96dfe8b8632474e5e8d45a8e8b8ce332": { + "d1675c582afdbbbc22c75dcd6902058e17224d848bc491e3a9562f903b788c3e": { "source": { "path": "farkin-existingFargateService.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "53b1e0a9804d72360b0dfcebdd3b5c9e96dfe8b8632474e5e8d45a8e8b8ce332.json", + "objectKey": "d1675c582afdbbbc22c75dcd6902058e17224d848bc491e3a9562f903b788c3e.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/farkin-existingFargateService.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/farkin-existingFargateService.template.json index 17b92debd..2ebebb7ea 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/farkin-existingFargateService.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/farkin-existingFargateService.template.json @@ -782,7 +782,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1185,6 +1193,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/manifest.json index dec3b0148..44c38c7ac 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/manifest.json @@ -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}/53b1e0a9804d72360b0dfcebdd3b5c9e96dfe8b8632474e5e8d45a8e8b8ce332.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d1675c582afdbbbc22c75dcd6902058e17224d848bc491e3a9562f903b788c3e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -274,6 +274,12 @@ "data": "VpcKINESISSTREAMSC07D91B5" } ], + "/farkin-existingFargateService/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/farkin-existingFargateService/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/tree.json index 12325b086..c6a734094 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingFargateService.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "farkin-existingFargateService/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "farkin-existingFargateService/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "farkin-existingFargateService/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "farkin-existingFargateService/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "farkin-existingFargateService/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "farkin-existingFargateService/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -891,13 +891,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -947,13 +947,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1000,13 +1000,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_STREAMS": { @@ -1056,19 +1056,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "farkin-existingFargateService/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1080,7 +1088,7 @@ "path": "farkin-existingFargateService/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1088,7 +1096,7 @@ "path": "farkin-existingFargateService/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1096,13 +1104,13 @@ "path": "farkin-existingFargateService/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-existingFargateService-ECR_API-security-group": { @@ -1158,13 +1166,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-existingFargateService-ECR_DKR-security-group": { @@ -1220,13 +1228,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1242,13 +1250,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1264,7 +1272,7 @@ "path": "farkin-existingFargateService/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1289,7 +1297,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1331,19 +1339,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1391,7 +1399,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -1399,13 +1407,13 @@ "path": "farkin-existingFargateService/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -1433,13 +1441,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -1491,13 +1499,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams": { @@ -1524,13 +1532,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -1555,13 +1563,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -1586,19 +1594,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-kinesisstreams.FargateToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "farkin-existingFargateService-KINESIS_STREAMS-security-group": { @@ -1654,13 +1662,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1688,7 +1696,7 @@ "path": "farkin-existingFargateService/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1696,25 +1704,25 @@ "path": "farkin-existingFargateService/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1722,7 +1730,7 @@ "path": "farkin-existingFargateService/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1730,13 +1738,13 @@ "path": "farkin-existingFargateService/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1750,7 +1758,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/farkin-existingStream.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/farkin-existingStream.assets.json index be6f0fe60..ddd509a6b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/farkin-existingStream.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/farkin-existingStream.assets.json @@ -14,7 +14,7 @@ } } }, - "053bb6c129b37d37dbc5515d4a6d8509a81bb2ca8bc9d7ca7718e66f68b9c9ef": { + "640b0959b4ba7328ff033cc5fd246ec85dbda787cbf9b2ae5d45c073d8bd0668": { "source": { "path": "farkin-existingStream.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "053bb6c129b37d37dbc5515d4a6d8509a81bb2ca8bc9d7ca7718e66f68b9c9ef.json", + "objectKey": "640b0959b4ba7328ff033cc5fd246ec85dbda787cbf9b2ae5d45c073d8bd0668.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/farkin-existingStream.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/farkin-existingStream.template.json index 7d01ce1d1..7edeb3197 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/farkin-existingStream.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/farkin-existingStream.template.json @@ -823,7 +823,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1187,6 +1195,115 @@ ] } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/manifest.json index 7be44e1cc..2ddfccba4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/manifest.json @@ -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}/053bb6c129b37d37dbc5515d4a6d8509a81bb2ca8bc9d7ca7718e66f68b9c9ef.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/640b0959b4ba7328ff033cc5fd246ec85dbda787cbf9b2ae5d45c073d8bd0668.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -292,6 +292,12 @@ "data": "VpcS3A5408339" } ], + "/farkin-existingStream/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/farkin-existingStream/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/tree.json index eb152bd2c..d0be28686 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingStream.js.snapshot/tree.json @@ -30,13 +30,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams": { @@ -65,13 +65,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -96,19 +96,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-kinesisstreams.FargateToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -135,7 +135,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -179,7 +179,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -187,7 +187,7 @@ "path": "farkin-existingStream/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -209,7 +209,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -228,7 +228,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -248,7 +248,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -268,7 +268,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -296,13 +296,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -346,7 +346,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -354,7 +354,7 @@ "path": "farkin-existingStream/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -376,7 +376,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -395,7 +395,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -415,7 +415,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -435,7 +435,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -463,13 +463,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -513,7 +513,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -521,7 +521,7 @@ "path": "farkin-existingStream/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -543,7 +543,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -562,7 +562,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -582,13 +582,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -632,7 +632,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -640,7 +640,7 @@ "path": "farkin-existingStream/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -662,7 +662,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -681,7 +681,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -701,13 +701,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -726,7 +726,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -745,7 +745,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -757,13 +757,13 @@ "path": "farkin-existingStream/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -779,7 +779,7 @@ "path": "farkin-existingStream/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -810,7 +810,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -862,19 +862,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -898,13 +898,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -938,13 +938,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_STREAMS": { @@ -994,13 +994,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -1050,13 +1050,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1106,13 +1106,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1159,19 +1159,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "farkin-existingStream/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1183,7 +1191,7 @@ "path": "farkin-existingStream/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1191,7 +1199,7 @@ "path": "farkin-existingStream/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1199,13 +1207,13 @@ "path": "farkin-existingStream/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-existingStream-KINESIS_STREAMS-security-group": { @@ -1261,13 +1269,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-existingStream-ECR_API-security-group": { @@ -1323,13 +1331,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-existingStream-ECR_DKR-security-group": { @@ -1385,13 +1393,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-cluster": { @@ -1407,13 +1415,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-taskdef": { @@ -1429,7 +1437,7 @@ "path": "farkin-existingStream/test-fargate-kinesisstreams-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1454,7 +1462,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1496,19 +1504,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1556,7 +1564,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-container": { @@ -1564,13 +1572,13 @@ "path": "farkin-existingStream/test-fargate-kinesisstreams-taskdef/test-fargate-kinesisstreams-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-sg": { @@ -1598,13 +1606,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-service": { @@ -1656,13 +1664,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1690,7 +1698,7 @@ "path": "farkin-existingStream/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1698,25 +1706,25 @@ "path": "farkin-existingStream/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1724,7 +1732,7 @@ "path": "farkin-existingStream/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1732,13 +1740,13 @@ "path": "farkin-existingStream/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1752,7 +1760,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/farkin-existingVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/farkin-existingVpc.assets.json index e1d08846c..3bbd25d87 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/farkin-existingVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/farkin-existingVpc.assets.json @@ -14,7 +14,7 @@ } } }, - "604f3bc00c550332fdb596ef64f9274a74292beddf39608974628aaf36a5621b": { + "089e716d6093e9fc09798b17f15e175e5aedbe44a4480e37391fafe8e52512bf": { "source": { "path": "farkin-existingVpc.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "604f3bc00c550332fdb596ef64f9274a74292beddf39608974628aaf36a5621b.json", + "objectKey": "089e716d6093e9fc09798b17f15e175e5aedbe44a4480e37391fafe8e52512bf.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/farkin-existingVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/farkin-existingVpc.template.json index 4deac95a3..cec2d34c4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/farkin-existingVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/farkin-existingVpc.template.json @@ -782,7 +782,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1185,6 +1193,115 @@ ] } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/manifest.json index f486d7a11..18a3f78f6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/manifest.json @@ -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}/604f3bc00c550332fdb596ef64f9274a74292beddf39608974628aaf36a5621b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/089e716d6093e9fc09798b17f15e175e5aedbe44a4480e37391fafe8e52512bf.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -274,6 +274,12 @@ "data": "VpcS3A5408339" } ], + "/farkin-existingVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/farkin-existingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/tree.json index 50507e465..530100cda 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-existingVpc.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "farkin-existingVpc/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "farkin-existingVpc/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "farkin-existingVpc/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "farkin-existingVpc/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "farkin-existingVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "farkin-existingVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_STREAMS": { @@ -891,13 +891,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -947,13 +947,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1003,13 +1003,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1056,19 +1056,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "farkin-existingVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1080,7 +1088,7 @@ "path": "farkin-existingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1088,7 +1096,7 @@ "path": "farkin-existingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1096,13 +1104,13 @@ "path": "farkin-existingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams": { @@ -1129,13 +1137,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -1160,13 +1168,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -1191,19 +1199,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-kinesisstreams.FargateToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "farkin-existingVpc-KINESIS_STREAMS-security-group": { @@ -1259,13 +1267,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-existingVpc-ECR_API-security-group": { @@ -1321,13 +1329,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-existingVpc-ECR_DKR-security-group": { @@ -1383,13 +1391,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-cluster": { @@ -1405,13 +1413,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-taskdef": { @@ -1427,7 +1435,7 @@ "path": "farkin-existingVpc/test-fargate-kinesisstreams-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1452,7 +1460,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1494,19 +1502,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1554,7 +1562,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-container": { @@ -1562,13 +1570,13 @@ "path": "farkin-existingVpc/test-fargate-kinesisstreams-taskdef/test-fargate-kinesisstreams-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-sg": { @@ -1596,13 +1604,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-service": { @@ -1654,13 +1662,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1688,7 +1696,7 @@ "path": "farkin-existingVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1696,25 +1704,25 @@ "path": "farkin-existingVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1722,7 +1730,7 @@ "path": "farkin-existingVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1730,13 +1738,13 @@ "path": "farkin-existingVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1750,7 +1758,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/farkin-fargateServiceFromProps.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/farkin-fargateServiceFromProps.assets.json index f2efcdc10..008f606c8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/farkin-fargateServiceFromProps.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/farkin-fargateServiceFromProps.assets.json @@ -14,7 +14,7 @@ } } }, - "5b3854141eb6d76ea8f125b008f4a844c3d71e3aef9f8536dd7e8ce29e15e36f": { + "9d5a0fb305192e06378aaf597c458809ab105a6959962667ce19e0fbc96e39a0": { "source": { "path": "farkin-fargateServiceFromProps.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "5b3854141eb6d76ea8f125b008f4a844c3d71e3aef9f8536dd7e8ce29e15e36f.json", + "objectKey": "9d5a0fb305192e06378aaf597c458809ab105a6959962667ce19e0fbc96e39a0.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/farkin-fargateServiceFromProps.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/farkin-fargateServiceFromProps.template.json index 440a24946..c0a606531 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/farkin-fargateServiceFromProps.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/farkin-fargateServiceFromProps.template.json @@ -821,7 +821,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1186,6 +1194,115 @@ ] } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/manifest.json index 742040f9e..09fc99b93 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/manifest.json @@ -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}/5b3854141eb6d76ea8f125b008f4a844c3d71e3aef9f8536dd7e8ce29e15e36f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9d5a0fb305192e06378aaf597c458809ab105a6959962667ce19e0fbc96e39a0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -292,6 +292,12 @@ "data": "VpcS3A5408339" } ], + "/farkin-fargateServiceFromProps/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/farkin-fargateServiceFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/tree.json index 746eac823..45deb1705 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-fargateServiceFromProps.js.snapshot/tree.json @@ -32,13 +32,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -63,13 +63,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -94,19 +94,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-kinesisstreams.FargateToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -133,7 +133,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -177,7 +177,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -185,7 +185,7 @@ "path": "farkin-fargateServiceFromProps/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -207,7 +207,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -226,7 +226,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -246,7 +246,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -266,7 +266,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -294,13 +294,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -344,7 +344,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -352,7 +352,7 @@ "path": "farkin-fargateServiceFromProps/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -374,7 +374,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -393,7 +393,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -413,7 +413,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -433,7 +433,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -461,13 +461,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -511,7 +511,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -519,7 +519,7 @@ "path": "farkin-fargateServiceFromProps/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -541,7 +541,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -560,7 +560,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -580,13 +580,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -630,7 +630,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -638,7 +638,7 @@ "path": "farkin-fargateServiceFromProps/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -660,7 +660,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -679,7 +679,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -699,13 +699,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -724,7 +724,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -743,7 +743,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -755,13 +755,13 @@ "path": "farkin-fargateServiceFromProps/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -777,7 +777,7 @@ "path": "farkin-fargateServiceFromProps/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -808,7 +808,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -860,19 +860,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -896,13 +896,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -936,13 +936,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_STREAMS": { @@ -992,13 +992,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -1048,13 +1048,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1104,13 +1104,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1157,19 +1157,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "farkin-fargateServiceFromProps/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1181,7 +1189,7 @@ "path": "farkin-fargateServiceFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1189,7 +1197,7 @@ "path": "farkin-fargateServiceFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1197,13 +1205,13 @@ "path": "farkin-fargateServiceFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-fargateServiceFromProps-KINESIS_STREAMS-security-group": { @@ -1259,13 +1267,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-fargateServiceFromProps-ECR_API-security-group": { @@ -1321,13 +1329,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-fargateServiceFromProps-ECR_DKR-security-group": { @@ -1383,13 +1391,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-cluster": { @@ -1405,13 +1413,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-taskdef": { @@ -1427,7 +1435,7 @@ "path": "farkin-fargateServiceFromProps/test-fargate-kinesisstreams-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1452,7 +1460,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1494,19 +1502,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1554,7 +1562,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-container": { @@ -1562,13 +1570,13 @@ "path": "farkin-fargateServiceFromProps/test-fargate-kinesisstreams-taskdef/test-fargate-kinesisstreams-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-sg": { @@ -1596,13 +1604,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-service": { @@ -1655,13 +1663,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1689,7 +1697,7 @@ "path": "farkin-fargateServiceFromProps/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1697,25 +1705,25 @@ "path": "farkin-fargateServiceFromProps/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1723,7 +1731,7 @@ "path": "farkin-fargateServiceFromProps/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1731,13 +1739,13 @@ "path": "farkin-fargateServiceFromProps/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1751,7 +1759,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/farkin-noArguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/farkin-noArguments.assets.json index 4507401b1..3dfb6627d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/farkin-noArguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/farkin-noArguments.assets.json @@ -14,7 +14,7 @@ } } }, - "cb3a1bc8bc47193768595da93eec393cff73c1046a9bd843c263ceab0cd04891": { + "08f8cf59bba5711c5e30910d30604767fb92235edc8f9f35cd5812b24ad41c51": { "source": { "path": "farkin-noArguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "cb3a1bc8bc47193768595da93eec393cff73c1046a9bd843c263ceab0cd04891.json", + "objectKey": "08f8cf59bba5711c5e30910d30604767fb92235edc8f9f35cd5812b24ad41c51.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/farkin-noArguments.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/farkin-noArguments.template.json index 0e0a55282..2ccec25ad 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/farkin-noArguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/farkin-noArguments.template.json @@ -821,7 +821,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1185,6 +1193,115 @@ ] } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/manifest.json index af192b442..706937c2e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/manifest.json @@ -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}/cb3a1bc8bc47193768595da93eec393cff73c1046a9bd843c263ceab0cd04891.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08f8cf59bba5711c5e30910d30604767fb92235edc8f9f35cd5812b24ad41c51.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -292,6 +292,12 @@ "data": "VpcS3A5408339" } ], + "/farkin-noArguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/farkin-noArguments/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/tree.json index f2ec1a2f2..fbffaf6bb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-noArguments.js.snapshot/tree.json @@ -32,13 +32,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -63,13 +63,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -94,19 +94,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-kinesisstreams.FargateToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -133,7 +133,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -177,7 +177,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -185,7 +185,7 @@ "path": "farkin-noArguments/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -207,7 +207,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -226,7 +226,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -246,7 +246,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -266,7 +266,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -294,13 +294,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -344,7 +344,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -352,7 +352,7 @@ "path": "farkin-noArguments/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -374,7 +374,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -393,7 +393,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -413,7 +413,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -433,7 +433,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -461,13 +461,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -511,7 +511,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -519,7 +519,7 @@ "path": "farkin-noArguments/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -541,7 +541,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -560,7 +560,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -580,13 +580,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -630,7 +630,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -638,7 +638,7 @@ "path": "farkin-noArguments/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -660,7 +660,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -679,7 +679,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -699,13 +699,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -724,7 +724,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -743,7 +743,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -755,13 +755,13 @@ "path": "farkin-noArguments/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -777,7 +777,7 @@ "path": "farkin-noArguments/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -808,7 +808,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -860,19 +860,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -896,13 +896,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -936,13 +936,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_STREAMS": { @@ -992,13 +992,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -1048,13 +1048,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1104,13 +1104,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1157,19 +1157,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "farkin-noArguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1181,7 +1189,7 @@ "path": "farkin-noArguments/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1189,7 +1197,7 @@ "path": "farkin-noArguments/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1197,13 +1205,13 @@ "path": "farkin-noArguments/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-noArguments-KINESIS_STREAMS-security-group": { @@ -1259,13 +1267,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-noArguments-ECR_API-security-group": { @@ -1321,13 +1329,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-noArguments-ECR_DKR-security-group": { @@ -1383,13 +1391,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-cluster": { @@ -1405,13 +1413,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-taskdef": { @@ -1427,7 +1435,7 @@ "path": "farkin-noArguments/test-fargate-kinesisstreams-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1452,7 +1460,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1494,19 +1502,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1554,7 +1562,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-container": { @@ -1562,13 +1570,13 @@ "path": "farkin-noArguments/test-fargate-kinesisstreams-taskdef/test-fargate-kinesisstreams-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-sg": { @@ -1596,13 +1604,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-service": { @@ -1654,13 +1662,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1688,7 +1696,7 @@ "path": "farkin-noArguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1696,25 +1704,25 @@ "path": "farkin-noArguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1722,7 +1730,7 @@ "path": "farkin-noArguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1730,13 +1738,13 @@ "path": "farkin-noArguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1750,7 +1758,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/farkin-streamFromProps.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/farkin-streamFromProps.assets.json index 9f24a4265..d4f142152 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/farkin-streamFromProps.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/farkin-streamFromProps.assets.json @@ -14,7 +14,7 @@ } } }, - "c5da277f41a71bc275bae5d2420b63b50cdf71ab8e2d9aaa252836259197abee": { + "13c67c9be294aaba2788181edd5313a4c00071e2bc6132f7481904ebcedee905": { "source": { "path": "farkin-streamFromProps.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c5da277f41a71bc275bae5d2420b63b50cdf71ab8e2d9aaa252836259197abee.json", + "objectKey": "13c67c9be294aaba2788181edd5313a4c00071e2bc6132f7481904ebcedee905.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/farkin-streamFromProps.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/farkin-streamFromProps.template.json index ea03d70b0..fe38c31cb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/farkin-streamFromProps.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/farkin-streamFromProps.template.json @@ -823,7 +823,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1187,6 +1195,115 @@ ] } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/manifest.json index 5b151301b..c4e00583c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/manifest.json @@ -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}/c5da277f41a71bc275bae5d2420b63b50cdf71ab8e2d9aaa252836259197abee.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/13c67c9be294aaba2788181edd5313a4c00071e2bc6132f7481904ebcedee905.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -292,6 +292,12 @@ "data": "VpcS3A5408339" } ], + "/farkin-streamFromProps/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/farkin-streamFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/tree.json index db850f1b6..059a5c553 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-streamFromProps.js.snapshot/tree.json @@ -34,13 +34,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -65,13 +65,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -96,19 +96,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-kinesisstreams.FargateToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -135,7 +135,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -179,7 +179,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -187,7 +187,7 @@ "path": "farkin-streamFromProps/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -209,7 +209,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -228,7 +228,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -248,7 +248,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -268,7 +268,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -296,13 +296,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -346,7 +346,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -354,7 +354,7 @@ "path": "farkin-streamFromProps/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -376,7 +376,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -395,7 +395,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -415,7 +415,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -435,7 +435,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -463,13 +463,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -513,7 +513,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -521,7 +521,7 @@ "path": "farkin-streamFromProps/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -543,7 +543,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -562,7 +562,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -582,13 +582,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -632,7 +632,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -640,7 +640,7 @@ "path": "farkin-streamFromProps/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -662,7 +662,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -681,7 +681,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -701,13 +701,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -726,7 +726,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -745,7 +745,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -757,13 +757,13 @@ "path": "farkin-streamFromProps/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -779,7 +779,7 @@ "path": "farkin-streamFromProps/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -810,7 +810,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -862,19 +862,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -898,13 +898,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -938,13 +938,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_STREAMS": { @@ -994,13 +994,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -1050,13 +1050,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1106,13 +1106,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1159,19 +1159,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "farkin-streamFromProps/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1183,7 +1191,7 @@ "path": "farkin-streamFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1191,7 +1199,7 @@ "path": "farkin-streamFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1199,13 +1207,13 @@ "path": "farkin-streamFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-streamFromProps-KINESIS_STREAMS-security-group": { @@ -1261,13 +1269,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-streamFromProps-ECR_API-security-group": { @@ -1323,13 +1331,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-streamFromProps-ECR_DKR-security-group": { @@ -1385,13 +1393,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-cluster": { @@ -1407,13 +1415,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-taskdef": { @@ -1429,7 +1437,7 @@ "path": "farkin-streamFromProps/test-fargate-kinesisstreams-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1454,7 +1462,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1496,19 +1504,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1556,7 +1564,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-container": { @@ -1564,13 +1572,13 @@ "path": "farkin-streamFromProps/test-fargate-kinesisstreams-taskdef/test-fargate-kinesisstreams-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-sg": { @@ -1598,13 +1606,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-service": { @@ -1656,13 +1664,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1690,7 +1698,7 @@ "path": "farkin-streamFromProps/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1698,25 +1706,25 @@ "path": "farkin-streamFromProps/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1724,7 +1732,7 @@ "path": "farkin-streamFromProps/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1732,13 +1740,13 @@ "path": "farkin-streamFromProps/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1752,7 +1760,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/farkin-vpcFromProps.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/farkin-vpcFromProps.assets.json index 663d3b9b4..47693b3c3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/farkin-vpcFromProps.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/farkin-vpcFromProps.assets.json @@ -14,7 +14,7 @@ } } }, - "bf3d2294e44d6e60240c99da4e53d94f52f332b02cd8f292b3c01196d665e8d2": { + "a9da8a8f56467a25e7144e0c4136702147865c27906688ecaff5cc9fc513fcd9": { "source": { "path": "farkin-vpcFromProps.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bf3d2294e44d6e60240c99da4e53d94f52f332b02cd8f292b3c01196d665e8d2.json", + "objectKey": "a9da8a8f56467a25e7144e0c4136702147865c27906688ecaff5cc9fc513fcd9.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/farkin-vpcFromProps.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/farkin-vpcFromProps.template.json index 70e8be56d..56c39a6d3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/farkin-vpcFromProps.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/farkin-vpcFromProps.template.json @@ -821,7 +821,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1185,6 +1193,115 @@ ] } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/manifest.json index a7528b084..b4510bcd9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/manifest.json @@ -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}/bf3d2294e44d6e60240c99da4e53d94f52f332b02cd8f292b3c01196d665e8d2.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a9da8a8f56467a25e7144e0c4136702147865c27906688ecaff5cc9fc513fcd9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -292,6 +292,12 @@ "data": "VpcS3A5408339" } ], + "/farkin-vpcFromProps/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/farkin-vpcFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/tree.json index d5257ac1c..5af56be98 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-kinesisstreams/test/integ.farkin-vpcFromProps.js.snapshot/tree.json @@ -32,13 +32,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -63,13 +63,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -94,19 +94,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-kinesisstreams.FargateToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -133,7 +133,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -177,7 +177,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -185,7 +185,7 @@ "path": "farkin-vpcFromProps/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -207,7 +207,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -226,7 +226,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -246,7 +246,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -266,7 +266,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -294,13 +294,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -344,7 +344,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -352,7 +352,7 @@ "path": "farkin-vpcFromProps/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -374,7 +374,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -393,7 +393,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -413,7 +413,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -433,7 +433,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -461,13 +461,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -511,7 +511,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -519,7 +519,7 @@ "path": "farkin-vpcFromProps/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -541,7 +541,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -560,7 +560,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -580,13 +580,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -630,7 +630,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -638,7 +638,7 @@ "path": "farkin-vpcFromProps/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -660,7 +660,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -679,7 +679,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -699,13 +699,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -724,7 +724,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -743,7 +743,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -755,13 +755,13 @@ "path": "farkin-vpcFromProps/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -777,7 +777,7 @@ "path": "farkin-vpcFromProps/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -808,7 +808,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -860,19 +860,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -896,13 +896,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -936,13 +936,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_STREAMS": { @@ -992,13 +992,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -1048,13 +1048,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1104,13 +1104,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1157,19 +1157,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "farkin-vpcFromProps/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1181,7 +1189,7 @@ "path": "farkin-vpcFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1189,7 +1197,7 @@ "path": "farkin-vpcFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1197,13 +1205,13 @@ "path": "farkin-vpcFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-vpcFromProps-KINESIS_STREAMS-security-group": { @@ -1259,13 +1267,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-vpcFromProps-ECR_API-security-group": { @@ -1321,13 +1329,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farkin-vpcFromProps-ECR_DKR-security-group": { @@ -1383,13 +1391,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-cluster": { @@ -1405,13 +1413,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-taskdef": { @@ -1427,7 +1435,7 @@ "path": "farkin-vpcFromProps/test-fargate-kinesisstreams-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1452,7 +1460,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1494,19 +1502,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1554,7 +1562,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-container": { @@ -1562,13 +1570,13 @@ "path": "farkin-vpcFromProps/test-fargate-kinesisstreams-taskdef/test-fargate-kinesisstreams-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-sg": { @@ -1596,13 +1604,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-fargate-kinesisstreams-service": { @@ -1654,13 +1662,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1688,7 +1696,7 @@ "path": "farkin-vpcFromProps/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1696,25 +1704,25 @@ "path": "farkin-vpcFromProps/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1722,7 +1730,7 @@ "path": "farkin-vpcFromProps/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1730,13 +1738,13 @@ "path": "farkin-vpcFromProps/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1750,7 +1758,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/faropn-existing-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/faropn-existing-resources.assets.json index 93b305f75..04be87a8f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/faropn-existing-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/faropn-existing-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "ea022405c2aade74d89e5840572281e6bc4f50a8a4f1dcd171e67efae67e79ab": { + "2bd573aa1089f6ebbe3dc9c4ef8dacb77085828a35d9e79229fe07e058df20d5": { "source": { "path": "faropn-existing-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "ea022405c2aade74d89e5840572281e6bc4f50a8a4f1dcd171e67efae67e79ab.json", + "objectKey": "2bd573aa1089f6ebbe3dc9c4ef8dacb77085828a35d9e79229fe07e058df20d5.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/faropn-existing-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/faropn-existing-resources.template.json index c7d483b66..c0ff0cd25 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/faropn-existing-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/faropn-existing-resources.template.json @@ -715,7 +715,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/manifest.json index aabad159d..c01d69d6c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/ea022405c2aade74d89e5840572281e6bc4f50a8a4f1dcd171e67efae67e79ab.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/2bd573aa1089f6ebbe3dc9c4ef8dacb77085828a35d9e79229fe07e058df20d5.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/tree.json index e968876fb..5e4c85e68 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-existing-resources.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "faropn-existing-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "faropn-existing-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "faropn-existing-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "faropn-existing-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "faropn-existing-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "faropn-existing-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -880,13 +880,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -925,13 +925,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -978,19 +978,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1002,7 +1002,7 @@ "path": "faropn-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1010,7 +1010,7 @@ "path": "faropn-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1018,13 +1018,13 @@ "path": "faropn-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "faropn-existing-resources-ECR_API-security-group": { @@ -1080,13 +1080,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "faropn-existing-resources-ECR_DKR-security-group": { @@ -1142,13 +1142,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1164,13 +1164,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1186,7 +1186,7 @@ "path": "faropn-existing-resources/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1211,13 +1211,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1268,7 +1268,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -1276,13 +1276,13 @@ "path": "faropn-existing-resources/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -1310,13 +1310,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -1368,13 +1368,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct": { @@ -1422,13 +1422,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.143.0" + "version": "2.147.3" } }, "CognitoUserPoolClient": { @@ -1466,13 +1466,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.143.0" + "version": "2.147.3" } }, "CognitoIdentityPool": { @@ -1500,7 +1500,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.143.0" + "version": "2.147.3" } }, "UserPoolDomain": { @@ -1547,7 +1547,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.143.0" + "version": "2.147.3" } }, "CognitoAuthorizedRole": { @@ -1559,7 +1559,7 @@ "path": "faropn-existing-resources/test-construct/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1660,13 +1660,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "IdentityPoolRoleMapping": { @@ -1690,7 +1690,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "CognitoDashboardConfigureRole": { @@ -1702,7 +1702,7 @@ "path": "faropn-existing-resources/test-construct/CognitoDashboardConfigureRole/ImportCognitoDashboardConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1727,13 +1727,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "CognitoDashboardConfigureRolePolicy": { @@ -1875,13 +1875,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "OpenSearchDomain": { @@ -2054,7 +2054,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_opensearchservice.CfnDomain", - "version": "2.143.0" + "version": "2.147.3" } }, "StatusRedAlarm": { @@ -2079,13 +2079,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "StatusYellowAlarm": { @@ -2110,13 +2110,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "FreeStorageSpaceTooLowAlarm": { @@ -2141,13 +2141,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "IndexWritesBlockedTooHighAlarm": { @@ -2172,13 +2172,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -2203,13 +2203,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "CPUUtilizationTooHighAlarm": { @@ -2234,13 +2234,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "JVMMemoryPressureTooHighAlarm": { @@ -2265,13 +2265,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -2296,13 +2296,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -2327,19 +2327,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-opensearch.FargateToOpenSearch", - "version": "2.57.0" + "version": "2.60.0" } }, "Integ": { @@ -2367,7 +2367,7 @@ "path": "faropn-existing-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2375,25 +2375,25 @@ "path": "faropn-existing-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2401,7 +2401,7 @@ "path": "faropn-existing-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2409,13 +2409,13 @@ "path": "faropn-existing-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -2429,7 +2429,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/faropn-new-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/faropn-new-resources.assets.json index 9daa7e757..bc6a616ba 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/faropn-new-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/faropn-new-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "e418ab35dc29ac6cd4a9fbbd14963faa5547900ec596c216d406ae4ec2fe3213": { + "e944d062dd27a996d38062cfcec4165247c07580e8bf598bc053fc8e13c30fee": { "source": { "path": "faropn-new-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "e418ab35dc29ac6cd4a9fbbd14963faa5547900ec596c216d406ae4ec2fe3213.json", + "objectKey": "e944d062dd27a996d38062cfcec4165247c07580e8bf598bc053fc8e13c30fee.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/faropn-new-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/faropn-new-resources.template.json index 7a3534f2e..93dc832af 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/faropn-new-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/faropn-new-resources.template.json @@ -1389,7 +1389,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/manifest.json index 70f58798f..9745ff92d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/e418ab35dc29ac6cd4a9fbbd14963faa5547900ec596c216d406ae4ec2fe3213.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/e944d062dd27a996d38062cfcec4165247c07580e8bf598bc053fc8e13c30fee.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/tree.json index 99128134e..ec6af7d79 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-opensearch/test/integ.faropn-new-resources.js.snapshot/tree.json @@ -53,13 +53,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.143.0" + "version": "2.147.3" } }, "CognitoUserPoolClient": { @@ -97,13 +97,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.143.0" + "version": "2.147.3" } }, "CognitoIdentityPool": { @@ -131,7 +131,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.143.0" + "version": "2.147.3" } }, "UserPoolDomain": { @@ -178,7 +178,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.143.0" + "version": "2.147.3" } }, "CognitoAuthorizedRole": { @@ -190,7 +190,7 @@ "path": "faropn-new-resources/test-construct/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -291,13 +291,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "IdentityPoolRoleMapping": { @@ -321,7 +321,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "CognitoDashboardConfigureRole": { @@ -333,7 +333,7 @@ "path": "faropn-new-resources/test-construct/CognitoDashboardConfigureRole/ImportCognitoDashboardConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -358,13 +358,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "CognitoDashboardConfigureRolePolicy": { @@ -506,13 +506,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "OpenSearchDomain": { @@ -685,7 +685,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_opensearchservice.CfnDomain", - "version": "2.143.0" + "version": "2.147.3" } }, "StatusRedAlarm": { @@ -710,13 +710,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "StatusYellowAlarm": { @@ -741,13 +741,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "FreeStorageSpaceTooLowAlarm": { @@ -772,13 +772,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "IndexWritesBlockedTooHighAlarm": { @@ -803,13 +803,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -834,13 +834,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "CPUUtilizationTooHighAlarm": { @@ -865,13 +865,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "JVMMemoryPressureTooHighAlarm": { @@ -896,13 +896,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -927,13 +927,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -958,19 +958,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-opensearch.FargateToOpenSearch", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -997,7 +997,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -1041,7 +1041,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -1049,7 +1049,7 @@ "path": "faropn-new-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1071,7 +1071,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1090,7 +1090,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1110,7 +1110,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -1130,7 +1130,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -1158,13 +1158,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -1208,7 +1208,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -1216,7 +1216,7 @@ "path": "faropn-new-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1238,7 +1238,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1257,7 +1257,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1277,7 +1277,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -1297,7 +1297,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -1325,13 +1325,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -1375,7 +1375,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -1383,7 +1383,7 @@ "path": "faropn-new-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1405,7 +1405,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1424,7 +1424,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1444,13 +1444,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -1494,7 +1494,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -1502,7 +1502,7 @@ "path": "faropn-new-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1524,7 +1524,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1543,7 +1543,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1563,13 +1563,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -1588,7 +1588,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -1607,7 +1607,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1619,13 +1619,13 @@ "path": "faropn-new-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1641,7 +1641,7 @@ "path": "faropn-new-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1672,7 +1672,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1724,19 +1724,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1760,13 +1760,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1800,13 +1800,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -1845,13 +1845,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1890,13 +1890,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1943,19 +1943,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1967,7 +1967,7 @@ "path": "faropn-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1975,7 +1975,7 @@ "path": "faropn-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1983,13 +1983,13 @@ "path": "faropn-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "faropn-new-resources-ECR_API-security-group": { @@ -2045,13 +2045,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "faropn-new-resources-ECR_DKR-security-group": { @@ -2107,13 +2107,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-cluster": { @@ -2129,13 +2129,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-taskdef": { @@ -2151,7 +2151,7 @@ "path": "faropn-new-resources/test-construct-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -2176,13 +2176,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -2233,7 +2233,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-container": { @@ -2241,13 +2241,13 @@ "path": "faropn-new-resources/test-construct-taskdef/test-construct-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-sg": { @@ -2275,13 +2275,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-service": { @@ -2333,13 +2333,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -2367,7 +2367,7 @@ "path": "faropn-new-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2375,25 +2375,25 @@ "path": "faropn-new-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2401,7 +2401,7 @@ "path": "faropn-new-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2409,13 +2409,13 @@ "path": "faropn-new-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -2429,7 +2429,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/fars3-existing-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/fars3-existing-resources.assets.json index 0fb3df811..c62eee9a9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/fars3-existing-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/fars3-existing-resources.assets.json @@ -15,21 +15,21 @@ } } }, - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "7e74c684d92c9e8fb3e4b2368ade510f4ed0073eab601c5fa8fbc13094175548": { + "f5422976edcf515b0951c15835938baecfdd9a4c94556399dc7087283c04d72a": { "source": { "path": "fars3-existing-resources.template.json", "packaging": "file" @@ -37,7 +37,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "7e74c684d92c9e8fb3e4b2368ade510f4ed0073eab601c5fa8fbc13094175548.json", + "objectKey": "f5422976edcf515b0951c15835938baecfdd9a4c94556399dc7087283c04d72a.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/fars3-existing-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/fars3-existing-resources.template.json index c879fc17c..350e232d5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/fars3-existing-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/fars3-existing-resources.template.json @@ -715,7 +715,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -945,7 +945,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -956,7 +956,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/manifest.json index 78b9a7567..5d8daedc8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/7e74c684d92c9e8fb3e4b2368ade510f4ed0073eab601c5fa8fbc13094175548.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/f5422976edcf515b0951c15835938baecfdd9a4c94556399dc7087283c04d72a.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/tree.json index decb01800..7df559efa 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-existing-resources.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "fars3-existing-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "fars3-existing-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "fars3-existing-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "fars3-existing-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "fars3-existing-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "fars3-existing-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -880,13 +880,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -925,13 +925,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -978,19 +978,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1002,7 +1002,7 @@ "path": "fars3-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1010,7 +1010,7 @@ "path": "fars3-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1018,13 +1018,13 @@ "path": "fars3-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "scrapBucketLog": { @@ -1059,7 +1059,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1193,13 +1193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1211,19 +1211,19 @@ "path": "fars3-existing-resources/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1235,7 +1235,7 @@ "path": "fars3-existing-resources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1243,7 +1243,7 @@ "path": "fars3-existing-resources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1251,13 +1251,13 @@ "path": "fars3-existing-resources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -1297,7 +1297,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -1395,13 +1395,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1413,19 +1413,19 @@ "path": "fars3-existing-resources/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "fars3-existing-resources-ECR_API-security-group": { @@ -1481,13 +1481,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "fars3-existing-resources-ECR_DKR-security-group": { @@ -1543,13 +1543,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1565,13 +1565,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1587,7 +1587,7 @@ "path": "fars3-existing-resources/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1612,7 +1612,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1691,19 +1691,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1760,7 +1760,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -1768,13 +1768,13 @@ "path": "fars3-existing-resources/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -1802,13 +1802,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -1860,13 +1860,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct": { @@ -1874,7 +1874,7 @@ "path": "fars3-existing-resources/test-construct", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-s3.FargateToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "Integ": { @@ -1902,7 +1902,7 @@ "path": "fars3-existing-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1910,25 +1910,25 @@ "path": "fars3-existing-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1936,7 +1936,7 @@ "path": "fars3-existing-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1944,13 +1944,13 @@ "path": "fars3-existing-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1964,7 +1964,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/fars3-new-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/fars3-new-resources.assets.json index 1b75fc9ca..c4e11c01c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/fars3-new-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/fars3-new-resources.assets.json @@ -15,21 +15,21 @@ } } }, - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "9f9cc49ba59badd4609e9cadb28171fc18e88ce015cbc38b53b743a33fb39319": { + "f29583d23ed5dc122dc79597e0b924bea6d767018622d5179f5ab22c2e5ee8b5": { "source": { "path": "fars3-new-resources.template.json", "packaging": "file" @@ -37,7 +37,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "9f9cc49ba59badd4609e9cadb28171fc18e88ce015cbc38b53b743a33fb39319.json", + "objectKey": "f29583d23ed5dc122dc79597e0b924bea6d767018622d5179f5ab22c2e5ee8b5.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/fars3-new-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/fars3-new-resources.template.json index 1b48eee94..7788475c7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/fars3-new-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/fars3-new-resources.template.json @@ -1051,7 +1051,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1413,7 +1413,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1424,7 +1424,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/manifest.json index 99efe9dec..5f299d397 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/9f9cc49ba59badd4609e9cadb28171fc18e88ce015cbc38b53b743a33fb39319.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/f29583d23ed5dc122dc79597e0b924bea6d767018622d5179f5ab22c2e5ee8b5.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/tree.json index f9c7a4280..41e21db64 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-s3/test/integ.fars3-new-resources.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "fars3-new-resources/test-construct/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,25 +389,25 @@ "path": "fars3-new-resources/test-construct/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-s3.FargateToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -434,7 +434,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -478,7 +478,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -486,7 +486,7 @@ "path": "fars3-new-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -508,7 +508,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -527,7 +527,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -547,7 +547,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -567,7 +567,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -595,13 +595,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -645,7 +645,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -653,7 +653,7 @@ "path": "fars3-new-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -675,7 +675,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -694,7 +694,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -714,7 +714,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -734,7 +734,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -762,13 +762,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -812,7 +812,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -820,7 +820,7 @@ "path": "fars3-new-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -842,7 +842,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -861,7 +861,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -881,13 +881,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -931,7 +931,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -939,7 +939,7 @@ "path": "fars3-new-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -961,7 +961,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -980,7 +980,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1000,13 +1000,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -1025,7 +1025,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -1044,7 +1044,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1056,13 +1056,13 @@ "path": "fars3-new-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1078,7 +1078,7 @@ "path": "fars3-new-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1109,7 +1109,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1161,19 +1161,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1197,13 +1197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1237,13 +1237,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1290,13 +1290,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -1335,13 +1335,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1380,19 +1380,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1404,7 +1404,7 @@ "path": "fars3-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1412,7 +1412,7 @@ "path": "fars3-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1420,13 +1420,13 @@ "path": "fars3-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "fars3-new-resources-ECR_API-security-group": { @@ -1482,13 +1482,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "fars3-new-resources-ECR_DKR-security-group": { @@ -1544,13 +1544,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-cluster": { @@ -1566,13 +1566,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-taskdef": { @@ -1588,7 +1588,7 @@ "path": "fars3-new-resources/test-construct-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1613,7 +1613,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1674,19 +1674,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1743,7 +1743,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-container": { @@ -1751,13 +1751,13 @@ "path": "fars3-new-resources/test-construct-taskdef/test-construct-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-sg": { @@ -1785,13 +1785,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-service": { @@ -1843,13 +1843,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1861,7 +1861,7 @@ "path": "fars3-new-resources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1869,7 +1869,7 @@ "path": "fars3-new-resources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1877,13 +1877,13 @@ "path": "fars3-new-resources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1911,7 +1911,7 @@ "path": "fars3-new-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1919,25 +1919,25 @@ "path": "fars3-new-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1945,7 +1945,7 @@ "path": "fars3-new-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1953,13 +1953,13 @@ "path": "fars3-new-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1973,7 +1973,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/farsec-existing-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/farsec-existing-resources.assets.json index 7d1cb0538..8909c1363 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/farsec-existing-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/farsec-existing-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "ff3560cdce2ad4f3a9aa0a5c58aed7388413cd7c95d16b962cace66acd6714fd": { + "755372d19b30acd9ab914e2c0cff1652dfb2da2ae533b0085cd70c190944cf2b": { "source": { "path": "farsec-existing-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "ff3560cdce2ad4f3a9aa0a5c58aed7388413cd7c95d16b962cace66acd6714fd.json", + "objectKey": "755372d19b30acd9ab914e2c0cff1652dfb2da2ae533b0085cd70c190944cf2b.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/farsec-existing-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/farsec-existing-resources.template.json index 477fe8aff..0b07d1ade 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/farsec-existing-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/farsec-existing-resources.template.json @@ -742,7 +742,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/manifest.json index 54bf3903a..dec3d193a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/ff3560cdce2ad4f3a9aa0a5c58aed7388413cd7c95d16b962cace66acd6714fd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/755372d19b30acd9ab914e2c0cff1652dfb2da2ae533b0085cd70c190944cf2b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/tree.json index 969734411..fc410b483 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-existing-resources.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "farsec-existing-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "farsec-existing-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "farsec-existing-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "farsec-existing-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "farsec-existing-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "farsec-existing-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -880,13 +880,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -925,13 +925,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -978,13 +978,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "SECRETS_MANAGER": { @@ -1023,19 +1023,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1047,7 +1047,7 @@ "path": "farsec-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1055,7 +1055,7 @@ "path": "farsec-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1063,13 +1063,13 @@ "path": "farsec-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "secret": { @@ -1087,13 +1087,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.Secret", - "version": "2.143.0" + "version": "2.147.3" } }, "farsec-existing-resources-ECR_API-security-group": { @@ -1149,13 +1149,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farsec-existing-resources-ECR_DKR-security-group": { @@ -1211,13 +1211,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1233,13 +1233,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1255,7 +1255,7 @@ "path": "farsec-existing-resources/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1280,7 +1280,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1318,19 +1318,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1378,7 +1378,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -1386,13 +1386,13 @@ "path": "farsec-existing-resources/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -1420,13 +1420,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -1478,13 +1478,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct": { @@ -1492,7 +1492,7 @@ "path": "farsec-existing-resources/test-construct", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-secretsmanager.FargateToSecretsmanager", - "version": "2.57.0" + "version": "2.60.0" } }, "farsec-existing-resources-SECRETS_MANAGER-security-group": { @@ -1548,13 +1548,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1582,7 +1582,7 @@ "path": "farsec-existing-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1590,25 +1590,25 @@ "path": "farsec-existing-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1616,7 +1616,7 @@ "path": "farsec-existing-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1624,13 +1624,13 @@ "path": "farsec-existing-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1644,7 +1644,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/farsec-new-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/farsec-new-resources.assets.json index fb8f85fb1..de4aba22d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/farsec-new-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/farsec-new-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "46d92e3dbacd24980625b537d5e9f4fe36b4aedcfd0f4fa2477d2d2381c867f3": { + "213880885c2bcd17df5e6eca1ef70d362d7406957ed0e9ae5fcea982165a9d70": { "source": { "path": "farsec-new-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "46d92e3dbacd24980625b537d5e9f4fe36b4aedcfd0f4fa2477d2d2381c867f3.json", + "objectKey": "213880885c2bcd17df5e6eca1ef70d362d7406957ed0e9ae5fcea982165a9d70.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/farsec-new-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/farsec-new-resources.template.json index bdda64614..c4fc71a18 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/farsec-new-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/farsec-new-resources.template.json @@ -760,7 +760,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/manifest.json index 0e7d4faa6..dab2960fb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/46d92e3dbacd24980625b537d5e9f4fe36b4aedcfd0f4fa2477d2d2381c867f3.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/213880885c2bcd17df5e6eca1ef70d362d7406957ed0e9ae5fcea982165a9d70.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/tree.json index ca5d942a9..282f22a8d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-secretsmanager/test/integ.farsec-new-resources.js.snapshot/tree.json @@ -27,19 +27,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.Secret", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-secretsmanager.FargateToSecretsmanager", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -66,7 +66,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -110,7 +110,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -118,7 +118,7 @@ "path": "farsec-new-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -140,7 +140,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -159,7 +159,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -179,7 +179,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -199,7 +199,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -227,13 +227,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -277,7 +277,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -285,7 +285,7 @@ "path": "farsec-new-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -307,7 +307,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -326,7 +326,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -346,7 +346,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -366,7 +366,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -394,13 +394,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -444,7 +444,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -452,7 +452,7 @@ "path": "farsec-new-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -474,7 +474,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -493,7 +493,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -513,13 +513,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -563,7 +563,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -571,7 +571,7 @@ "path": "farsec-new-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -593,7 +593,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -612,7 +612,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -632,13 +632,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -657,7 +657,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -676,7 +676,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -688,13 +688,13 @@ "path": "farsec-new-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -710,7 +710,7 @@ "path": "farsec-new-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -741,7 +741,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -793,19 +793,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -829,13 +829,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -869,13 +869,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "SECRETS_MANAGER": { @@ -914,13 +914,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -959,13 +959,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1004,13 +1004,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1057,19 +1057,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1081,7 +1081,7 @@ "path": "farsec-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1089,7 +1089,7 @@ "path": "farsec-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1097,13 +1097,13 @@ "path": "farsec-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farsec-new-resources-SECRETS_MANAGER-security-group": { @@ -1159,13 +1159,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farsec-new-resources-ECR_API-security-group": { @@ -1221,13 +1221,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farsec-new-resources-ECR_DKR-security-group": { @@ -1283,13 +1283,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-cluster": { @@ -1305,13 +1305,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-taskdef": { @@ -1327,7 +1327,7 @@ "path": "farsec-new-resources/test-construct-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1352,7 +1352,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1392,19 +1392,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1452,7 +1452,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-container": { @@ -1460,13 +1460,13 @@ "path": "farsec-new-resources/test-construct-taskdef/test-construct-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-sg": { @@ -1494,13 +1494,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-service": { @@ -1552,13 +1552,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1586,7 +1586,7 @@ "path": "farsec-new-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1594,25 +1594,25 @@ "path": "farsec-new-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1620,7 +1620,7 @@ "path": "farsec-new-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1628,13 +1628,13 @@ "path": "farsec-new-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1648,7 +1648,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/farsns-existing-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/farsns-existing-resources.assets.json index 952fb7bd2..0701113f2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/farsns-existing-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/farsns-existing-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "e3730d8d27756accb36332070efee2740b632717bcdcb105487a7ee110b6100f": { + "eac75863099b72bbabd5a2d162f28bd9435b81e0ee6737cdf735ab2aeb7e6ae1": { "source": { "path": "farsns-existing-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "e3730d8d27756accb36332070efee2740b632717bcdcb105487a7ee110b6100f.json", + "objectKey": "eac75863099b72bbabd5a2d162f28bd9435b81e0ee6737cdf735ab2aeb7e6ae1.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/farsns-existing-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/farsns-existing-resources.template.json index 38a1b018c..7b5b251ff 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/farsns-existing-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/farsns-existing-resources.template.json @@ -742,7 +742,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/manifest.json index 999d7b618..42bd63437 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/e3730d8d27756accb36332070efee2740b632717bcdcb105487a7ee110b6100f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/eac75863099b72bbabd5a2d162f28bd9435b81e0ee6737cdf735ab2aeb7e6ae1.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/tree.json index 3db5a3487..903ae7611 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-existing-resources.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "farsns-existing-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "farsns-existing-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "farsns-existing-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "farsns-existing-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "farsns-existing-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "farsns-existing-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -880,13 +880,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -925,13 +925,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -978,13 +978,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "SNS": { @@ -1023,19 +1023,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1047,7 +1047,7 @@ "path": "farsns-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1055,7 +1055,7 @@ "path": "farsns-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1063,13 +1063,13 @@ "path": "farsns-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "test-topic": { @@ -1085,13 +1085,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.143.0" + "version": "2.147.3" } }, "farsns-existing-resources-ECR_API-security-group": { @@ -1147,13 +1147,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farsns-existing-resources-ECR_DKR-security-group": { @@ -1209,13 +1209,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1231,13 +1231,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1253,7 +1253,7 @@ "path": "farsns-existing-resources/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1278,7 +1278,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1313,19 +1313,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1382,7 +1382,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -1390,13 +1390,13 @@ "path": "farsns-existing-resources/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -1424,13 +1424,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -1482,13 +1482,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct": { @@ -1496,7 +1496,7 @@ "path": "farsns-existing-resources/test-construct", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-sns.FargateToSns", - "version": "2.57.0" + "version": "2.60.0" } }, "farsns-existing-resources-SNS-security-group": { @@ -1552,13 +1552,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1586,7 +1586,7 @@ "path": "farsns-existing-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1594,25 +1594,25 @@ "path": "farsns-existing-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1620,7 +1620,7 @@ "path": "farsns-existing-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1628,13 +1628,13 @@ "path": "farsns-existing-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1648,7 +1648,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/farsns-new-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/farsns-new-resources.assets.json index 4253277b3..0a98251a7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/farsns-new-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/farsns-new-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "f99d23a6500955c385540461252ba42a1a1ef6faa33c4c70cba8f93a0528a004": { + "1c7605a97ac3766d34e08f40ef36769136bcdb15fd162e0e10382383efe55624": { "source": { "path": "farsns-new-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "f99d23a6500955c385540461252ba42a1a1ef6faa33c4c70cba8f93a0528a004.json", + "objectKey": "1c7605a97ac3766d34e08f40ef36769136bcdb15fd162e0e10382383efe55624.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/farsns-new-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/farsns-new-resources.template.json index 75794a41a..b8bd5d8be 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/farsns-new-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/farsns-new-resources.template.json @@ -839,7 +839,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/manifest.json index a781f21b1..7eee06f10 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/f99d23a6500955c385540461252ba42a1a1ef6faa33c4c70cba8f93a0528a004.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/1c7605a97ac3766d34e08f40ef36769136bcdb15fd162e0e10382383efe55624.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/tree.json index c9deab38c..b4c2c65d1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sns/test/integ.farsns-new-resources.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "farsns-new-resources/test-construct/aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "SnsTopic": { @@ -46,7 +46,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -138,25 +138,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-sns.FargateToSns", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -183,7 +183,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -227,7 +227,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -235,7 +235,7 @@ "path": "farsns-new-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -257,7 +257,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -276,7 +276,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -296,7 +296,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -316,7 +316,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -344,13 +344,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -394,7 +394,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -402,7 +402,7 @@ "path": "farsns-new-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -424,7 +424,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -443,7 +443,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -463,7 +463,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -483,7 +483,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -511,13 +511,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -561,7 +561,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -569,7 +569,7 @@ "path": "farsns-new-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -591,7 +591,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -610,7 +610,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -630,13 +630,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -680,7 +680,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -688,7 +688,7 @@ "path": "farsns-new-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -710,7 +710,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -729,7 +729,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -749,13 +749,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -774,7 +774,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -793,7 +793,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -805,13 +805,13 @@ "path": "farsns-new-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -827,7 +827,7 @@ "path": "farsns-new-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -858,7 +858,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -910,19 +910,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -946,13 +946,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -986,13 +986,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "SNS": { @@ -1031,13 +1031,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -1076,13 +1076,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1121,13 +1121,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1174,19 +1174,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1198,7 +1198,7 @@ "path": "farsns-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1206,7 +1206,7 @@ "path": "farsns-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1214,13 +1214,13 @@ "path": "farsns-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farsns-new-resources-SNS-security-group": { @@ -1276,13 +1276,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farsns-new-resources-ECR_API-security-group": { @@ -1338,13 +1338,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farsns-new-resources-ECR_DKR-security-group": { @@ -1400,13 +1400,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-cluster": { @@ -1422,13 +1422,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-taskdef": { @@ -1444,7 +1444,7 @@ "path": "farsns-new-resources/test-construct-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1469,7 +1469,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1504,19 +1504,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1573,7 +1573,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-container": { @@ -1581,13 +1581,13 @@ "path": "farsns-new-resources/test-construct-taskdef/test-construct-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-sg": { @@ -1615,13 +1615,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-service": { @@ -1673,13 +1673,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1707,7 +1707,7 @@ "path": "farsns-new-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1715,25 +1715,25 @@ "path": "farsns-new-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1741,7 +1741,7 @@ "path": "farsns-new-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1749,13 +1749,13 @@ "path": "farsns-new-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1769,7 +1769,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/farsqs-existing-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/farsqs-existing-resources.assets.json index eb3120d66..21ead86f9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/farsqs-existing-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/farsqs-existing-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "9dba16873db9404a0f70b5d6d8575e41bc621e7099140916f54113f451d610d6": { + "de4dfe41d8d545ab553014f8a20204f2fe7eb5fa3e4f0e0192824743e84134f6": { "source": { "path": "farsqs-existing-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "9dba16873db9404a0f70b5d6d8575e41bc621e7099140916f54113f451d610d6.json", + "objectKey": "de4dfe41d8d545ab553014f8a20204f2fe7eb5fa3e4f0e0192824743e84134f6.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/farsqs-existing-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/farsqs-existing-resources.template.json index 47bce6c67..6ef4a650b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/farsqs-existing-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/farsqs-existing-resources.template.json @@ -742,7 +742,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/manifest.json index e70249633..0915954d5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/9dba16873db9404a0f70b5d6d8575e41bc621e7099140916f54113f451d610d6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/de4dfe41d8d545ab553014f8a20204f2fe7eb5fa3e4f0e0192824743e84134f6.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/tree.json index fb38fa32e..73022244d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-existing-resources.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "farsqs-existing-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "farsqs-existing-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "farsqs-existing-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "farsqs-existing-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "farsqs-existing-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "farsqs-existing-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -880,13 +880,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -925,13 +925,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -978,13 +978,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "SQS": { @@ -1023,19 +1023,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1047,7 +1047,7 @@ "path": "farsqs-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1055,7 +1055,7 @@ "path": "farsqs-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1063,13 +1063,13 @@ "path": "farsqs-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "test-queue": { @@ -1088,13 +1088,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } }, "farsqs-existing-resources-ECR_API-security-group": { @@ -1150,13 +1150,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farsqs-existing-resources-ECR_DKR-security-group": { @@ -1212,13 +1212,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1234,13 +1234,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1256,7 +1256,7 @@ "path": "farsqs-existing-resources/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1281,7 +1281,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1326,19 +1326,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1395,7 +1395,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -1403,13 +1403,13 @@ "path": "farsqs-existing-resources/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -1437,13 +1437,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -1495,13 +1495,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct": { @@ -1509,7 +1509,7 @@ "path": "farsqs-existing-resources/test-construct", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-sqs.FargateToSqs", - "version": "2.57.0" + "version": "2.60.0" } }, "farsqs-existing-resources-SQS-security-group": { @@ -1565,13 +1565,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1599,7 +1599,7 @@ "path": "farsqs-existing-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1607,25 +1607,25 @@ "path": "farsqs-existing-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1633,7 +1633,7 @@ "path": "farsqs-existing-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1641,13 +1641,13 @@ "path": "farsqs-existing-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1661,7 +1661,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/farsqs-new-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/farsqs-new-resources.assets.json index 46ae9021a..9dc638c66 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/farsqs-new-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/farsqs-new-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "bf4b43a92233d612ed3a3e5734ccd440e40de7d0d81a04e018753ff17d7299d1": { + "9a13b147f9d2863114761864a1c9666b9b9cf4dfbfc399309d5de3ffa3726e93": { "source": { "path": "farsqs-new-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "bf4b43a92233d612ed3a3e5734ccd440e40de7d0d81a04e018753ff17d7299d1.json", + "objectKey": "9a13b147f9d2863114761864a1c9666b9b9cf4dfbfc399309d5de3ffa3726e93.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/farsqs-new-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/farsqs-new-resources.template.json index 8731cac65..2b5bdbb49 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/farsqs-new-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/farsqs-new-resources.template.json @@ -818,7 +818,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/manifest.json index eed4e4155..6af114488 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/bf4b43a92233d612ed3a3e5734ccd440e40de7d0d81a04e018753ff17d7299d1.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/9a13b147f9d2863114761864a1c9666b9b9cf4dfbfc399309d5de3ffa3726e93.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/tree.json index 8a032d02f..bec29e893 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-sqs/test/integ.farsqs-new-resources.js.snapshot/tree.json @@ -28,7 +28,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -107,25 +107,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-sqs.FargateToSqs", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -152,7 +152,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -196,7 +196,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -204,7 +204,7 @@ "path": "farsqs-new-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -226,7 +226,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -245,7 +245,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -265,7 +265,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -285,7 +285,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -313,13 +313,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -363,7 +363,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -371,7 +371,7 @@ "path": "farsqs-new-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -393,7 +393,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -412,7 +412,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -432,7 +432,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -452,7 +452,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -480,13 +480,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -530,7 +530,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -538,7 +538,7 @@ "path": "farsqs-new-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -560,7 +560,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -579,7 +579,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -599,13 +599,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -649,7 +649,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -657,7 +657,7 @@ "path": "farsqs-new-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -679,7 +679,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -698,7 +698,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -718,13 +718,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -743,7 +743,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -762,7 +762,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -774,13 +774,13 @@ "path": "farsqs-new-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -796,7 +796,7 @@ "path": "farsqs-new-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -827,7 +827,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -879,19 +879,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -915,13 +915,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -955,13 +955,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "SQS": { @@ -1000,13 +1000,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -1045,13 +1045,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1090,13 +1090,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1143,19 +1143,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1167,7 +1167,7 @@ "path": "farsqs-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1175,7 +1175,7 @@ "path": "farsqs-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1183,13 +1183,13 @@ "path": "farsqs-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farsqs-new-resources-SQS-security-group": { @@ -1245,13 +1245,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farsqs-new-resources-ECR_API-security-group": { @@ -1307,13 +1307,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farsqs-new-resources-ECR_DKR-security-group": { @@ -1369,13 +1369,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-cluster": { @@ -1391,13 +1391,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-taskdef": { @@ -1413,7 +1413,7 @@ "path": "farsqs-new-resources/test-construct-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1438,7 +1438,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1480,19 +1480,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1549,7 +1549,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-container": { @@ -1557,13 +1557,13 @@ "path": "farsqs-new-resources/test-construct-taskdef/test-construct-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-sg": { @@ -1591,13 +1591,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-service": { @@ -1649,13 +1649,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1683,7 +1683,7 @@ "path": "farsqs-new-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1691,25 +1691,25 @@ "path": "farsqs-new-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1717,7 +1717,7 @@ "path": "farsqs-new-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1725,13 +1725,13 @@ "path": "farsqs-new-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1745,7 +1745,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/farssm-existing-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/farssm-existing-resources.assets.json index 09761ed0b..90ec61333 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/farssm-existing-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/farssm-existing-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "5562cb65b2b236b2f9302dc2c68736d967e4a4d87de3f9132f0bb926e7c80db8": { + "716466907039b5aa5699d92d262602d4752a6274f465941dae3e5fb8f514ac7b": { "source": { "path": "farssm-existing-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "5562cb65b2b236b2f9302dc2c68736d967e4a4d87de3f9132f0bb926e7c80db8.json", + "objectKey": "716466907039b5aa5699d92d262602d4752a6274f465941dae3e5fb8f514ac7b.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/farssm-existing-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/farssm-existing-resources.template.json index 1a44ce3fb..1e0382cc1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/farssm-existing-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/farssm-existing-resources.template.json @@ -742,7 +742,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/manifest.json index 0fe548f8b..a83f82f05 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/5562cb65b2b236b2f9302dc2c68736d967e4a4d87de3f9132f0bb926e7c80db8.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/716466907039b5aa5699d92d262602d4752a6274f465941dae3e5fb8f514ac7b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/tree.json index c5d455e83..40a539dec 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-existing-resources.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "farssm-existing-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "farssm-existing-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "farssm-existing-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "farssm-existing-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "farssm-existing-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "farssm-existing-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -880,13 +880,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -925,13 +925,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -978,13 +978,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "SSM": { @@ -1023,19 +1023,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1047,7 +1047,7 @@ "path": "farssm-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1055,7 +1055,7 @@ "path": "farssm-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1063,13 +1063,13 @@ "path": "farssm-existing-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Parameter": { @@ -1090,13 +1090,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.StringParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "farssm-existing-resources-ECR_API-security-group": { @@ -1152,13 +1152,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farssm-existing-resources-ECR_DKR-security-group": { @@ -1214,13 +1214,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1236,13 +1236,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1258,7 +1258,7 @@ "path": "farssm-existing-resources/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1283,7 +1283,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1336,19 +1336,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1396,7 +1396,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -1404,13 +1404,13 @@ "path": "farssm-existing-resources/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -1438,13 +1438,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -1496,13 +1496,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct": { @@ -1510,7 +1510,7 @@ "path": "farssm-existing-resources/test-construct", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-ssmstringparameter.FargateToSsmstringparameter", - "version": "2.57.0" + "version": "2.60.0" } }, "farssm-existing-resources-SSM-security-group": { @@ -1566,13 +1566,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1600,7 +1600,7 @@ "path": "farssm-existing-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1608,25 +1608,25 @@ "path": "farssm-existing-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1634,7 +1634,7 @@ "path": "farssm-existing-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1642,13 +1642,13 @@ "path": "farssm-existing-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1662,7 +1662,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/farssm-new-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/farssm-new-resources.assets.json index ef96d17d8..fbea3fd96 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/farssm-new-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/farssm-new-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "d275cd2bb3b92618396cdd864c5bea78a60335cc5b00e7f083106798ee8a0bc7": { + "27f24e120a3b31148e0a728c4796a48e41128329eb8270434de7974bd731255a": { "source": { "path": "farssm-new-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "d275cd2bb3b92618396cdd864c5bea78a60335cc5b00e7f083106798ee8a0bc7.json", + "objectKey": "27f24e120a3b31148e0a728c4796a48e41128329eb8270434de7974bd731255a.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/farssm-new-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/farssm-new-resources.template.json index 0808916d1..243743021 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/farssm-new-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/farssm-new-resources.template.json @@ -749,7 +749,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/manifest.json index b357a160f..488d4b1a1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/d275cd2bb3b92618396cdd864c5bea78a60335cc5b00e7f083106798ee8a0bc7.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/27f24e120a3b31148e0a728c4796a48e41128329eb8270434de7974bd731255a.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/tree.json index 4bf623020..884d2fa5a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-ssmstringparameter/test/integ.farssm-new-resources.js.snapshot/tree.json @@ -28,19 +28,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.StringParameter", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-ssmstringparameter.FargateToSsmstringparameter", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -67,7 +67,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -111,7 +111,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -119,7 +119,7 @@ "path": "farssm-new-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -141,7 +141,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -160,7 +160,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -180,7 +180,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -200,7 +200,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -228,13 +228,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -278,7 +278,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -286,7 +286,7 @@ "path": "farssm-new-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -308,7 +308,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -327,7 +327,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -347,7 +347,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -367,7 +367,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -395,13 +395,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -445,7 +445,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -453,7 +453,7 @@ "path": "farssm-new-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -475,7 +475,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -494,7 +494,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -514,13 +514,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -564,7 +564,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -572,7 +572,7 @@ "path": "farssm-new-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -594,7 +594,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -613,7 +613,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -633,13 +633,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -658,7 +658,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -677,7 +677,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -689,13 +689,13 @@ "path": "farssm-new-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -711,7 +711,7 @@ "path": "farssm-new-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -742,7 +742,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -794,19 +794,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -830,13 +830,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -870,13 +870,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "SSM": { @@ -915,13 +915,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -960,13 +960,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -1005,13 +1005,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -1058,19 +1058,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1082,7 +1082,7 @@ "path": "farssm-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1090,7 +1090,7 @@ "path": "farssm-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1098,13 +1098,13 @@ "path": "farssm-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farssm-new-resources-SSM-security-group": { @@ -1160,13 +1160,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farssm-new-resources-ECR_API-security-group": { @@ -1222,13 +1222,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farssm-new-resources-ECR_DKR-security-group": { @@ -1284,13 +1284,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-cluster": { @@ -1306,13 +1306,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-taskdef": { @@ -1328,7 +1328,7 @@ "path": "farssm-new-resources/test-construct-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1353,7 +1353,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1405,19 +1405,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1465,7 +1465,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-container": { @@ -1473,13 +1473,13 @@ "path": "farssm-new-resources/test-construct-taskdef/test-construct-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-sg": { @@ -1507,13 +1507,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct-service": { @@ -1565,13 +1565,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1599,7 +1599,7 @@ "path": "farssm-new-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1607,25 +1607,25 @@ "path": "farssm-new-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1633,7 +1633,7 @@ "path": "farssm-new-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1641,13 +1641,13 @@ "path": "farssm-new-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1661,7 +1661,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/farstp-new-resources.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/farstp-new-resources.assets.json index a76f49a9f..b2f3b9f9e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/farstp-new-resources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/farstp-new-resources.assets.json @@ -15,7 +15,7 @@ } } }, - "cae19b3201ba32fc04e68f7f8053b27a65217912d2d897e68cd6269beff178e6": { + "03f8563b8dbfdbc7ed41bba3c6f6d26fef9b563a6c22b99795c74c56d7f669f3": { "source": { "path": "farstp-new-resources.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "cae19b3201ba32fc04e68f7f8053b27a65217912d2d897e68cd6269beff178e6.json", + "objectKey": "03f8563b8dbfdbc7ed41bba3c6f6d26fef9b563a6c22b99795c74c56d7f669f3.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/farstp-new-resources.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/farstp-new-resources.template.json index e3757ddc0..418b633ac 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/farstp-new-resources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/farstp-new-resources.template.json @@ -742,7 +742,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/manifest.json index 634f30e83..aa1a40bb6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/cae19b3201ba32fc04e68f7f8053b27a65217912d2d897e68cd6269beff178e6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/03f8563b8dbfdbc7ed41bba3c6f6d26fef9b563a6c22b99795c74c56d7f669f3.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/tree.json index 3ffd37102..3d501cbda 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-new-resources.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "farstp-new-resources/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "farstp-new-resources/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "farstp-new-resources/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "farstp-new-resources/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "farstp-new-resources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "farstp-new-resources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -880,13 +880,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -925,13 +925,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -978,13 +978,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "STEP_FUNCTIONS": { @@ -1023,19 +1023,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1047,7 +1047,7 @@ "path": "farstp-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1055,7 +1055,7 @@ "path": "farstp-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1063,13 +1063,13 @@ "path": "farstp-new-resources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farstp-new-resources-ECR_API-security-group": { @@ -1125,13 +1125,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farstp-new-resources-ECR_DKR-security-group": { @@ -1187,13 +1187,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1209,13 +1209,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1231,7 +1231,7 @@ "path": "farstp-new-resources/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1256,7 +1256,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1291,19 +1291,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1351,7 +1351,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -1359,13 +1359,13 @@ "path": "farstp-new-resources/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -1393,13 +1393,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -1451,13 +1451,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "lambdafarstp-test": { @@ -1473,7 +1473,7 @@ "path": "farstp-new-resources/lambdafarstp-test/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1512,13 +1512,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1542,13 +1542,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "taskfarstp-test": { @@ -1556,7 +1556,7 @@ "path": "farstp-new-resources/taskfarstp-test", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct": { @@ -1598,13 +1598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "StateMachine": { @@ -1620,7 +1620,7 @@ "path": "farstp-new-resources/test-construct/StateMachine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1645,7 +1645,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1713,19 +1713,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1778,13 +1778,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionFailedAlarm": { @@ -1817,13 +1817,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionThrottledAlarm": { @@ -1856,13 +1856,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionAbortedAlarm": { @@ -1895,19 +1895,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-stepfunctions.FargateToStepfunctions", - "version": "2.58.1" + "version": "2.60.0" } }, "farstp-new-resources-STEP_FUNCTIONS-security-group": { @@ -1963,13 +1963,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1997,7 +1997,7 @@ "path": "farstp-new-resources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2005,25 +2005,25 @@ "path": "farstp-new-resources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2031,7 +2031,7 @@ "path": "farstp-new-resources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2039,13 +2039,13 @@ "path": "farstp-new-resources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -2059,7 +2059,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/farstp-no-cloudwatch-alarms.assets.json b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/farstp-no-cloudwatch-alarms.assets.json index 4aa65e348..2761a6afa 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/farstp-no-cloudwatch-alarms.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/farstp-no-cloudwatch-alarms.assets.json @@ -15,7 +15,7 @@ } } }, - "e6ddf304acfa54b9d6093699c3dc1d6b464adef3166586d9688032b31e96e481": { + "fb3f1886eb9e229bfe24970ff561da5bef8c279866d0430f4cb6f3cb1e56c473": { "source": { "path": "farstp-no-cloudwatch-alarms.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "e6ddf304acfa54b9d6093699c3dc1d6b464adef3166586d9688032b31e96e481.json", + "objectKey": "fb3f1886eb9e229bfe24970ff561da5bef8c279866d0430f4cb6f3cb1e56c473.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/farstp-no-cloudwatch-alarms.template.json b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/farstp-no-cloudwatch-alarms.template.json index 3533d1bb3..dcebaafdf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/farstp-no-cloudwatch-alarms.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/farstp-no-cloudwatch-alarms.template.json @@ -742,7 +742,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/manifest.json index 374dbf563..ddb45372d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/e6ddf304acfa54b9d6093699c3dc1d6b464adef3166586d9688032b31e96e481.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/fb3f1886eb9e229bfe24970ff561da5bef8c279866d0430f4cb6f3cb1e56c473.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/tree.json index a2962ad65..4b115c665 100644 --- a/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-fargate-stepfunctions/test/integ.farstp-no-cloudwatch-alarms.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "farstp-no-cloudwatch-alarms/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "farstp-no-cloudwatch-alarms/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "farstp-no-cloudwatch-alarms/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "farstp-no-cloudwatch-alarms/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "farstp-no-cloudwatch-alarms/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "farstp-no-cloudwatch-alarms/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_API": { @@ -880,13 +880,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "ECR_DKR": { @@ -925,13 +925,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "S3": { @@ -978,13 +978,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } }, "STEP_FUNCTIONS": { @@ -1023,19 +1023,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1047,7 +1047,7 @@ "path": "farstp-no-cloudwatch-alarms/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1055,7 +1055,7 @@ "path": "farstp-no-cloudwatch-alarms/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1063,13 +1063,13 @@ "path": "farstp-no-cloudwatch-alarms/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "farstp-no-cloudwatch-alarms-ECR_API-security-group": { @@ -1125,13 +1125,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "farstp-no-cloudwatch-alarms-ECR_DKR-security-group": { @@ -1187,13 +1187,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-cluster": { @@ -1209,13 +1209,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnCluster", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.Cluster", - "version": "2.143.0" + "version": "2.147.3" } }, "test-taskdef": { @@ -1231,7 +1231,7 @@ "path": "farstp-no-cloudwatch-alarms/test-taskdef/TaskRole/ImportTaskRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1256,7 +1256,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1291,19 +1291,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1351,7 +1351,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-container": { @@ -1359,13 +1359,13 @@ "path": "farstp-no-cloudwatch-alarms/test-taskdef/test-container", "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition", - "version": "2.143.0" + "version": "2.147.3" } }, "test-sg": { @@ -1393,13 +1393,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "test-service": { @@ -1451,13 +1451,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.CfnService", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ecs.FargateService", - "version": "2.143.0" + "version": "2.147.3" } }, "lambdafarstp-test": { @@ -1473,7 +1473,7 @@ "path": "farstp-no-cloudwatch-alarms/lambdafarstp-test/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1512,13 +1512,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1542,13 +1542,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "taskfarstp-test": { @@ -1556,7 +1556,7 @@ "path": "farstp-no-cloudwatch-alarms/taskfarstp-test", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.143.0" + "version": "2.147.3" } }, "test-construct": { @@ -1598,13 +1598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "StateMachine": { @@ -1620,7 +1620,7 @@ "path": "farstp-no-cloudwatch-alarms/test-construct/StateMachine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1645,7 +1645,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1713,19 +1713,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1778,19 +1778,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-fargate-stepfunctions.FargateToStepfunctions", - "version": "2.58.1" + "version": "2.60.0" } }, "farstp-no-cloudwatch-alarms-STEP_FUNCTIONS-security-group": { @@ -1846,13 +1846,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1880,7 +1880,7 @@ "path": "farstp-no-cloudwatch-alarms/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1888,25 +1888,25 @@ "path": "farstp-no-cloudwatch-alarms/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1914,7 +1914,7 @@ "path": "farstp-no-cloudwatch-alarms/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1922,13 +1922,13 @@ "path": "farstp-no-cloudwatch-alarms/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1942,7 +1942,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/iotfhss3-customLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/iotfhss3-customLoggingBucket.assets.json index 4bf5bb3b2..d7e801d02 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/iotfhss3-customLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/iotfhss3-customLoggingBucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "e14c215fbf457faf957ac533bddc8b559eabe544eb471c5380a0bcf85958ce2d": { + "2f13d204b83017229e947227154acef9c4ea3d12c3cee5f92fea05a03e7857a2": { "source": { "path": "iotfhss3-customLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e14c215fbf457faf957ac533bddc8b559eabe544eb471c5380a0bcf85958ce2d.json", + "objectKey": "2f13d204b83017229e947227154acef9c4ea3d12c3cee5f92fea05a03e7857a2.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/iotfhss3-customLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/iotfhss3-customLoggingBucket.template.json index ab9cd29ad..e2e16c7df 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/iotfhss3-customLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/iotfhss3-customLoggingBucket.template.json @@ -569,7 +569,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -580,7 +580,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -617,6 +625,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/manifest.json index 468c64692..2cd8a38b5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/manifest.json @@ -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}/e14c215fbf457faf957ac533bddc8b559eabe544eb471c5380a0bcf85958ce2d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2f13d204b83017229e947227154acef9c4ea3d12c3cee5f92fea05a03e7857a2.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -160,6 +160,12 @@ "data": "testiotkinesisfirehoses3IotTopic4CCBBBDC" } ], + "/iotfhss3-customLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/iotfhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/tree.json index 4d7ef2e83..8b6efaffd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-customLoggingBucket.js.snapshot/tree.json @@ -67,7 +67,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -201,13 +201,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -219,19 +219,19 @@ "path": "iotfhss3-customLoggingBucket/test-iot-kinesisfirehose-s3/KinesisFirehoseToS3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -284,7 +284,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -343,19 +343,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -371,7 +371,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -391,19 +391,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -415,7 +415,7 @@ "path": "iotfhss3-customLoggingBucket/test-iot-kinesisfirehose-s3/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -440,13 +440,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -538,13 +538,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -613,13 +613,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -627,7 +627,7 @@ "path": "iotfhss3-customLoggingBucket/test-iot-kinesisfirehose-s3/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "IotActionsRole": { @@ -639,7 +639,7 @@ "path": "iotfhss3-customLoggingBucket/test-iot-kinesisfirehose-s3/IotActionsRole/ImportIotActionsRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -664,13 +664,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IotActionsPolicy": { @@ -708,13 +708,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "IotTopic": { @@ -747,13 +747,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-kinesisfirehose-s3.IotToKinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "iotfhss3-customLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -765,7 +773,7 @@ "path": "iotfhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -773,7 +781,7 @@ "path": "iotfhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -781,13 +789,13 @@ "path": "iotfhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -803,7 +811,7 @@ "path": "iotfhss3-customLoggingBucket/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -815,7 +823,7 @@ "path": "iotfhss3-customLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -823,25 +831,25 @@ "path": "iotfhss3-customLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -849,7 +857,7 @@ "path": "iotfhss3-customLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -857,13 +865,13 @@ "path": "iotfhss3-customLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -871,13 +879,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/iotfhss3-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/iotfhss3-no-arguments.assets.json index 712c36faf..33581a262 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/iotfhss3-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/iotfhss3-no-arguments.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "25012696253bb9209060cf3ea17359b028f56d82bc589e9a0e41870de7c221b2": { + "c58bc61400a122c973b03bbb4cd016673f5da7e12943d34e04383c2534d530b4": { "source": { "path": "iotfhss3-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "25012696253bb9209060cf3ea17359b028f56d82bc589e9a0e41870de7c221b2.json", + "objectKey": "c58bc61400a122c973b03bbb4cd016673f5da7e12943d34e04383c2534d530b4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/iotfhss3-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/iotfhss3-no-arguments.template.json index abf6e6752..4ab0986e1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/iotfhss3-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/iotfhss3-no-arguments.template.json @@ -621,7 +621,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -632,7 +632,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -669,6 +677,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/manifest.json index 4c947fa61..b66d3fc20 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/manifest.json @@ -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}/25012696253bb9209060cf3ea17359b028f56d82bc589e9a0e41870de7c221b2.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c58bc61400a122c973b03bbb4cd016673f5da7e12943d34e04383c2534d530b4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -166,6 +166,12 @@ "data": "testiotfirehoses3IotTopicAC1CA58D" } ], + "/iotfhss3-no-arguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/iotfhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/tree.json index fcb7742b0..b96cfa2eb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-no-arguments.js.snapshot/tree.json @@ -54,7 +54,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -188,13 +188,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -206,19 +206,19 @@ "path": "iotfhss3-no-arguments/test-iot-firehose-s3/KinesisFirehoseToS3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -277,7 +277,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -375,13 +375,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -393,19 +393,19 @@ "path": "iotfhss3-no-arguments/test-iot-firehose-s3/KinesisFirehoseToS3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -421,7 +421,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -441,19 +441,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -465,7 +465,7 @@ "path": "iotfhss3-no-arguments/test-iot-firehose-s3/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -490,13 +490,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -588,13 +588,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -663,13 +663,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -677,7 +677,7 @@ "path": "iotfhss3-no-arguments/test-iot-firehose-s3/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "IotActionsRole": { @@ -689,7 +689,7 @@ "path": "iotfhss3-no-arguments/test-iot-firehose-s3/IotActionsRole/ImportIotActionsRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -714,13 +714,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IotActionsPolicy": { @@ -758,13 +758,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "IotTopic": { @@ -797,13 +797,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-kinesisfirehose-s3.IotToKinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "iotfhss3-no-arguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -815,7 +823,7 @@ "path": "iotfhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -823,7 +831,7 @@ "path": "iotfhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -831,13 +839,13 @@ "path": "iotfhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -853,7 +861,7 @@ "path": "iotfhss3-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -865,7 +873,7 @@ "path": "iotfhss3-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -873,25 +881,25 @@ "path": "iotfhss3-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -899,7 +907,7 @@ "path": "iotfhss3-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -907,13 +915,13 @@ "path": "iotfhss3-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -921,13 +929,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/iotfhss3-noLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/iotfhss3-noLoggingBucket.assets.json index 072800459..e1bcd4727 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/iotfhss3-noLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/iotfhss3-noLoggingBucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "186e4bb820be742040d033d933c2c82d7bf19ce246bac2094d58ab237c34f010": { + "1f6f70672bb86c04840256190e1b7b5f8a0092fa5a1d1de4614f8f1448914d94": { "source": { "path": "iotfhss3-noLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "186e4bb820be742040d033d933c2c82d7bf19ce246bac2094d58ab237c34f010.json", + "objectKey": "1f6f70672bb86c04840256190e1b7b5f8a0092fa5a1d1de4614f8f1448914d94.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/iotfhss3-noLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/iotfhss3-noLoggingBucket.template.json index 02432e23d..b35a94116 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/iotfhss3-noLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/iotfhss3-noLoggingBucket.template.json @@ -443,7 +443,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -454,7 +454,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -491,6 +499,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/manifest.json index db71e93dd..d36e5be5e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/manifest.json @@ -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}/186e4bb820be742040d033d933c2c82d7bf19ce246bac2094d58ab237c34f010.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f6f70672bb86c04840256190e1b7b5f8a0092fa5a1d1de4614f8f1448914d94.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -148,6 +148,12 @@ "data": "testiotkinesisfirehoses3IotTopic4CCBBBDC" } ], + "/iotfhss3-noLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/iotfhss3-noLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/tree.json index b001b9d19..26736161d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-kinesisfirehose-s3/test/integ.iotfhss3-noLoggingBucket.js.snapshot/tree.json @@ -67,7 +67,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -165,13 +165,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -183,19 +183,19 @@ "path": "iotfhss3-noLoggingBucket/test-iot-kinesisfirehose-s3/KinesisFirehoseToS3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -211,7 +211,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -231,19 +231,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -255,7 +255,7 @@ "path": "iotfhss3-noLoggingBucket/test-iot-kinesisfirehose-s3/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -280,13 +280,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -378,13 +378,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -453,13 +453,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -467,7 +467,7 @@ "path": "iotfhss3-noLoggingBucket/test-iot-kinesisfirehose-s3/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "IotActionsRole": { @@ -479,7 +479,7 @@ "path": "iotfhss3-noLoggingBucket/test-iot-kinesisfirehose-s3/IotActionsRole/ImportIotActionsRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -504,13 +504,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IotActionsPolicy": { @@ -548,13 +548,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "IotTopic": { @@ -587,13 +587,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-kinesisfirehose-s3.IotToKinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "iotfhss3-noLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -605,7 +613,7 @@ "path": "iotfhss3-noLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -613,7 +621,7 @@ "path": "iotfhss3-noLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -621,13 +629,13 @@ "path": "iotfhss3-noLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -643,7 +651,7 @@ "path": "iotfhss3-noLoggingBucket/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -655,7 +663,7 @@ "path": "iotfhss3-noLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -663,25 +671,25 @@ "path": "iotfhss3-noLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -689,7 +697,7 @@ "path": "iotfhss3-noLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -697,13 +705,13 @@ "path": "iotfhss3-noLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -711,13 +719,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/iotlamddb-iot-lambda-dynamodb.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/iotlamddb-iot-lambda-dynamodb.assets.json index d9aabb17c..a3a7ad41a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/iotlamddb-iot-lambda-dynamodb.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/iotlamddb-iot-lambda-dynamodb.assets.json @@ -14,7 +14,7 @@ } } }, - "b63e164fc0ad23ec3d78c5a3b2969e294f2a7cf690a59b1e28fbb0c1addcfaf0": { + "6c63a1103f1d0a44827cd11171a3254d7aac6c9b0288906631b9d2ba63bcf1d9": { "source": { "path": "iotlamddb-iot-lambda-dynamodb.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b63e164fc0ad23ec3d78c5a3b2969e294f2a7cf690a59b1e28fbb0c1addcfaf0.json", + "objectKey": "6c63a1103f1d0a44827cd11171a3254d7aac6c9b0288906631b9d2ba63bcf1d9.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/iotlamddb-iot-lambda-dynamodb.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/iotlamddb-iot-lambda-dynamodb.template.json index 1b45f9b1a..559064681 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/iotlamddb-iot-lambda-dynamodb.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/iotlamddb-iot-lambda-dynamodb.template.json @@ -141,7 +141,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/manifest.json index 0525d11e3..c1f165c2d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/manifest.json @@ -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}/b63e164fc0ad23ec3d78c5a3b2969e294f2a7cf690a59b1e28fbb0c1addcfaf0.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6c63a1103f1d0a44827cd11171a3254d7aac6c9b0288906631b9d2ba63bcf1d9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/tree.json index d98de34bf..31f47daa2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.js.snapshot/tree.json @@ -25,7 +25,7 @@ "path": "iotlamddb-iot-lambda-dynamodb/test-iot-lambda-dynamodb-stack/LambdaToDynamoDB/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -88,7 +88,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -152,19 +152,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -180,7 +180,7 @@ "path": "iotlamddb-iot-lambda-dynamodb/test-iot-lambda-dynamodb-stack/LambdaToDynamoDB/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -188,13 +188,13 @@ "path": "iotlamddb-iot-lambda-dynamodb/test-iot-lambda-dynamodb-stack/LambdaToDynamoDB/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -224,7 +224,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -232,7 +232,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "AwsIotLambdaInvokePermission-1": { @@ -259,13 +259,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "DynamoTable": { @@ -301,7 +301,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.118.0" + "version": "2.145.0" } }, "ScalingRole": { @@ -309,19 +309,19 @@ "path": "iotlamddb-iot-lambda-dynamodb/test-iot-lambda-dynamodb-stack/LambdaToDynamoDB/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-dynamodb.LambdaToDynamoDB", - "version": "2.50.0" + "version": "2.60.0" } }, "IotToLambda": { @@ -355,19 +355,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-lambda.IotToLambda", - "version": "2.50.0" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-lambda-dynamodb.IotToLambdaToDynamoDB", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -383,7 +383,7 @@ "path": "iotlamddb-iot-lambda-dynamodb/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -395,7 +395,7 @@ "path": "iotlamddb-iot-lambda-dynamodb/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -403,25 +403,25 @@ "path": "iotlamddb-iot-lambda-dynamodb/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -429,7 +429,7 @@ "path": "iotlamddb-iot-lambda-dynamodb/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -437,13 +437,13 @@ "path": "iotlamddb-iot-lambda-dynamodb/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -451,13 +451,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.ts b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.ts index debcc9562..adb29f398 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.ts +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-iot-lambda-dynamodb.ts @@ -17,6 +17,7 @@ import { IotToLambdaToDynamoDB, IotToLambdaToDynamoDBProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -24,7 +25,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const props: IotToLambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, iotTopicRuleProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/iotlamddb-with-vpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/iotlamddb-with-vpc.assets.json index 85680a268..244bccbb7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/iotlamddb-with-vpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/iotlamddb-with-vpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "08c0ee8d67f97a0a4958f0448fc69818357399cf74f87dfd65aeeab124054eb7": { + "0ece976f9ef5b98c2958e184e00bcecb112be3f6ad73c4e5e0d647a0e886be07": { "source": { "path": "iotlamddb-with-vpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "08c0ee8d67f97a0a4958f0448fc69818357399cf74f87dfd65aeeab124054eb7.json", + "objectKey": "0ece976f9ef5b98c2958e184e00bcecb112be3f6ad73c4e5e0d647a0e886be07.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/iotlamddb-with-vpc.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/iotlamddb-with-vpc.template.json index d6e791995..12248f051 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/iotlamddb-with-vpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/iotlamddb-with-vpc.template.json @@ -176,7 +176,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -664,7 +664,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -675,7 +675,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -701,6 +709,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/manifest.json index d0a44ef19..ab1918c3f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/manifest.json @@ -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}/08c0ee8d67f97a0a4958f0448fc69818357399cf74f87dfd65aeeab124054eb7.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0ece976f9ef5b98c2958e184e00bcecb112be3f6ad73c4e5e0d647a0e886be07.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -202,6 +202,12 @@ "data": "testiotlambdadynamodbstackIotToLambdaIotTopic74F5E3BB" } ], + "/iotlamddb-with-vpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/iotlamddb-with-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/tree.json index 9ad79ed68..bb31aed0a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.js.snapshot/tree.json @@ -25,7 +25,7 @@ "path": "iotlamddb-with-vpc/test-iot-lambda-dynamodb-stack/LambdaToDynamoDB/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -88,7 +88,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -157,19 +157,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -197,13 +197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -219,7 +219,7 @@ "path": "iotlamddb-with-vpc/test-iot-lambda-dynamodb-stack/LambdaToDynamoDB/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -227,13 +227,13 @@ "path": "iotlamddb-with-vpc/test-iot-lambda-dynamodb-stack/LambdaToDynamoDB/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -263,7 +263,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -289,7 +289,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } }, "AwsIotLambdaInvokePermission-1": { @@ -316,13 +316,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "DynamoTable": { @@ -358,7 +358,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.118.0" + "version": "2.147.3" } }, "ScalingRole": { @@ -366,19 +366,19 @@ "path": "iotlamddb-with-vpc/test-iot-lambda-dynamodb-stack/LambdaToDynamoDB/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-dynamodb.LambdaToDynamoDB", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -405,7 +405,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -449,7 +449,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -457,7 +457,7 @@ "path": "iotlamddb-with-vpc/test-iot-lambda-dynamodb-stack/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -479,7 +479,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -498,13 +498,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -548,7 +548,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -556,7 +556,7 @@ "path": "iotlamddb-with-vpc/test-iot-lambda-dynamodb-stack/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -597,13 +597,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -615,13 +615,13 @@ "path": "iotlamddb-with-vpc/test-iot-lambda-dynamodb-stack/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -637,7 +637,7 @@ "path": "iotlamddb-with-vpc/test-iot-lambda-dynamodb-stack/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -668,7 +668,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -720,19 +720,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -756,13 +756,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -796,13 +796,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "DDB": { @@ -843,19 +843,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "IotToLambda": { @@ -889,19 +889,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-lambda.IotToLambda", - "version": "2.51.0" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-lambda-dynamodb.IotToLambdaToDynamoDB", - "version": "2.51.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "iotlamddb-with-vpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -913,7 +921,7 @@ "path": "iotlamddb-with-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -921,7 +929,7 @@ "path": "iotlamddb-with-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -929,13 +937,13 @@ "path": "iotlamddb-with-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -963,7 +971,7 @@ "path": "iotlamddb-with-vpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -971,25 +979,25 @@ "path": "iotlamddb-with-vpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -997,7 +1005,7 @@ "path": "iotlamddb-with-vpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1005,13 +1013,13 @@ "path": "iotlamddb-with-vpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1025,7 +1033,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.ts b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.ts index 03199e62f..4efda3945 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/integ.iotlamddb-with-vpc.ts @@ -17,6 +17,7 @@ import { IotToLambdaToDynamoDB, IotToLambdaToDynamoDBProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -24,7 +25,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const props: IotToLambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, iotTopicRuleProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/iot-lambda-dynamodb.test.ts b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/iot-lambda-dynamodb.test.ts index e571342db..33fa2f609 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/iot-lambda-dynamodb.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda-dynamodb/test/iot-lambda-dynamodb.test.ts @@ -16,12 +16,13 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as ec2 from 'aws-cdk-lib/aws-ec2'; import * as cdk from "aws-cdk-lib"; import { Template } from 'aws-cdk-lib/assertions'; +import * as defaults from '@aws-solutions-constructs/core'; function deployStack(stack: cdk.Stack) { const props: IotToLambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, iotTopicRuleProps: { @@ -51,7 +52,7 @@ test('check lambda function properties', () => { "Arn" ] }, - Runtime: "nodejs16.x", + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1", @@ -260,7 +261,7 @@ test('check properties', () => { deployVpc: true, lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, iotTopicRuleProps: { @@ -308,7 +309,7 @@ test('Check incorrect table permission', () => { const props: IotToLambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, iotTopicRuleProps: { @@ -335,7 +336,7 @@ test('check lambda function custom environment variable', () => { const props: IotToLambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, tableEnvironmentVariableName: 'CUSTOM_DYNAMODB_TABLE', @@ -354,7 +355,7 @@ test('check lambda function custom environment variable', () => { const template = Template.fromStack(stack); template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', @@ -372,7 +373,7 @@ test("Test minimal deployment that deploys a VPC without vpcProps", () => { // Helper declaration new IotToLambdaToDynamoDB(stack, "lambda-to-dynamodb-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -428,7 +429,7 @@ test("Test minimal deployment that deploys a VPC w/vpcProps", () => { // Helper declaration new IotToLambdaToDynamoDB(stack, "lambda-to-dynamodb-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -493,7 +494,7 @@ test("Test minimal deployment with an existing VPC", () => { // Helper declaration new IotToLambdaToDynamoDB(stack, "lambda-to-dynamodb-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -542,7 +543,7 @@ test("Test minimal deployment with an existing VPC and existing Lambda function // buildLambdaFunction should throw an error if the Lambda function is not // attached to a VPC const testLambdaFunction = new lambda.Function(stack, 'test-lambda', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -581,7 +582,7 @@ test("Confirm CheckVpcProps is called", () => { // Helper declaration new IotToLambdaToDynamoDB(stack, "lambda-to-dynamodb-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -604,7 +605,7 @@ test("Confirm CheckVpcProps is called", () => { test('Confirm CheckLambdaProps is being called', () => { const stack = new cdk.Stack(); const existingLambdaObj = new lambda.Function(stack, 'ExistingLambda', { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -620,7 +621,7 @@ test('Confirm CheckLambdaProps is being called', () => { }, existingLambdaObj, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), } @@ -651,7 +652,7 @@ test('Confirm CheckLambdaProps is being called', () => { // const props: IotToLambdaToDynamoDBProps = { // lambdaFunctionProps: { // code: lambda.Code.fromAsset(`${__dirname}/lambda`), -// runtime: lambda.Runtime.NODEJS_16_X, +// runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, // handler: 'index.handler' // }, // iotTopicRuleProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/iotlam-iot-lambda-new-func.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/iotlam-iot-lambda-new-func.assets.json index c3e0e50f4..bbfaffc96 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/iotlam-iot-lambda-new-func.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/iotlam-iot-lambda-new-func.assets.json @@ -14,7 +14,7 @@ } } }, - "c2ccba8d5d7c1b78661a5a4761700d13f861b43a8b7500cd38e29245cf17c67c": { + "8e6bdfacab0ad6d3d9de1859e9bcedcf101a09b76d6c7f0ae7be36583f6d6038": { "source": { "path": "iotlam-iot-lambda-new-func.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c2ccba8d5d7c1b78661a5a4761700d13f861b43a8b7500cd38e29245cf17c67c.json", + "objectKey": "8e6bdfacab0ad6d3d9de1859e9bcedcf101a09b76d6c7f0ae7be36583f6d6038.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/iotlam-iot-lambda-new-func.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/iotlam-iot-lambda-new-func.template.json index 361442e14..3763e14d4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/iotlam-iot-lambda-new-func.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/iotlam-iot-lambda-new-func.template.json @@ -110,7 +110,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/manifest.json index 897e30df7..3414f6568 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/manifest.json @@ -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}/c2ccba8d5d7c1b78661a5a4761700d13f861b43a8b7500cd38e29245cf17c67c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8e6bdfacab0ad6d3d9de1859e9bcedcf101a09b76d6c7f0ae7be36583f6d6038.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/tree.json index 8e57c3f20..4236b0207 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -120,19 +120,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -148,7 +148,7 @@ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -156,13 +156,13 @@ "path": "iotlam-iot-lambda-new-func/test-iot-lambda-integration/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -189,7 +189,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -197,7 +197,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "AwsIotLambdaInvokePermission-1": { @@ -224,13 +224,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "IotTopic": { @@ -260,13 +260,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-lambda.IotToLambda", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -282,7 +282,7 @@ "path": "iotlam-iot-lambda-new-func/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -294,7 +294,7 @@ "path": "iotlam-iot-lambda-new-func/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -302,25 +302,25 @@ "path": "iotlam-iot-lambda-new-func/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -328,7 +328,7 @@ "path": "iotlam-iot-lambda-new-func/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -336,13 +336,13 @@ "path": "iotlam-iot-lambda-new-func/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -350,13 +350,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.ts b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.ts index 422845a55..7db471a2c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.ts +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-new-func.ts @@ -17,6 +17,7 @@ import { IotToLambda, IotToLambdaProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -24,7 +25,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const props: IotToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, iotTopicRuleProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/iotlam-iot-lambda-use-existing-func.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/iotlam-iot-lambda-use-existing-func.assets.json index 70e6f84bd..c1748a245 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/iotlam-iot-lambda-use-existing-func.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/iotlam-iot-lambda-use-existing-func.assets.json @@ -14,7 +14,7 @@ } } }, - "e0806d10dfdd849d6edcdfdc5a48cfdd40714fc22c8533168993623c4fbcd551": { + "d00dd6fcb27106248374c1ce429a1cc3d1dfb2051524468230c4791c041ce447": { "source": { "path": "iotlam-iot-lambda-use-existing-func.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e0806d10dfdd849d6edcdfdc5a48cfdd40714fc22c8533168993623c4fbcd551.json", + "objectKey": "d00dd6fcb27106248374c1ce429a1cc3d1dfb2051524468230c4791c041ce447.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/iotlam-iot-lambda-use-existing-func.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/iotlam-iot-lambda-use-existing-func.template.json index 22c3016aa..ea62bae73 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/iotlam-iot-lambda-use-existing-func.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/iotlam-iot-lambda-use-existing-func.template.json @@ -110,7 +110,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/manifest.json index f137c4f11..80890b738 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/manifest.json @@ -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}/e0806d10dfdd849d6edcdfdc5a48cfdd40714fc22c8533168993623c4fbcd551.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d00dd6fcb27106248374c1ce429a1cc3d1dfb2051524468230c4791c041ce447.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/tree.json index ab841d224..226049753 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "iotlam-iot-lambda-use-existing-func/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -116,19 +116,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -144,7 +144,7 @@ "path": "iotlam-iot-lambda-use-existing-func/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -152,13 +152,13 @@ "path": "iotlam-iot-lambda-use-existing-func/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -185,7 +185,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -193,7 +193,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "AwsIotLambdaInvokePermission-1": { @@ -220,13 +220,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "test-iot-lambda-integration": { @@ -260,13 +260,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-lambda.IotToLambda", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -282,7 +282,7 @@ "path": "iotlam-iot-lambda-use-existing-func/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -294,7 +294,7 @@ "path": "iotlam-iot-lambda-use-existing-func/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -302,25 +302,25 @@ "path": "iotlam-iot-lambda-use-existing-func/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -328,7 +328,7 @@ "path": "iotlam-iot-lambda-use-existing-func/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -336,13 +336,13 @@ "path": "iotlam-iot-lambda-use-existing-func/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -350,13 +350,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.ts b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.ts index a1ba159a9..3a50a3762 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.ts +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/integ.iotlam-iot-lambda-use-existing-func.ts @@ -24,7 +24,7 @@ const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/iot-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/iot-lambda.test.ts index 05a6e84c6..904fbdaaf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/iot-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-iot-lambda/test/iot-lambda.test.ts @@ -15,12 +15,13 @@ import { IotToLambda, IotToLambdaProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as cdk from "aws-cdk-lib"; import { Template } from 'aws-cdk-lib/assertions'; +import * as defaults from '@aws-solutions-constructs/core'; function deployNewFunc(stack: cdk.Stack) { const props: IotToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, iotTopicRuleProps: { @@ -73,7 +74,7 @@ test('check lambda function properties for deploy: true', () => { "Arn" ] }, - Runtime: "nodejs16.x" + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING }); }); @@ -321,7 +322,7 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new cdk.Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -336,7 +337,7 @@ test('Confirm call to CheckLambdaProps', () => { } }, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/iots3-iot-s3-defaultprops.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/iots3-iot-s3-defaultprops.assets.json index d639de7c9..04a436381 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/iots3-iot-s3-defaultprops.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/iots3-iot-s3-defaultprops.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "e3c205c1db5df36fd2aee84db2c4e5cd47fd160168a20d419cd00fa201d9cce1": { + "3d6e21d82cf3bf0a33c27f01c6321e275aea93d66f49ad58469319c075dbc957": { "source": { "path": "iots3-iot-s3-defaultprops.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e3c205c1db5df36fd2aee84db2c4e5cd47fd160168a20d419cd00fa201d9cce1.json", + "objectKey": "3d6e21d82cf3bf0a33c27f01c6321e275aea93d66f49ad58469319c075dbc957.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/iots3-iot-s3-defaultprops.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/iots3-iot-s3-defaultprops.template.json index 0fa399ea7..9464e58a9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/iots3-iot-s3-defaultprops.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/iots3-iot-s3-defaultprops.template.json @@ -394,7 +394,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -405,7 +405,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -442,6 +450,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/manifest.json index 4e687732c..c2fc7c742 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/manifest.json @@ -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}/e3c205c1db5df36fd2aee84db2c4e5cd47fd160168a20d419cd00fa201d9cce1.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3d6e21d82cf3bf0a33c27f01c6321e275aea93d66f49ad58469319c075dbc957.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -130,6 +130,12 @@ "data": "testiots3integrationIotTopicRule0C8409CE" } ], + "/iots3-iot-s3-defaultprops/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/iots3-iot-s3-defaultprops/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/tree.json index 398cbfc1f..b1c7a1da1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-defaultprops.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "iots3-iot-s3-defaultprops/test-iot-s3-integration/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -267,7 +267,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -326,19 +326,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "iot-actions-role": { @@ -350,7 +350,7 @@ "path": "iots3-iot-s3-defaultprops/test-iot-s3-integration/iot-actions-role/Importiot-actions-role", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -375,7 +375,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -437,19 +437,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IotTopicRule": { @@ -483,13 +483,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-s3.IotToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "iots3-iot-s3-defaultprops/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -501,7 +509,7 @@ "path": "iots3-iot-s3-defaultprops/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -509,7 +517,7 @@ "path": "iots3-iot-s3-defaultprops/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -517,13 +525,13 @@ "path": "iots3-iot-s3-defaultprops/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -539,7 +547,7 @@ "path": "iots3-iot-s3-defaultprops/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -551,7 +559,7 @@ "path": "iots3-iot-s3-defaultprops/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -559,25 +567,25 @@ "path": "iots3-iot-s3-defaultprops/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -585,7 +593,7 @@ "path": "iots3-iot-s3-defaultprops/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -593,13 +601,13 @@ "path": "iots3-iot-s3-defaultprops/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -607,13 +615,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/iots3-iot-s3-existing-bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/iots3-iot-s3-existing-bucket.assets.json index e114f0904..0ba7d2e9f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/iots3-iot-s3-existing-bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/iots3-iot-s3-existing-bucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "85e42ff8fd152e6d3c9797cf632e611d4be94ed167374b2a85e75d28f3a55e35": { + "0a6983faba15ab74de5e48d48cabb05ab2653d86c0f909f3fb19316c7777142c": { "source": { "path": "iots3-iot-s3-existing-bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "85e42ff8fd152e6d3c9797cf632e611d4be94ed167374b2a85e75d28f3a55e35.json", + "objectKey": "0a6983faba15ab74de5e48d48cabb05ab2653d86c0f909f3fb19316c7777142c.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/iots3-iot-s3-existing-bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/iots3-iot-s3-existing-bucket.template.json index 1049f9d81..fa48e9d5a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/iots3-iot-s3-existing-bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/iots3-iot-s3-existing-bucket.template.json @@ -205,7 +205,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -216,7 +216,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -481,6 +489,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/manifest.json index 1d7cc70c8..5ebb6cc2f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/manifest.json @@ -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}/85e42ff8fd152e6d3c9797cf632e611d4be94ed167374b2a85e75d28f3a55e35.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0a6983faba15ab74de5e48d48cabb05ab2653d86c0f909f3fb19316c7777142c.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/iots3-iot-s3-existing-bucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/iots3-iot-s3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/tree.json index 5ef69c753..2a6f86f7e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-existing-bucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "iots3-iot-s3-existing-bucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "iots3-iot-s3-existing-bucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "iots3-iot-s3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "iots3-iot-s3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "iots3-iot-s3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -376,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -394,19 +402,19 @@ "path": "iots3-iot-s3-existing-bucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "test-iot-s3-integration": { @@ -422,7 +430,7 @@ "path": "iots3-iot-s3-existing-bucket/test-iot-s3-integration/iot-actions-role/Importiot-actions-role", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -447,7 +455,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -509,19 +517,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IotTopicRule": { @@ -555,13 +563,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-s3.IotToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -577,7 +585,7 @@ "path": "iots3-iot-s3-existing-bucket/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -589,7 +597,7 @@ "path": "iots3-iot-s3-existing-bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -597,25 +605,25 @@ "path": "iots3-iot-s3-existing-bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -623,7 +631,7 @@ "path": "iots3-iot-s3-existing-bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -631,13 +639,13 @@ "path": "iots3-iot-s3-existing-bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -645,13 +653,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/iots3-iot-s3-new-encrypted-bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/iots3-iot-s3-new-encrypted-bucket.assets.json index 96275e3b8..8987061c0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/iots3-iot-s3-new-encrypted-bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/iots3-iot-s3-new-encrypted-bucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "db680a662e1f173574e4bbfc78c4eabbaa903fd878dc4501b64829d811695e40": { + "8beaf9277876de4eda7923eaf0ed4140f507db5aba9670caa585f0a7819c68ff": { "source": { "path": "iots3-iot-s3-new-encrypted-bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "db680a662e1f173574e4bbfc78c4eabbaa903fd878dc4501b64829d811695e40.json", + "objectKey": "8beaf9277876de4eda7923eaf0ed4140f507db5aba9670caa585f0a7819c68ff.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/iots3-iot-s3-new-encrypted-bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/iots3-iot-s3-new-encrypted-bucket.template.json index 22553a9d6..f1175d84d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/iots3-iot-s3-new-encrypted-bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/iots3-iot-s3-new-encrypted-bucket.template.json @@ -451,7 +451,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -462,7 +462,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -499,6 +507,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/manifest.json index 97d448576..18fce15e1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/manifest.json @@ -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}/db680a662e1f173574e4bbfc78c4eabbaa903fd878dc4501b64829d811695e40.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8beaf9277876de4eda7923eaf0ed4140f507db5aba9670caa585f0a7819c68ff.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -136,6 +136,12 @@ "data": "testiots3integrationIotTopicRule0C8409CE" } ], + "/iots3-iot-s3-new-encrypted-bucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/iots3-iot-s3-new-encrypted-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/tree.json index d58af1baf..dce3c1278 100644 --- a/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-iot-s3/test/integ.iots3-iot-s3-new-encrypted-bucket.js.snapshot/tree.json @@ -51,13 +51,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.118.0" + "version": "2.147.3" } }, "test-iot-s3-integration": { @@ -102,7 +102,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -236,13 +236,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -254,19 +254,19 @@ "path": "iots3-iot-s3-new-encrypted-bucket/test-iot-s3-integration/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -325,7 +325,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -384,19 +384,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "iot-actions-role": { @@ -408,7 +408,7 @@ "path": "iots3-iot-s3-new-encrypted-bucket/test-iot-s3-integration/iot-actions-role/Importiot-actions-role", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -433,7 +433,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -510,19 +510,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IotTopicRule": { @@ -556,13 +556,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iot.CfnTopicRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-iot-s3.IotToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "iots3-iot-s3-new-encrypted-bucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -574,7 +582,7 @@ "path": "iots3-iot-s3-new-encrypted-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -582,7 +590,7 @@ "path": "iots3-iot-s3-new-encrypted-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -590,13 +598,13 @@ "path": "iots3-iot-s3-new-encrypted-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -612,7 +620,7 @@ "path": "iots3-iot-s3-new-encrypted-bucket/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -624,7 +632,7 @@ "path": "iots3-iot-s3-new-encrypted-bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -632,25 +640,25 @@ "path": "iots3-iot-s3-new-encrypted-bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -658,7 +666,7 @@ "path": "iots3-iot-s3-new-encrypted-bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -666,13 +674,13 @@ "path": "iots3-iot-s3-new-encrypted-bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -680,13 +688,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/fhss3-customLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/fhss3-customLoggingBucket.assets.json index 8a1238f0d..908199b2f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/fhss3-customLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/fhss3-customLoggingBucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "c8dfb17d574f9386e7bbf49cad0458431f6b81524a2406f5ffcc981f7d7deb68": { + "bac73fabd4aa76efb4fb2d93e82cb64e20efdc85b26d74379de8c004a26dbddb": { "source": { "path": "fhss3-customLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c8dfb17d574f9386e7bbf49cad0458431f6b81524a2406f5ffcc981f7d7deb68.json", + "objectKey": "bac73fabd4aa76efb4fb2d93e82cb64e20efdc85b26d74379de8c004a26dbddb.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/fhss3-customLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/fhss3-customLoggingBucket.template.json index 230fd73d1..56e39a159 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/fhss3-customLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/fhss3-customLoggingBucket.template.json @@ -501,7 +501,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -512,7 +512,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -549,6 +557,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/manifest.json index 341c8fa9a..da9288dbe 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/manifest.json @@ -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}/c8dfb17d574f9386e7bbf49cad0458431f6b81524a2406f5ffcc981f7d7deb68.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bac73fabd4aa76efb4fb2d93e82cb64e20efdc85b26d74379de8c004a26dbddb.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -142,6 +142,12 @@ "data": "testkinesisfirehoses3KinesisFirehose92F73280" } ], + "/fhss3-customLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/fhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/tree.json index a57fef4c2..2105f704b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-customLoggingBucket.js.snapshot/tree.json @@ -63,7 +63,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -197,13 +197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -215,19 +215,19 @@ "path": "fhss3-customLoggingBucket/test-kinesisfirehose-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -280,7 +280,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -339,19 +339,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -367,7 +367,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -387,19 +387,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -411,7 +411,7 @@ "path": "fhss3-customLoggingBucket/test-kinesisfirehose-s3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -436,13 +436,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -534,13 +534,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -609,13 +609,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "fhss3-customLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -627,7 +635,7 @@ "path": "fhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -635,7 +643,7 @@ "path": "fhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -643,13 +651,13 @@ "path": "fhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-kinesisfirehose-s3aws-managed-key": { @@ -657,7 +665,7 @@ "path": "fhss3-customLoggingBucket/test-kinesisfirehose-s3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -673,7 +681,7 @@ "path": "fhss3-customLoggingBucket/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -685,7 +693,7 @@ "path": "fhss3-customLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -693,25 +701,25 @@ "path": "fhss3-customLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -719,7 +727,7 @@ "path": "fhss3-customLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -727,13 +735,13 @@ "path": "fhss3-customLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -741,13 +749,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/fhss3-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/fhss3-no-arguments.assets.json index 82908c6fa..111cc6997 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/fhss3-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/fhss3-no-arguments.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "ff5749aad365d1bffb2e89bf4803ff8cbf8653dce39acd5ed746846198095e2b": { + "e9a5491e776ed7c1f61272617cb9cc8334716ec7a09a55756ef434738a080f06": { "source": { "path": "fhss3-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ff5749aad365d1bffb2e89bf4803ff8cbf8653dce39acd5ed746846198095e2b.json", + "objectKey": "e9a5491e776ed7c1f61272617cb9cc8334716ec7a09a55756ef434738a080f06.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/fhss3-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/fhss3-no-arguments.template.json index 97459346f..c578951e1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/fhss3-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/fhss3-no-arguments.template.json @@ -553,7 +553,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -564,7 +564,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -601,6 +609,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/manifest.json index 3cd516060..56eb2aa6e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/manifest.json @@ -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}/ff5749aad365d1bffb2e89bf4803ff8cbf8653dce39acd5ed746846198095e2b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e9a5491e776ed7c1f61272617cb9cc8334716ec7a09a55756ef434738a080f06.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -148,6 +148,12 @@ "data": "testfirehoses3KinesisFirehose5D459661" } ], + "/fhss3-no-arguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/fhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/tree.json index 7791d906e..9f55b8b01 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-no-arguments.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "fhss3-no-arguments/test-firehose-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,19 +389,19 @@ "path": "fhss3-no-arguments/test-firehose-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -417,7 +417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -437,19 +437,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -461,7 +461,7 @@ "path": "fhss3-no-arguments/test-firehose-s3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -486,13 +486,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -584,13 +584,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -659,13 +659,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "fhss3-no-arguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -677,7 +685,7 @@ "path": "fhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -685,7 +693,7 @@ "path": "fhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -693,13 +701,13 @@ "path": "fhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-firehose-s3aws-managed-key": { @@ -707,7 +715,7 @@ "path": "fhss3-no-arguments/test-firehose-s3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -723,7 +731,7 @@ "path": "fhss3-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -735,7 +743,7 @@ "path": "fhss3-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -743,25 +751,25 @@ "path": "fhss3-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -769,7 +777,7 @@ "path": "fhss3-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -777,13 +785,13 @@ "path": "fhss3-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -791,13 +799,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/fhss3-pre-existing-bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/fhss3-pre-existing-bucket.assets.json index a348842b4..23685235c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/fhss3-pre-existing-bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/fhss3-pre-existing-bucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "f2f08a030e3a0be6623389b5b47ab95bd6b3787ad47120c85a41def37f7411a9": { + "c857b22928a2a2242e8d634cd9794729ca1d2a5eb8770f491804b9fa7b7f22be": { "source": { "path": "fhss3-pre-existing-bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f2f08a030e3a0be6623389b5b47ab95bd6b3787ad47120c85a41def37f7411a9.json", + "objectKey": "c857b22928a2a2242e8d634cd9794729ca1d2a5eb8770f491804b9fa7b7f22be.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/fhss3-pre-existing-bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/fhss3-pre-existing-bucket.template.json index ed6793d63..05614fcc7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/fhss3-pre-existing-bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/fhss3-pre-existing-bucket.template.json @@ -206,7 +206,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -217,7 +217,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -596,6 +604,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/manifest.json index 3dbd3fd35..f85e2b46c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/manifest.json @@ -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}/f2f08a030e3a0be6623389b5b47ab95bd6b3787ad47120c85a41def37f7411a9.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c857b22928a2a2242e8d634cd9794729ca1d2a5eb8770f491804b9fa7b7f22be.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/fhss3-pre-existing-bucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/fhss3-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/tree.json index 86274d82e..e670f523f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-bucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "fhss3-pre-existing-bucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "fhss3-pre-existing-bucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "fhss3-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "fhss3-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "fhss3-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -376,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -394,19 +402,19 @@ "path": "fhss3-pre-existing-bucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "mybucket": { @@ -414,7 +422,7 @@ "path": "fhss3-pre-existing-bucket/mybucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-firehose-s3-pre-existing-bucket-stack": { @@ -434,7 +442,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -454,19 +462,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -478,7 +486,7 @@ "path": "fhss3-pre-existing-bucket/test-firehose-s3-pre-existing-bucket-stack/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -503,13 +511,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -612,13 +620,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -696,13 +704,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "test-firehose-s3-pre-existing-bucket-stackaws-managed-key": { @@ -710,7 +718,7 @@ "path": "fhss3-pre-existing-bucket/test-firehose-s3-pre-existing-bucket-stackaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -726,7 +734,7 @@ "path": "fhss3-pre-existing-bucket/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -738,7 +746,7 @@ "path": "fhss3-pre-existing-bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -746,25 +754,25 @@ "path": "fhss3-pre-existing-bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -772,7 +780,7 @@ "path": "fhss3-pre-existing-bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -780,13 +788,13 @@ "path": "fhss3-pre-existing-bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -794,13 +802,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/fhss3-pre-existing-logging-bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/fhss3-pre-existing-logging-bucket.assets.json index a4f9cbee5..b672a7595 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/fhss3-pre-existing-logging-bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/fhss3-pre-existing-logging-bucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "b5b4cc271ce95e2fbc829114184303faf872e3c971f407f22296b99d863aa9ce": { + "12cf056a1a0fd389bd693e760c7937db96ba8c1b400c022ca619b18e26231ff8": { "source": { "path": "fhss3-pre-existing-logging-bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b5b4cc271ce95e2fbc829114184303faf872e3c971f407f22296b99d863aa9ce.json", + "objectKey": "12cf056a1a0fd389bd693e760c7937db96ba8c1b400c022ca619b18e26231ff8.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/fhss3-pre-existing-logging-bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/fhss3-pre-existing-logging-bucket.template.json index b6c00c27d..003c87cda 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/fhss3-pre-existing-logging-bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/fhss3-pre-existing-logging-bucket.template.json @@ -206,7 +206,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -217,7 +217,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -766,6 +774,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/manifest.json index 1ad2af9b2..e298809a2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/manifest.json @@ -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}/b5b4cc271ce95e2fbc829114184303faf872e3c971f407f22296b99d863aa9ce.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/12cf056a1a0fd389bd693e760c7937db96ba8c1b400c022ca619b18e26231ff8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/fhss3-pre-existing-logging-bucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/fhss3-pre-existing-logging-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/tree.json index 6d8477cfd..147dba357 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-pre-existing-logging-bucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "fhss3-pre-existing-logging-bucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "fhss3-pre-existing-logging-bucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "fhss3-pre-existing-logging-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "fhss3-pre-existing-logging-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "fhss3-pre-existing-logging-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -412,13 +420,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -430,19 +438,19 @@ "path": "fhss3-pre-existing-logging-bucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "test-firehose-s3-pre-existing-logging-bucket-stack": { @@ -505,7 +513,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -603,13 +611,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -621,19 +629,19 @@ "path": "fhss3-pre-existing-logging-bucket/test-firehose-s3-pre-existing-logging-bucket-stack/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -649,7 +657,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -669,19 +677,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -693,7 +701,7 @@ "path": "fhss3-pre-existing-logging-bucket/test-firehose-s3-pre-existing-logging-bucket-stack/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -718,13 +726,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -816,13 +824,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -891,13 +899,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "test-firehose-s3-pre-existing-logging-bucket-stackaws-managed-key": { @@ -905,7 +913,7 @@ "path": "fhss3-pre-existing-logging-bucket/test-firehose-s3-pre-existing-logging-bucket-stackaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -921,7 +929,7 @@ "path": "fhss3-pre-existing-logging-bucket/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -933,7 +941,7 @@ "path": "fhss3-pre-existing-logging-bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -941,25 +949,25 @@ "path": "fhss3-pre-existing-logging-bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -967,7 +975,7 @@ "path": "fhss3-pre-existing-logging-bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -975,13 +983,13 @@ "path": "fhss3-pre-existing-logging-bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -989,13 +997,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/fhss3-two-instances.assets.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/fhss3-two-instances.assets.json index d923ad520..59b5742f6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/fhss3-two-instances.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/fhss3-two-instances.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "b7634314b795a695f7f33c0e17ae73974f1b6995c4ffa78e58e450e76061733d": { + "07be8021ebfb1fce74e114737ded5c55d811bb9826ce292291486afa939f64ba": { "source": { "path": "fhss3-two-instances.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7634314b795a695f7f33c0e17ae73974f1b6995c4ffa78e58e450e76061733d.json", + "objectKey": "07be8021ebfb1fce74e114737ded5c55d811bb9826ce292291486afa939f64ba.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/fhss3-two-instances.template.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/fhss3-two-instances.template.json index c8abfdec1..0e7f6b402 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/fhss3-two-instances.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/fhss3-two-instances.template.json @@ -553,7 +553,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -564,7 +564,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1124,6 +1132,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/manifest.json index 00e0e51af..f7266ccbf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/manifest.json @@ -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}/b7634314b795a695f7f33c0e17ae73974f1b6995c4ffa78e58e450e76061733d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/07be8021ebfb1fce74e114737ded5c55d811bb9826ce292291486afa939f64ba.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -148,6 +148,12 @@ "data": "firstconstructKinesisFirehoseE18EBAA6" } ], + "/fhss3-two-instances/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/fhss3-two-instances/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/tree.json index 0adbfdac1..e5d46ed5d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisfirehose-s3/test/integ.fhss3-two-instances.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "fhss3-two-instances/first-construct/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,19 +389,19 @@ "path": "fhss3-two-instances/first-construct/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -417,7 +417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -437,19 +437,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -461,7 +461,7 @@ "path": "fhss3-two-instances/first-construct/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -486,13 +486,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -584,13 +584,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -659,13 +659,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "fhss3-two-instances/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -677,7 +685,7 @@ "path": "fhss3-two-instances/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -685,7 +693,7 @@ "path": "fhss3-two-instances/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -693,13 +701,13 @@ "path": "fhss3-two-instances/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "first-constructaws-managed-key": { @@ -707,7 +715,7 @@ "path": "fhss3-two-instances/first-constructaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "second-construct": { @@ -752,7 +760,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -886,13 +894,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -904,19 +912,19 @@ "path": "fhss3-two-instances/second-construct/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -975,7 +983,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -1073,13 +1081,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1091,19 +1099,19 @@ "path": "fhss3-two-instances/second-construct/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -1119,7 +1127,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -1139,19 +1147,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -1163,7 +1171,7 @@ "path": "fhss3-two-instances/second-construct/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1188,13 +1196,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -1286,13 +1294,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -1361,13 +1369,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "second-constructaws-managed-key": { @@ -1375,7 +1383,7 @@ "path": "fhss3-two-instances/second-constructaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1391,7 +1399,7 @@ "path": "fhss3-two-instances/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -1403,7 +1411,7 @@ "path": "fhss3-two-instances/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1411,25 +1419,25 @@ "path": "fhss3-two-instances/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1437,7 +1445,7 @@ "path": "fhss3-two-instances/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1445,13 +1453,13 @@ "path": "fhss3-two-instances/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1459,13 +1467,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/package.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/package.json index 8d2057a0b..ead487efd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/package.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/package.json @@ -22,12 +22,12 @@ "test": "jest --coverage", "clean": "tsc -b --clean", "watch": "tsc -b -w", - "integ": "cdk-integ", + "integ": "integ-runner --update-on-failed", "integ-assert": "integ-runner", "jsii": "jsii", "jsii-pacmak": "jsii-pacmak", "build+lint+test": "npm run jsii && npm run lint && npm test && npm run integ-assert", - "integ-no-clean": "cdk-integ --no-clean", + "integ-no-clean": "integ-runner --update-on-failed --no-clean", "snapshot-update": "npm run jsii && npm test -- -u && npm run integ-assert" }, "jsii": { diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/kinfhss3-customLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/kinfhss3-customLoggingBucket.assets.json index ec26f2ff1..dbf9ded74 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/kinfhss3-customLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/kinfhss3-customLoggingBucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "cf9d797f67f57f70e0e8ef68ee8186f369c40f333a9740bac3f7adc6f51dca31": { + "b99a4a614fcfffcf9f1cfc98560fde6501a15a4144ddeacd1386e291d8f10b24": { "source": { "path": "kinfhss3-customLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "cf9d797f67f57f70e0e8ef68ee8186f369c40f333a9740bac3f7adc6f51dca31.json", + "objectKey": "b99a4a614fcfffcf9f1cfc98560fde6501a15a4144ddeacd1386e291d8f10b24.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/kinfhss3-customLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/kinfhss3-customLoggingBucket.template.json index 5191902d9..f51ef08a8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/kinfhss3-customLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/kinfhss3-customLoggingBucket.template.json @@ -594,7 +594,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -605,7 +605,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -642,6 +650,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/manifest.json index 3c7bff953..ebb19892f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/manifest.json @@ -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}/cf9d797f67f57f70e0e8ef68ee8186f369c40f333a9740bac3f7adc6f51dca31.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b99a4a614fcfffcf9f1cfc98560fde6501a15a4144ddeacd1386e291d8f10b24.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -166,6 +166,12 @@ "data": "KinesisStreamsRole2BFD39A5" } ], + "/kinfhss3-customLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/kinfhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/tree.json index d3a7c2d30..befa45ba6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-customLoggingBucket.js.snapshot/tree.json @@ -32,13 +32,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseToS3": { @@ -96,7 +96,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -230,13 +230,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -248,19 +248,19 @@ "path": "kinfhss3-customLoggingBucket/test-kinesisfirehose-s3/KinesisFirehoseToS3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -313,7 +313,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -372,19 +372,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -400,7 +400,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -420,19 +420,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -444,7 +444,7 @@ "path": "kinfhss3-customLoggingBucket/test-kinesisfirehose-s3/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -469,13 +469,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -567,13 +567,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -654,13 +654,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -668,7 +668,7 @@ "path": "kinfhss3-customLoggingBucket/test-kinesisfirehose-s3/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -693,13 +693,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -724,19 +724,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3.KinesisStreamsToKinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "KinesisStreamsRole": { @@ -748,7 +748,7 @@ "path": "kinfhss3-customLoggingBucket/KinesisStreamsRole/ImportKinesisStreamsRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -798,13 +798,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "kinfhss3-customLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -816,7 +824,7 @@ "path": "kinfhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -824,7 +832,7 @@ "path": "kinfhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -832,13 +840,13 @@ "path": "kinfhss3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -866,7 +874,7 @@ "path": "kinfhss3-customLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -874,25 +882,25 @@ "path": "kinfhss3-customLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -900,7 +908,7 @@ "path": "kinfhss3-customLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -908,13 +916,13 @@ "path": "kinfhss3-customLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -928,7 +936,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/kinfhss3-existing-bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/kinfhss3-existing-bucket.assets.json index 04e3e8e0b..7ffb0f97c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/kinfhss3-existing-bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/kinfhss3-existing-bucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "0bed0cbc3170fa55bf7fab34e1681c547f05a41a3e0599b1c0f42401ff41b412": { + "152975655ffb02091a4d0dedf881e01af6455511f2a61d9d3196e5b14e079281": { "source": { "path": "kinfhss3-existing-bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0bed0cbc3170fa55bf7fab34e1681c547f05a41a3e0599b1c0f42401ff41b412.json", + "objectKey": "152975655ffb02091a4d0dedf881e01af6455511f2a61d9d3196e5b14e079281.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/kinfhss3-existing-bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/kinfhss3-existing-bucket.template.json index a213c9912..95ce2845a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/kinfhss3-existing-bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/kinfhss3-existing-bucket.template.json @@ -206,7 +206,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -217,7 +217,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -689,6 +697,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/manifest.json index d4d88460b..c548e12b8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/manifest.json @@ -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}/0bed0cbc3170fa55bf7fab34e1681c547f05a41a3e0599b1c0f42401ff41b412.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/152975655ffb02091a4d0dedf881e01af6455511f2a61d9d3196e5b14e079281.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/kinfhss3-existing-bucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/kinfhss3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/tree.json index 40ba37934..257a409bf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-bucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "kinfhss3-existing-bucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "kinfhss3-existing-bucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "kinfhss3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "kinfhss3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "kinfhss3-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -376,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -394,19 +402,19 @@ "path": "kinfhss3-existing-bucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "mybucket": { @@ -414,7 +422,7 @@ "path": "kinfhss3-existing-bucket/mybucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } }, "test-existing-bucket-firehose-s3-stack": { @@ -441,13 +449,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseToS3": { @@ -467,7 +475,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -487,19 +495,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -511,7 +519,7 @@ "path": "kinfhss3-existing-bucket/test-existing-bucket-firehose-s3-stack/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -536,13 +544,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -645,13 +653,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -741,13 +749,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -755,7 +763,7 @@ "path": "kinfhss3-existing-bucket/test-existing-bucket-firehose-s3-stack/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -780,13 +788,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -811,19 +819,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3.KinesisStreamsToKinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "KinesisStreamsRole": { @@ -835,7 +843,7 @@ "path": "kinfhss3-existing-bucket/KinesisStreamsRole/ImportKinesisStreamsRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -885,13 +893,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -919,7 +927,7 @@ "path": "kinfhss3-existing-bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -927,25 +935,25 @@ "path": "kinfhss3-existing-bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -953,7 +961,7 @@ "path": "kinfhss3-existing-bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -961,13 +969,13 @@ "path": "kinfhss3-existing-bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -981,7 +989,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/kinfhss3-existing-logging-bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/kinfhss3-existing-logging-bucket.assets.json index 976d1b05e..386654ddf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/kinfhss3-existing-logging-bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/kinfhss3-existing-logging-bucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "ad3c24e873475f99c9f258beedd912f4cf21c901b444015654f68ae5c2ea33da": { + "d5e291dc80e6b2f6e4b2205fb9d77c7ebb96715789caaa3704c993b2e54cfca7": { "source": { "path": "kinfhss3-existing-logging-bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ad3c24e873475f99c9f258beedd912f4cf21c901b444015654f68ae5c2ea33da.json", + "objectKey": "d5e291dc80e6b2f6e4b2205fb9d77c7ebb96715789caaa3704c993b2e54cfca7.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/kinfhss3-existing-logging-bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/kinfhss3-existing-logging-bucket.template.json index 3faf209b3..718087bc6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/kinfhss3-existing-logging-bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/kinfhss3-existing-logging-bucket.template.json @@ -206,7 +206,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -217,7 +217,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -759,6 +767,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/manifest.json index f892bded3..45c2d0e5f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/manifest.json @@ -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}/ad3c24e873475f99c9f258beedd912f4cf21c901b444015654f68ae5c2ea33da.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d5e291dc80e6b2f6e4b2205fb9d77c7ebb96715789caaa3704c993b2e54cfca7.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/kinfhss3-existing-logging-bucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/kinfhss3-existing-logging-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/tree.json index 47542f91f..ba41d62ba 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existing-logging-bucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "kinfhss3-existing-logging-bucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "kinfhss3-existing-logging-bucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "kinfhss3-existing-logging-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "kinfhss3-existing-logging-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "kinfhss3-existing-logging-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -376,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -394,19 +402,19 @@ "path": "kinfhss3-existing-logging-bucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "myLoggingBucket": { @@ -414,7 +422,7 @@ "path": "kinfhss3-existing-logging-bucket/myLoggingBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } }, "test-existing-logging-bucket-streams-firehose-s3-stack": { @@ -441,13 +449,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseToS3": { @@ -504,7 +512,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -563,19 +571,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -591,7 +599,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -611,19 +619,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -635,7 +643,7 @@ "path": "kinfhss3-existing-logging-bucket/test-existing-logging-bucket-streams-firehose-s3-stack/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -660,13 +668,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -758,13 +766,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -845,13 +853,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -859,7 +867,7 @@ "path": "kinfhss3-existing-logging-bucket/test-existing-logging-bucket-streams-firehose-s3-stack/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -884,13 +892,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -915,19 +923,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3.KinesisStreamsToKinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "KinesisStreamsRole": { @@ -939,7 +947,7 @@ "path": "kinfhss3-existing-logging-bucket/KinesisStreamsRole/ImportKinesisStreamsRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -989,13 +997,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1023,7 +1031,7 @@ "path": "kinfhss3-existing-logging-bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1031,25 +1039,25 @@ "path": "kinfhss3-existing-logging-bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1057,7 +1065,7 @@ "path": "kinfhss3-existing-logging-bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1065,13 +1073,13 @@ "path": "kinfhss3-existing-logging-bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1085,7 +1093,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/kinfhss3-existingStreamObj.assets.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/kinfhss3-existingStreamObj.assets.json index 0efd24202..a83b9d02e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/kinfhss3-existingStreamObj.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/kinfhss3-existingStreamObj.assets.json @@ -14,7 +14,7 @@ } } }, - "a2403898a57eb4e51a9d90fa1414c4fdbd79fd5e18e51460c02414cb1668724b": { + "07355b8e05011577a0997c81a687f4665d1ef604cc528827dd458d89a1ec444b": { "source": { "path": "kinfhss3-existingStreamObj.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a2403898a57eb4e51a9d90fa1414c4fdbd79fd5e18e51460c02414cb1668724b.json", + "objectKey": "07355b8e05011577a0997c81a687f4665d1ef604cc528827dd458d89a1ec444b.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/kinfhss3-existingStreamObj.template.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/kinfhss3-existingStreamObj.template.json index b641b0c9d..f1081860e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/kinfhss3-existingStreamObj.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/kinfhss3-existingStreamObj.template.json @@ -157,7 +157,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/manifest.json index f2db1384f..3f5a42e35 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/manifest.json @@ -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}/a2403898a57eb4e51a9d90fa1414c4fdbd79fd5e18e51460c02414cb1668724b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/07355b8e05011577a0997c81a687f4665d1ef604cc528827dd458d89a1ec444b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/tree.json index 5f543d767..5ab2c5d6b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.js.snapshot/tree.json @@ -32,13 +32,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunctionServiceRole": { @@ -50,7 +50,7 @@ "path": "kinfhss3-existingStreamObj/test-kinesis-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -113,7 +113,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -182,19 +182,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -210,7 +210,7 @@ "path": "kinfhss3-existingStreamObj/test-kinesis-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -218,13 +218,13 @@ "path": "kinfhss3-existingStreamObj/test-kinesis-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -251,7 +251,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -259,7 +259,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisEventSource:kinfhss3existingStreamObjtestkinesislambdaKinesisStream06A6475B": { @@ -300,19 +300,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "SqsDlqQueue": { @@ -330,7 +330,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -413,19 +413,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -450,13 +450,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -481,19 +481,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisstreams-lambda.KinesisStreamsToLambda", - "version": "2.57.0" + "version": "2.60.0" } }, "test-existing-stream-firehose-s3-stack": { @@ -549,7 +549,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -608,19 +608,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.145.0" } }, "firehose-log-group": { @@ -636,7 +636,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.145.0" } }, "firehose-log-stream": { @@ -656,19 +656,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisFirehoseRole": { @@ -680,7 +680,7 @@ "path": "kinfhss3-existingStreamObj/test-existing-stream-firehose-s3-stack/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -705,13 +705,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisFirehosePolicy": { @@ -803,13 +803,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisFirehose": { @@ -890,13 +890,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -904,13 +904,13 @@ "path": "kinfhss3-existingStreamObj/test-existing-stream-firehose-s3-stack/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3.KinesisStreamsToKinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "KinesisStreamsRole": { @@ -922,7 +922,7 @@ "path": "kinfhss3-existingStreamObj/KinesisStreamsRole/ImportKinesisStreamsRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -972,13 +972,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "Integ": { @@ -1006,7 +1006,7 @@ "path": "kinfhss3-existingStreamObj/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1014,25 +1014,25 @@ "path": "kinfhss3-existingStreamObj/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -1040,7 +1040,7 @@ "path": "kinfhss3-existingStreamObj/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1048,13 +1048,13 @@ "path": "kinfhss3-existingStreamObj/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -1068,7 +1068,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.ts b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.ts index 03997e394..0cbd56ec7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.ts +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-existingStreamObj.ts @@ -28,7 +28,7 @@ stack.templateOptions.description = 'Integration Test for aws-kinesisstreams-kin const construct = new KinesisStreamsToLambda(stack, 'test-kinesis-lambda', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/kinfhss3-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/kinfhss3-no-arguments.assets.json index de5ada185..8f04946c9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/kinfhss3-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/kinfhss3-no-arguments.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "138e11ea8a479bce4382c03d5c53d86f0c00dc648c0bfdfe602b16994670ae55": { + "5e94820cdde3af3725d9e3c09c2586dac19124d1b2be1f94a82d2f05ff0ff910": { "source": { "path": "kinfhss3-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "138e11ea8a479bce4382c03d5c53d86f0c00dc648c0bfdfe602b16994670ae55.json", + "objectKey": "5e94820cdde3af3725d9e3c09c2586dac19124d1b2be1f94a82d2f05ff0ff910.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/kinfhss3-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/kinfhss3-no-arguments.template.json index 8d904e2b5..9e7d2b0e7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/kinfhss3-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/kinfhss3-no-arguments.template.json @@ -646,7 +646,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -657,7 +657,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -694,6 +702,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/manifest.json index 77bd02ff4..59327fe66 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/manifest.json @@ -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}/138e11ea8a479bce4382c03d5c53d86f0c00dc648c0bfdfe602b16994670ae55.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5e94820cdde3af3725d9e3c09c2586dac19124d1b2be1f94a82d2f05ff0ff910.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -172,6 +172,12 @@ "data": "KinesisStreamsRole2BFD39A5" } ], + "/kinfhss3-no-arguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/kinfhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/tree.json index 989b219fb..339195e73 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3/test/integ.kinfhss3-no-arguments.js.snapshot/tree.json @@ -32,13 +32,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseToS3": { @@ -83,7 +83,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -217,13 +217,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -235,19 +235,19 @@ "path": "kinfhss3-no-arguments/test-stream-firehose-s3/KinesisFirehoseToS3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -306,7 +306,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -404,13 +404,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -422,19 +422,19 @@ "path": "kinfhss3-no-arguments/test-stream-firehose-s3/KinesisFirehoseToS3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -450,7 +450,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -470,19 +470,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -494,7 +494,7 @@ "path": "kinfhss3-no-arguments/test-stream-firehose-s3/KinesisFirehoseToS3/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -519,13 +519,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -617,13 +617,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -704,13 +704,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "KinesisFirehoseToS3aws-managed-key": { @@ -718,7 +718,7 @@ "path": "kinfhss3-no-arguments/test-stream-firehose-s3/KinesisFirehoseToS3aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -743,13 +743,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -774,19 +774,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3.KinesisStreamsToKinesisFirehoseToS3", - "version": "2.57.0" + "version": "2.60.0" } }, "KinesisStreamsRole": { @@ -798,7 +798,7 @@ "path": "kinfhss3-no-arguments/KinesisStreamsRole/ImportKinesisStreamsRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -848,13 +848,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "kinfhss3-no-arguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -866,7 +874,7 @@ "path": "kinfhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -874,7 +882,7 @@ "path": "kinfhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -882,13 +890,13 @@ "path": "kinfhss3-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -916,7 +924,7 @@ "path": "kinfhss3-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -924,25 +932,25 @@ "path": "kinfhss3-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -950,7 +958,7 @@ "path": "kinfhss3-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -958,13 +966,13 @@ "path": "kinfhss3-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -978,7 +986,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/kinlam-existing.assets.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/kinlam-existing.assets.json index 4a48eb962..b1a59038d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/kinlam-existing.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/kinlam-existing.assets.json @@ -14,7 +14,7 @@ } } }, - "30debbff2701488b17817c5cf84238c9e7d03c0934e3f7041c5f69f85542524d": { + "759826d4b900f9d890c235dbd26751ca8182ea11cafba7df3ba2371594b86e95": { "source": { "path": "kinlam-existing.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "30debbff2701488b17817c5cf84238c9e7d03c0934e3f7041c5f69f85542524d.json", + "objectKey": "759826d4b900f9d890c235dbd26751ca8182ea11cafba7df3ba2371594b86e95.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/kinlam-existing.template.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/kinlam-existing.template.json index b63effcbf..64b2c6262 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/kinlam-existing.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/kinlam-existing.template.json @@ -121,7 +121,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "testroleDefaultPolicy884631E2", diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/manifest.json index 2f8694aa9..fed617791 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/manifest.json @@ -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}/30debbff2701488b17817c5cf84238c9e7d03c0934e3f7041c5f69f85542524d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/759826d4b900f9d890c235dbd26751ca8182ea11cafba7df3ba2371594b86e95.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/tree.json index b1b750231..515f44578 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "kinlam-existing/test-role/Importtest-role", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -141,19 +141,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "test-fn": { @@ -169,7 +169,7 @@ "path": "kinlam-existing/test-fn/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -177,13 +177,13 @@ "path": "kinlam-existing/test-fn/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -205,12 +205,12 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisEventSource:kinlamexistingteststream6B91D225": { @@ -251,19 +251,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "test-stream": { @@ -286,13 +286,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.145.0" } }, "test-ks-lambda": { @@ -314,7 +314,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -397,19 +397,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -434,13 +434,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -465,19 +465,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisstreams-lambda.KinesisStreamsToLambda", - "version": "2.57.0" + "version": "2.60.0" } }, "Integ": { @@ -505,7 +505,7 @@ "path": "kinlam-existing/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -513,25 +513,25 @@ "path": "kinlam-existing/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -539,7 +539,7 @@ "path": "kinlam-existing/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -547,13 +547,13 @@ "path": "kinlam-existing/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -567,7 +567,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.ts b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.ts index 230f6b57d..9b0d1b586 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.ts +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-existing.ts @@ -19,6 +19,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as iam from 'aws-cdk-lib/aws-iam'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -42,7 +43,7 @@ const lambdaRole = new iam.Role(stack, 'test-role', { }); const lambdaFn = new lambda.Function(stack, 'test-fn', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), role: lambdaRole, diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/kinlam-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/kinlam-no-arguments.assets.json index d7504b190..08a92eed0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/kinlam-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/kinlam-no-arguments.assets.json @@ -14,7 +14,7 @@ } } }, - "cbf4cbe35d04123ae3c98edc80d1886ae66cb7c7118f0a90b8eeab76d30de16e": { + "9e6aba6a418f96ede4837c021b29a5103b0f340697651650cfe65b5c0f62f0bc": { "source": { "path": "kinlam-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "cbf4cbe35d04123ae3c98edc80d1886ae66cb7c7118f0a90b8eeab76d30de16e.json", + "objectKey": "9e6aba6a418f96ede4837c021b29a5103b0f340697651650cfe65b5c0f62f0bc.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/kinlam-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/kinlam-no-arguments.template.json index bb51dcf0f..c5c3bb82d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/kinlam-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/kinlam-no-arguments.template.json @@ -157,7 +157,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/manifest.json index 4cd997b26..8d747958b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/manifest.json @@ -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}/cbf4cbe35d04123ae3c98edc80d1886ae66cb7c7118f0a90b8eeab76d30de16e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9e6aba6a418f96ede4837c021b29a5103b0f340697651650cfe65b5c0f62f0bc.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/tree.json index fe1c23595..79d612f34 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.js.snapshot/tree.json @@ -32,13 +32,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunctionServiceRole": { @@ -50,7 +50,7 @@ "path": "kinlam-no-arguments/test-kinesisstreams-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -113,7 +113,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -182,19 +182,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -210,7 +210,7 @@ "path": "kinlam-no-arguments/test-kinesisstreams-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -218,13 +218,13 @@ "path": "kinlam-no-arguments/test-kinesisstreams-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -251,7 +251,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -259,7 +259,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisEventSource:kinlamnoargumentstestkinesisstreamslambdaKinesisStreamB15C5952": { @@ -300,19 +300,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "SqsDlqQueue": { @@ -330,7 +330,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -413,19 +413,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -450,13 +450,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -481,19 +481,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisstreams-lambda.KinesisStreamsToLambda", - "version": "2.57.0" + "version": "2.60.0" } }, "Integ": { @@ -521,7 +521,7 @@ "path": "kinlam-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -529,25 +529,25 @@ "path": "kinlam-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -555,7 +555,7 @@ "path": "kinlam-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -563,13 +563,13 @@ "path": "kinlam-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -583,7 +583,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.ts index ae4b1b759..7483e4b2f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/integ.kinlam-no-arguments.ts @@ -17,6 +17,7 @@ import { Stack, App } from 'aws-cdk-lib'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-kinesisstreams-lam // Definitions const props: KinesisStreamsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/kinesisstreams-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/kinesisstreams-lambda.test.ts index 1d6cfe0c4..4bc478fa5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/kinesisstreams-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-kinesisstreams-lambda/test/kinesisstreams-lambda.test.ts @@ -17,13 +17,14 @@ import { KinesisStreamsToLambda, KinesisStreamsToLambdaProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as kinesis from 'aws-cdk-lib/aws-kinesis'; import { Template } from 'aws-cdk-lib/assertions'; +import * as defaults from '@aws-solutions-constructs/core'; test('Test properties', () => { // Initial Setup const stack = new Stack(); const props: KinesisStreamsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } @@ -42,7 +43,7 @@ test('Test existing resources', () => { const stack = new Stack(); const fn = new lambda.Function(stack, 'test-fn', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }); @@ -69,7 +70,7 @@ test('Test existing resources', () => { template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, }); }); @@ -77,7 +78,7 @@ test('test sqsDlqQueueProps override', () => { const stack = new Stack(); const props: KinesisStreamsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -100,7 +101,7 @@ test('Test properties with no CW Alarms', () => { const stack = new Stack(); const props: KinesisStreamsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -119,14 +120,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: KinesisStreamsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -145,7 +146,7 @@ test('Confirm call to CheckKinesisStreamProps', () => { const props: KinesisStreamsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/lamddb-add-secondary-index.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/lamddb-add-secondary-index.assets.json index 1de09fbbe..88f098dbf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/lamddb-add-secondary-index.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/lamddb-add-secondary-index.assets.json @@ -14,7 +14,7 @@ } } }, - "4bd1c16e8e9fa7e057a6f49587cf6061a8597d81283fc89f2c430ef81159daae": { + "d58e95b66941491318748534e2ae886fde6ba68a5dd88668cd00603f4ad9365b": { "source": { "path": "lamddb-add-secondary-index.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4bd1c16e8e9fa7e057a6f49587cf6061a8597d81283fc89f2c430ef81159daae.json", + "objectKey": "d58e95b66941491318748534e2ae886fde6ba68a5dd88668cd00603f4ad9365b.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/lamddb-add-secondary-index.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/lamddb-add-secondary-index.template.json index 43b95a2bc..86ffdd634 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/lamddb-add-secondary-index.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/lamddb-add-secondary-index.template.json @@ -152,7 +152,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/manifest.json index e601f1aa3..3c3ddc0a0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/manifest.json @@ -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}/4bd1c16e8e9fa7e057a6f49587cf6061a8597d81283fc89f2c430ef81159daae.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d58e95b66941491318748534e2ae886fde6ba68a5dd88668cd00603f4ad9365b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/tree.json index 359aead33..babdd1c36 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamddb-add-secondary-index/test-lambda-dynamodb-stack/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -159,19 +159,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -187,7 +187,7 @@ "path": "lamddb-add-secondary-index/test-lambda-dynamodb-stack/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -195,13 +195,13 @@ "path": "lamddb-add-secondary-index/test-lambda-dynamodb-stack/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -231,7 +231,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -239,13 +239,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "DynamoTable": { @@ -299,7 +299,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.118.0" + "version": "2.145.0" } }, "ScalingRole": { @@ -307,19 +307,19 @@ "path": "lamddb-add-secondary-index/test-lambda-dynamodb-stack/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-dynamodb.LambdaToDynamoDB", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -335,7 +335,7 @@ "path": "lamddb-add-secondary-index/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -347,7 +347,7 @@ "path": "lamddb-add-secondary-index/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -355,25 +355,25 @@ "path": "lamddb-add-secondary-index/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -381,7 +381,7 @@ "path": "lamddb-add-secondary-index/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -389,13 +389,13 @@ "path": "lamddb-add-secondary-index/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -403,13 +403,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.ts index 1dc5b5afd..fc13122d5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-add-secondary-index.ts @@ -18,6 +18,7 @@ import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); @@ -27,7 +28,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const construct: LambdaToDynamoDB = new LambdaToDynamoDB(stack, 'test-lambda-dynamodb-stack', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, }); diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddb-deployFunctionWithExistingVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddb-deployFunctionWithExistingVpc.assets.json index 3c83ecd16..161dab9d1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddb-deployFunctionWithExistingVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddb-deployFunctionWithExistingVpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "46625e0239fa0d5dd8779b2b0bec49096449f1ef77532467de451faa7815c3e8": { + "fd0297aad1549c0427058dae2d67d5adfe5ffee721ac892b245df62b8cf19fce": { "source": { "path": "lamddb-deployFunctionWithExistingVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "46625e0239fa0d5dd8779b2b0bec49096449f1ef77532467de451faa7815c3e8.json", + "objectKey": "fd0297aad1549c0427058dae2d67d5adfe5ffee721ac892b245df62b8cf19fce.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddb-deployFunctionWithExistingVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddb-deployFunctionWithExistingVpc.template.json index f19f0c6ac..25b282e2c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddb-deployFunctionWithExistingVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddb-deployFunctionWithExistingVpc.template.json @@ -658,7 +658,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -669,7 +669,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -870,7 +878,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -947,6 +955,115 @@ "DeletionPolicy": "Retain" } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/manifest.json index 24c6a4730..ce18c1e2a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/manifest.json @@ -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}/46625e0239fa0d5dd8779b2b0bec49096449f1ef77532467de451faa7815c3e8.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fd0297aad1549c0427058dae2d67d5adfe5ffee721ac892b245df62b8cf19fce.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -256,6 +256,12 @@ "data": "VpcDDB49FBEC5F" } ], + "/lamddb-deployFunctionWithExistingVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamddb-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/tree.json index 2cfeb1248..2624e516c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "lamddb-deployFunctionWithExistingVpc/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "lamddb-deployFunctionWithExistingVpc/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "lamddb-deployFunctionWithExistingVpc/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "lamddb-deployFunctionWithExistingVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "lamddb-deployFunctionWithExistingVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "DDB": { @@ -888,19 +888,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamddb-deployFunctionWithExistingVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -912,7 +920,7 @@ "path": "lamddb-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -920,7 +928,7 @@ "path": "lamddb-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -928,13 +936,13 @@ "path": "lamddb-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-lambda-dynamodb-stack": { @@ -950,7 +958,7 @@ "path": "lamddb-deployFunctionWithExistingVpc/test-lambda-dynamodb-stack/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1013,7 +1021,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1082,19 +1090,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -1122,13 +1130,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1144,7 +1152,7 @@ "path": "lamddb-deployFunctionWithExistingVpc/test-lambda-dynamodb-stack/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1152,13 +1160,13 @@ "path": "lamddb-deployFunctionWithExistingVpc/test-lambda-dynamodb-stack/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1188,7 +1196,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -1214,13 +1222,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "DynamoTable": { @@ -1256,7 +1264,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.118.0" + "version": "2.147.3" } }, "ScalingRole": { @@ -1264,19 +1272,19 @@ "path": "lamddb-deployFunctionWithExistingVpc/test-lambda-dynamodb-stack/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-dynamodb.LambdaToDynamoDB", - "version": "2.51.0" + "version": "2.60.0" } }, "Integ": { @@ -1304,7 +1312,7 @@ "path": "lamddb-deployFunctionWithExistingVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1312,25 +1320,25 @@ "path": "lamddb-deployFunctionWithExistingVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1338,7 +1346,7 @@ "path": "lamddb-deployFunctionWithExistingVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1346,13 +1354,13 @@ "path": "lamddb-deployFunctionWithExistingVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1366,7 +1374,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.ts index f0bcc7635..1820dc186 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithExistingVpc.ts @@ -37,7 +37,7 @@ defaults.AddAwsServiceEndpoint(stack, vpc, defaults.ServiceEndpointTypes.DYNAMOD // Definitions const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddb-deployFunctionWithVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddb-deployFunctionWithVpc.assets.json index ccf3bd20b..01592f8a2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddb-deployFunctionWithVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddb-deployFunctionWithVpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "2dccfa634bdafbb2f2e554d8667ac329725496070788beeb90cc324d96d24889": { + "4196a325686471a6b7c81c47bf2bb9265790762fd371f2bc08dbcfb8400eb823": { "source": { "path": "lamddb-deployFunctionWithVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2dccfa634bdafbb2f2e554d8667ac329725496070788beeb90cc324d96d24889.json", + "objectKey": "4196a325686471a6b7c81c47bf2bb9265790762fd371f2bc08dbcfb8400eb823.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddb-deployFunctionWithVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddb-deployFunctionWithVpc.template.json index f330851a6..74d9c72f4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddb-deployFunctionWithVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddb-deployFunctionWithVpc.template.json @@ -177,7 +177,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -620,7 +620,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -631,7 +631,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -657,6 +665,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/manifest.json index f84ea0628..42dfa1591 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/manifest.json @@ -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}/2dccfa634bdafbb2f2e554d8667ac329725496070788beeb90cc324d96d24889.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4196a325686471a6b7c81c47bf2bb9265790762fd371f2bc08dbcfb8400eb823.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -190,6 +190,12 @@ "data": "VpcDDB49FBEC5F" } ], + "/lamddb-deployFunctionWithVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamddb-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/tree.json index d7c43e473..87165fdff 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamddb-deployFunctionWithVpc/test-lambda-dynamodb-stack/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -153,19 +153,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -215,7 +215,7 @@ "path": "lamddb-deployFunctionWithVpc/test-lambda-dynamodb-stack/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -223,13 +223,13 @@ "path": "lamddb-deployFunctionWithVpc/test-lambda-dynamodb-stack/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -259,7 +259,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -285,13 +285,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "DynamoTable": { @@ -327,7 +327,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.118.0" + "version": "2.147.3" } }, "ScalingRole": { @@ -335,19 +335,19 @@ "path": "lamddb-deployFunctionWithVpc/test-lambda-dynamodb-stack/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-dynamodb.LambdaToDynamoDB", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -374,7 +374,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -418,7 +418,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -426,7 +426,7 @@ "path": "lamddb-deployFunctionWithVpc/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -448,7 +448,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -467,13 +467,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -517,7 +517,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -525,7 +525,7 @@ "path": "lamddb-deployFunctionWithVpc/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -547,7 +547,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -566,13 +566,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -584,13 +584,13 @@ "path": "lamddb-deployFunctionWithVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -606,7 +606,7 @@ "path": "lamddb-deployFunctionWithVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -637,7 +637,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -689,19 +689,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -725,13 +725,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -765,13 +765,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "DDB": { @@ -812,19 +812,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamddb-deployFunctionWithVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -836,7 +844,7 @@ "path": "lamddb-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -844,7 +852,7 @@ "path": "lamddb-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -852,13 +860,13 @@ "path": "lamddb-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -886,7 +894,7 @@ "path": "lamddb-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -894,25 +902,25 @@ "path": "lamddb-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -920,7 +928,7 @@ "path": "lamddb-deployFunctionWithVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -928,13 +936,13 @@ "path": "lamddb-deployFunctionWithVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -948,7 +956,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.ts index caccfdbe2..2b3da3ae1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-deployFunctionWithVpc.ts @@ -17,6 +17,7 @@ import {LambdaToDynamoDB, LambdaToDynamoDBProps} from "../lib"; import * as lambda from "aws-cdk-lib/aws-lambda"; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = "Integration Test for aws-lambda-dynamodb"; // Definitions const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/lamddb-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/lamddb-no-arguments.assets.json index 276dd0a42..a8c4a8f78 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/lamddb-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/lamddb-no-arguments.assets.json @@ -14,7 +14,7 @@ } } }, - "c942db4210ee522f351f152cc931b7834fee74d11cb98a88d9cf77c4e73ea9dd": { + "9caa3fbb7e517b8775e0c105b4985093d911186823d21d5a1c30d84b3356f592": { "source": { "path": "lamddb-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c942db4210ee522f351f152cc931b7834fee74d11cb98a88d9cf77c4e73ea9dd.json", + "objectKey": "9caa3fbb7e517b8775e0c105b4985093d911186823d21d5a1c30d84b3356f592.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/lamddb-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/lamddb-no-arguments.template.json index 65a9a0fe1..90ed83ef4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/lamddb-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/lamddb-no-arguments.template.json @@ -141,7 +141,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/manifest.json index 1231d7858..045a68144 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/manifest.json @@ -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}/c942db4210ee522f351f152cc931b7834fee74d11cb98a88d9cf77c4e73ea9dd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9caa3fbb7e517b8775e0c105b4985093d911186823d21d5a1c30d84b3356f592.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/tree.json index 07e64c413..354ce25c4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamddb-no-arguments/test-lambda-dynamodb-stack/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -148,19 +148,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -176,7 +176,7 @@ "path": "lamddb-no-arguments/test-lambda-dynamodb-stack/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -184,13 +184,13 @@ "path": "lamddb-no-arguments/test-lambda-dynamodb-stack/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -220,7 +220,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -228,13 +228,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "DynamoTable": { @@ -270,7 +270,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.118.0" + "version": "2.145.0" } }, "ScalingRole": { @@ -278,19 +278,19 @@ "path": "lamddb-no-arguments/test-lambda-dynamodb-stack/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-dynamodb.LambdaToDynamoDB", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -306,7 +306,7 @@ "path": "lamddb-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -318,7 +318,7 @@ "path": "lamddb-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -326,25 +326,25 @@ "path": "lamddb-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -352,7 +352,7 @@ "path": "lamddb-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -360,13 +360,13 @@ "path": "lamddb-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -374,13 +374,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.ts index 610206fcd..06273b81e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-no-arguments.ts @@ -17,6 +17,7 @@ import { LambdaToDynamoDB, LambdaToDynamoDBProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); @@ -26,7 +27,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/lamddb-set-billing-mode.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/lamddb-set-billing-mode.assets.json index ca0a13578..a57ccee4e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/lamddb-set-billing-mode.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/lamddb-set-billing-mode.assets.json @@ -14,7 +14,7 @@ } } }, - "f242e3de7cd504392266dfd05a06048fae085429b8da5afa69e5237336585081": { + "62f887715319afd5d2cec66188ae0ab4148b9458ba184093cb28d6949abee3f0": { "source": { "path": "lamddb-set-billing-mode.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f242e3de7cd504392266dfd05a06048fae085429b8da5afa69e5237336585081.json", + "objectKey": "62f887715319afd5d2cec66188ae0ab4148b9458ba184093cb28d6949abee3f0.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/lamddb-set-billing-mode.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/lamddb-set-billing-mode.template.json index 21c9964fe..6318e920e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/lamddb-set-billing-mode.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/lamddb-set-billing-mode.template.json @@ -141,7 +141,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/manifest.json index 4371b6cd0..923cdeb18 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/manifest.json @@ -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}/f242e3de7cd504392266dfd05a06048fae085429b8da5afa69e5237336585081.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/62f887715319afd5d2cec66188ae0ab4148b9458ba184093cb28d6949abee3f0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/tree.json index e9381aa89..b88bfd231 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamddb-set-billing-mode/test-lambda-dynamodb-stack/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -148,19 +148,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -176,7 +176,7 @@ "path": "lamddb-set-billing-mode/test-lambda-dynamodb-stack/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -184,13 +184,13 @@ "path": "lamddb-set-billing-mode/test-lambda-dynamodb-stack/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -220,7 +220,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -228,13 +228,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "DynamoTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.118.0" + "version": "2.145.0" } }, "ScalingRole": { @@ -281,19 +281,19 @@ "path": "lamddb-set-billing-mode/test-lambda-dynamodb-stack/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-dynamodb.LambdaToDynamoDB", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -309,7 +309,7 @@ "path": "lamddb-set-billing-mode/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -321,7 +321,7 @@ "path": "lamddb-set-billing-mode/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -329,25 +329,25 @@ "path": "lamddb-set-billing-mode/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -355,7 +355,7 @@ "path": "lamddb-set-billing-mode/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -363,13 +363,13 @@ "path": "lamddb-set-billing-mode/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -377,13 +377,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.ts index 4b8a57268..c6e94c2fe 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-set-billing-mode.ts @@ -18,6 +18,7 @@ import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); @@ -36,7 +37,7 @@ new LambdaToDynamoDB(stack, 'test-lambda-dynamodb-stack', { }, lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' } }); diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/lamddb-use-existing-func.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/lamddb-use-existing-func.assets.json index 2410a8a2d..8333065f0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/lamddb-use-existing-func.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/lamddb-use-existing-func.assets.json @@ -14,7 +14,7 @@ } } }, - "bb7dc60a1547b8b25cc704d96f07ac93087d029a665c23aefaacb091d5dadd24": { + "c7b92b7adb7fd45d8d89aca6695e7cae282f3ad17444ec9b62d05baf54f8cc2f": { "source": { "path": "lamddb-use-existing-func.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bb7dc60a1547b8b25cc704d96f07ac93087d029a665c23aefaacb091d5dadd24.json", + "objectKey": "c7b92b7adb7fd45d8d89aca6695e7cae282f3ad17444ec9b62d05baf54f8cc2f.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/lamddb-use-existing-func.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/lamddb-use-existing-func.template.json index 74f92eb5d..ad6a1af31 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/lamddb-use-existing-func.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/lamddb-use-existing-func.template.json @@ -141,7 +141,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/manifest.json index a9174375c..536931f47 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/manifest.json @@ -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}/bb7dc60a1547b8b25cc704d96f07ac93087d029a665c23aefaacb091d5dadd24.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c7b92b7adb7fd45d8d89aca6695e7cae282f3ad17444ec9b62d05baf54f8cc2f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/tree.json index f4ef58c7c..93db145c0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamddb-use-existing-func/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -144,19 +144,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -172,7 +172,7 @@ "path": "lamddb-use-existing-func/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -180,13 +180,13 @@ "path": "lamddb-use-existing-func/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -216,7 +216,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -224,13 +224,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "test-lambda-dynamodb-stack": { @@ -270,7 +270,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.CfnTable", - "version": "2.118.0" + "version": "2.145.0" } }, "ScalingRole": { @@ -278,19 +278,19 @@ "path": "lamddb-use-existing-func/test-lambda-dynamodb-stack/DynamoTable/ScalingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_dynamodb.Table", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-dynamodb.LambdaToDynamoDB", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -306,7 +306,7 @@ "path": "lamddb-use-existing-func/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -318,7 +318,7 @@ "path": "lamddb-use-existing-func/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -326,25 +326,25 @@ "path": "lamddb-use-existing-func/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -352,7 +352,7 @@ "path": "lamddb-use-existing-func/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -360,13 +360,13 @@ "path": "lamddb-use-existing-func/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -374,13 +374,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.ts index e948ddd8c..bb92ab9d4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/integ.lamddb-use-existing-func.ts @@ -22,7 +22,7 @@ import { IntegTest } from '@aws-cdk/integ-tests-alpha'; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/lambda-dynamodb.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/lambda-dynamodb.test.ts index 5051a0fda..9d2ed7e7e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/lambda-dynamodb.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-dynamodb/test/lambda-dynamodb.test.ts @@ -17,12 +17,13 @@ import * as dynamodb from 'aws-cdk-lib/aws-dynamodb'; import * as cdk from "aws-cdk-lib"; import * as ec2 from "aws-cdk-lib/aws-ec2"; import { Template } from 'aws-cdk-lib/assertions'; +import * as defaults from '@aws-solutions-constructs/core'; function deployNewFunc(stack: cdk.Stack) { const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, }; @@ -67,7 +68,7 @@ test('check lambda function properties for deploy: true', () => { "Arn" ] }, - Runtime: "nodejs16.x", + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1", @@ -298,7 +299,7 @@ test('check for no prop', () => { const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' } }; @@ -313,7 +314,7 @@ test('check for no prop', () => { "Arn" ] }, - Runtime: "nodejs16.x", + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1", @@ -331,7 +332,7 @@ test('check lambda function policy ReadOnly table permissions', () => { const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, tablePermissions: 'Read' @@ -388,7 +389,7 @@ test('check lambda function policy WriteOnly table permissions', () => { const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, tablePermissions: 'Write' @@ -442,7 +443,7 @@ test('check lambda function policy ReadWrite table permissions', () => { const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, tablePermissions: 'ReadWrite' @@ -503,7 +504,7 @@ test('check lambda function policy All table permissions', () => { const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, tablePermissions: 'All' @@ -550,7 +551,7 @@ test('check lambda function custom environment variable', () => { const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, tableEnvironmentVariableName: 'CUSTOM_DYNAMODB_TABLE' @@ -561,7 +562,7 @@ test('check lambda function custom environment variable', () => { const template = Template.fromStack(stack); template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', @@ -582,7 +583,7 @@ test("Test minimal deployment that deploys a VPC without vpcProps", () => { // Helper declaration new LambdaToDynamoDB(stack, "lambda-to-dynamodb-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -633,7 +634,7 @@ test("Test minimal deployment that deploys a VPC w/vpcProps", () => { // Helper declaration new LambdaToDynamoDB(stack, "lambda-to-dynamodb-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -693,7 +694,7 @@ test("Test minimal deployment with an existing VPC", () => { // Helper declaration new LambdaToDynamoDB(stack, "lambda-to-dynamodb-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -738,7 +739,7 @@ test("Test minimal deployment with an existing VPC and existing Lambda function const stack = new cdk.Stack(); const testLambdaFunction = new lambda.Function(stack, 'test-lambda', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -769,7 +770,7 @@ test("Confirm CheckVpcProps is called", () => { // Helper declaration new LambdaToDynamoDB(stack, "lambda-to-dynamodb-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -787,7 +788,7 @@ test('Test bad table permission', () => { const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, tablePermissions: 'Reed', @@ -816,7 +817,7 @@ test('Test that CheckDynamoDBProps is getting called', () => { const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingTableObj: existingTable, @@ -841,14 +842,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new cdk.Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: LambdaToDynamoDBProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/lammem-existingResources.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/lammem-existingResources.assets.json index 73cf64345..05fe0387d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/lammem-existingResources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/lammem-existingResources.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "d6945fdbca12fe467d0b89f9a1e5fc3299adac249af2400cc8df1685a526594d": { + "05cbb0ca1b99b2fd9e8992e532b46804ce6554c4b8a2596a2efe43718eef9f4c": { "source": { "path": "lammem-existingResources.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d6945fdbca12fe467d0b89f9a1e5fc3299adac249af2400cc8df1685a526594d.json", + "objectKey": "05cbb0ca1b99b2fd9e8992e532b46804ce6554c4b8a2596a2efe43718eef9f4c.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/lammem-existingResources.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/lammem-existingResources.template.json index 811637189..32c3d5de7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/lammem-existingResources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/lammem-existingResources.template.json @@ -341,7 +341,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -352,7 +352,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -494,7 +502,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "VpcConfig": { "SecurityGroupIds": [ { @@ -683,6 +691,115 @@ ] } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/manifest.json index 3e97eaa28..ae65072a4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/manifest.json @@ -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}/d6945fdbca12fe467d0b89f9a1e5fc3299adac249af2400cc8df1685a526594d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/05cbb0ca1b99b2fd9e8992e532b46804ce6554c4b8a2596a2efe43718eef9f4c.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -154,6 +154,12 @@ "data": "VpcFlowLog8FF33A73" } ], + "/lammem-existingResources/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lammem-existingResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/tree.json index 30b07f9d3..aa5d369dd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "lammem-existingResources/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,13 +125,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -175,7 +175,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -183,7 +183,7 @@ "path": "lammem-existingResources/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -205,7 +205,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -224,13 +224,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -242,13 +242,13 @@ "path": "lammem-existingResources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -264,7 +264,7 @@ "path": "lammem-existingResources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -295,7 +295,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -347,19 +347,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -383,13 +383,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -423,19 +423,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lammem-existingResources/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -447,7 +455,7 @@ "path": "lammem-existingResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -455,7 +463,7 @@ "path": "lammem-existingResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -463,13 +471,13 @@ "path": "lammem-existingResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-sg-security-group": { @@ -497,13 +505,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "test-function": { @@ -519,7 +527,7 @@ "path": "lammem-existingResources/test-function/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -570,13 +578,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "Code": { @@ -588,7 +596,7 @@ "path": "lammem-existingResources/test-function/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -596,13 +604,13 @@ "path": "lammem-existingResources/test-function/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -648,7 +656,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "vpcConfig": { "subnetIds": [ { @@ -671,13 +679,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "ec-subnetgroup-test-cache": { @@ -700,7 +708,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticache.CfnSubnetGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "test-cache-cachesg": { @@ -728,13 +736,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "test-cache-cluster": { @@ -768,7 +776,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticache.CfnCacheCluster", - "version": "2.118.0" + "version": "2.147.3" } }, "lammem-existingResources": { @@ -800,13 +808,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "lammem-existingResources-ingress": { @@ -845,13 +853,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-elasticachememcached.LambdaToElasticachememcached", - "version": "2.51.0" + "version": "2.60.0" } }, "Integ": { @@ -879,7 +887,7 @@ "path": "lammem-existingResources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -887,25 +895,25 @@ "path": "lammem-existingResources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -913,7 +921,7 @@ "path": "lammem-existingResources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -921,13 +929,13 @@ "path": "lammem-existingResources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -941,7 +949,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.ts index fae13724c..74e136602 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-existingResources.ts @@ -18,6 +18,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; // import * as ec2 from '@aws-cdk/aws-ec2'; import { generateIntegStackName, getTestVpc, CreateTestCache, addCfnSuppressRules, buildSecurityGroup, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -29,7 +30,7 @@ const testVpc = getTestVpc(stack, false); const testSG = buildSecurityGroup(stack, 'test-sg', { vpc: testVpc }, [], []); const testFunction = new lambda.Function(stack, 'test-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), vpc: testVpc, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/lammem-newResources.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/lammem-newResources.assets.json index 2e91f6a03..187e26093 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/lammem-newResources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/lammem-newResources.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "758511b71ca21b830411d9be4755d92fe7363e46c9505124f2394618315f3b34": { + "d606ade5f484d66b82535b0f683765eab111a7d94d970d7cdb91b9f511d1a91a": { "source": { "path": "lammem-newResources.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "758511b71ca21b830411d9be4755d92fe7363e46c9505124f2394618315f3b34.json", + "objectKey": "d606ade5f484d66b82535b0f683765eab111a7d94d970d7cdb91b9f511d1a91a.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/lammem-newResources.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/lammem-newResources.template.json index 0d70807ae..147cf31f8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/lammem-newResources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/lammem-newResources.template.json @@ -258,7 +258,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -652,7 +652,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -663,7 +663,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -689,6 +697,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/manifest.json index bdcf9ff9d..f70ddde89 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/manifest.json @@ -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}/758511b71ca21b830411d9be4755d92fe7363e46c9505124f2394618315f3b34.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d606ade5f484d66b82535b0f683765eab111a7d94d970d7cdb91b9f511d1a91a.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -202,6 +202,12 @@ "data": "VpcFlowLog8FF33A73" } ], + "/lammem-newResources/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lammem-newResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/tree.json index 63c00924b..801fabe5f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.js.snapshot/tree.json @@ -37,13 +37,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "lammem-newResources-ingress": { @@ -72,7 +72,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", - "version": "2.118.0" + "version": "2.147.3" } }, "ec-subnetgroup-lammem-newResources": { @@ -95,7 +95,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticache.CfnSubnetGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "lammem-newResources-cluster": { @@ -123,7 +123,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticache.CfnCacheCluster", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -135,7 +135,7 @@ "path": "lammem-newResources/lammem-newResources/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -198,7 +198,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -239,19 +239,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -279,13 +279,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -301,7 +301,7 @@ "path": "lammem-newResources/lammem-newResources/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -309,13 +309,13 @@ "path": "lammem-newResources/lammem-newResources/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -362,7 +362,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -394,19 +394,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-elasticachememcached.LambdaToElasticachememcached", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -433,7 +433,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -477,7 +477,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -485,7 +485,7 @@ "path": "lammem-newResources/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -507,7 +507,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -526,13 +526,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -576,7 +576,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -584,7 +584,7 @@ "path": "lammem-newResources/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -606,7 +606,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -625,13 +625,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -643,13 +643,13 @@ "path": "lammem-newResources/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -665,7 +665,7 @@ "path": "lammem-newResources/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -696,7 +696,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -748,19 +748,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -784,13 +784,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -824,19 +824,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lammem-newResources/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -848,7 +856,7 @@ "path": "lammem-newResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -856,7 +864,7 @@ "path": "lammem-newResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -864,13 +872,13 @@ "path": "lammem-newResources/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -898,7 +906,7 @@ "path": "lammem-newResources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -906,25 +914,25 @@ "path": "lammem-newResources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -932,7 +940,7 @@ "path": "lammem-newResources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -940,13 +948,13 @@ "path": "lammem-newResources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -960,7 +968,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.ts index 20b4f344e..877b522d4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-newResources.ts @@ -17,6 +17,7 @@ import { LambdaToElasticachememcached, LambdaToElasticachememcachedProps } from import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test with new resourcesfor aws- // Definitions const props: LambdaToElasticachememcachedProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/lammem-withClientProps.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/lammem-withClientProps.assets.json index c874920a6..eb0aa480b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/lammem-withClientProps.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/lammem-withClientProps.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "b100ea90467e76cf1be8fbfe68e9a22a77c63fe20827c76b413d6d577f425215": { + "d2223c3158e5b4a83d5429fd9d8bb998cfcb32c3fc10ec7e016d9b60cff0827d": { "source": { "path": "lammem-withClientProps.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b100ea90467e76cf1be8fbfe68e9a22a77c63fe20827c76b413d6d577f425215.json", + "objectKey": "d2223c3158e5b4a83d5429fd9d8bb998cfcb32c3fc10ec7e016d9b60cff0827d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/lammem-withClientProps.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/lammem-withClientProps.template.json index 11ebf2670..bc60b0c18 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/lammem-withClientProps.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/lammem-withClientProps.template.json @@ -258,7 +258,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -652,7 +652,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -663,7 +663,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -689,6 +697,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/manifest.json index f255c1633..384890912 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/manifest.json @@ -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}/b100ea90467e76cf1be8fbfe68e9a22a77c63fe20827c76b413d6d577f425215.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d2223c3158e5b4a83d5429fd9d8bb998cfcb32c3fc10ec7e016d9b60cff0827d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -202,6 +202,12 @@ "data": "VpcFlowLog8FF33A73" } ], + "/lammem-withClientProps/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lammem-withClientProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/tree.json index 1bc95187a..c2bdaf64c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.js.snapshot/tree.json @@ -37,13 +37,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "lammem-withClientProps-ingress": { @@ -72,7 +72,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroupIngress", - "version": "2.118.0" + "version": "2.147.3" } }, "ec-subnetgroup-lammem-withClientProps": { @@ -95,7 +95,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticache.CfnSubnetGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "lammem-withClientProps-cluster": { @@ -123,7 +123,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticache.CfnCacheCluster", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -135,7 +135,7 @@ "path": "lammem-withClientProps/lammem-withClientProps/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -198,7 +198,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -239,19 +239,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -279,13 +279,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -301,7 +301,7 @@ "path": "lammem-withClientProps/lammem-withClientProps/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -309,13 +309,13 @@ "path": "lammem-withClientProps/lammem-withClientProps/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -362,7 +362,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -394,19 +394,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-elasticachememcached.LambdaToElasticachememcached", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -433,7 +433,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -477,7 +477,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -485,7 +485,7 @@ "path": "lammem-withClientProps/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -507,7 +507,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -526,13 +526,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -576,7 +576,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -584,7 +584,7 @@ "path": "lammem-withClientProps/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -606,7 +606,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -625,13 +625,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -643,13 +643,13 @@ "path": "lammem-withClientProps/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -665,7 +665,7 @@ "path": "lammem-withClientProps/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -696,7 +696,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -748,19 +748,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -784,13 +784,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -824,19 +824,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lammem-withClientProps/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -848,7 +856,7 @@ "path": "lammem-withClientProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -856,7 +864,7 @@ "path": "lammem-withClientProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -864,13 +872,13 @@ "path": "lammem-withClientProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -898,7 +906,7 @@ "path": "lammem-withClientProps/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -906,25 +914,25 @@ "path": "lammem-withClientProps/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -932,7 +940,7 @@ "path": "lammem-withClientProps/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -940,13 +948,13 @@ "path": "lammem-withClientProps/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -960,7 +968,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.ts index df8aaea5a..15a293ca5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/integ.lammem-withClientProps.ts @@ -18,6 +18,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import * as ec2 from 'aws-cdk-lib/aws-ec2'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -27,7 +28,7 @@ stack.templateOptions.description = 'Integration Test with new resourcesfor aws- // Definitions const props: LambdaToElasticachememcachedProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/lambda-elasticachememcached.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/lambda-elasticachememcached.test.ts index 758c59427..cef1aa245 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/lambda-elasticachememcached.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticachememcached/test/lambda-elasticachememcached.test.ts @@ -31,7 +31,7 @@ test("When provided a VPC, does not create a second VPC", () => { existingVpc, lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }, }); @@ -51,7 +51,7 @@ test("When provided an existingCache, does not create a second cache", () => { existingCache, lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }, }); @@ -69,7 +69,7 @@ test("When provided an existingFunction, does not create a second function", () const existingVpc = defaults.getTestVpc(stack); const existingFunction = new lambda.Function(stack, "test-function", { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", vpc: existingVpc, functionName: testFunctionName, @@ -95,7 +95,7 @@ test("Test custom environment variable name", () => { new LambdaToElasticachememcached(stack, "test-construct", { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }, cacheEndpointEnvironmentVariableName: testEnvironmentVariableName, @@ -137,7 +137,7 @@ test("Test setting custom function properties", () => { new LambdaToElasticachememcached(stack, "test-cache", { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", functionName: testFunctionName, }, @@ -155,7 +155,7 @@ test("Test setting custom cache properties", () => { new LambdaToElasticachememcached(stack, "test-cache", { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }, cacheProps: { @@ -175,7 +175,7 @@ test("Test setting custom VPC properties", () => { new LambdaToElasticachememcached(stack, "test-cache", { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }, vpcProps: { @@ -194,7 +194,7 @@ test("Test all default values", () => { new LambdaToElasticachememcached(stack, "test-cache", { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }, }); @@ -231,7 +231,7 @@ test("Test all default values", () => { }, }, Handler: ".handler", - Runtime: "nodejs16.x", + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, }); // All values taken from elasticache-defaults.ts @@ -255,7 +255,7 @@ test('Test for the proper self referencing security group', () => { new LambdaToElasticachememcached(stack, "test-cache", { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }, cacheProps: { @@ -294,7 +294,7 @@ test("Test error from existingCache and no VPC", () => { existingCache, lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }, }); @@ -311,7 +311,7 @@ test("Test error from existing function and no VPC", () => { const existingVpc = defaults.getTestVpc(stack); const existingFunction = new lambda.Function(stack, "test-function", { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", vpc: existingVpc, }); @@ -342,7 +342,7 @@ test("Test error from existingCache and cacheProps", () => { }, lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }, }); @@ -362,7 +362,7 @@ test("Test error from trying to launch Redis", () => { }, lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }, }); @@ -380,7 +380,7 @@ test("Test error from existingCache and no VPC", () => { new LambdaToElasticachememcached(stack, "testStack", { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }, vpcProps: {}, @@ -398,7 +398,7 @@ test('Confirm call to CheckLambdaProps', () => { const stack = new cdk.Stack(); const testVpc = defaults.getTestVpc(stack); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), vpc: testVpc, @@ -407,7 +407,7 @@ test('Confirm call to CheckLambdaProps', () => { const props: LambdaToElasticachememcachedProps = { existingVpc: testVpc, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/lamels-deployFunctionWithClusterConfig.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/lamels-deployFunctionWithClusterConfig.assets.json index 4c2ee5464..94b8d8956 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/lamels-deployFunctionWithClusterConfig.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/lamels-deployFunctionWithClusterConfig.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "92d9d20fdb6bec58b8af008d728839ba54e6df5b931405e18facb6b107d4e720": { + "3387ad9b75f8db9873f8e3fd12c5c441653d665a12633d56e2bebbc42b315cf4": { "source": { "path": "lamels-deployFunctionWithClusterConfig.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "92d9d20fdb6bec58b8af008d728839ba54e6df5b931405e18facb6b107d4e720.json", + "objectKey": "3387ad9b75f8db9873f8e3fd12c5c441653d665a12633d56e2bebbc42b315cf4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/lamels-deployFunctionWithClusterConfig.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/lamels-deployFunctionWithClusterConfig.template.json index d2516256b..d98457620 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/lamels-deployFunctionWithClusterConfig.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/lamels-deployFunctionWithClusterConfig.template.json @@ -151,7 +151,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1221,7 +1221,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1232,7 +1232,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1258,6 +1266,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/manifest.json index ef25de297..9f89a4389 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/manifest.json @@ -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}/92d9d20fdb6bec58b8af008d728839ba54e6df5b931405e18facb6b107d4e720.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3387ad9b75f8db9873f8e3fd12c5c441653d665a12633d56e2bebbc42b315cf4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -286,6 +286,12 @@ "data": "VpcFlowLog8FF33A73" } ], + "/lamels-deployFunctionWithClusterConfig/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamels-deployFunctionWithClusterConfig/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/tree.json index 5e00e6046..4437abf0f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamels-deployFunctionWithClusterConfig/test-lambda-elasticsearch-kibana5/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -125,19 +125,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -165,13 +165,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -187,7 +187,7 @@ "path": "lamels-deployFunctionWithClusterConfig/test-lambda-elasticsearch-kibana5/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -195,13 +195,13 @@ "path": "lamels-deployFunctionWithClusterConfig/test-lambda-elasticsearch-kibana5/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -234,7 +234,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -260,13 +260,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPool": { @@ -310,13 +310,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPoolClient": { @@ -354,13 +354,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoIdentityPool": { @@ -388,7 +388,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.147.3" } }, "UserPoolDomain": { @@ -435,7 +435,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoAuthorizedRole": { @@ -447,7 +447,7 @@ "path": "lamels-deployFunctionWithClusterConfig/test-lambda-elasticsearch-kibana5/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -548,13 +548,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IdentityPoolRoleMapping": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoKibanaConfigureRole": { @@ -590,7 +590,7 @@ "path": "lamels-deployFunctionWithClusterConfig/test-lambda-elasticsearch-kibana5/CognitoKibanaConfigureRole/ImportCognitoKibanaConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -615,13 +615,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoKibanaConfigureRolePolicy": { @@ -763,13 +763,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "ElasticsearchDomain": { @@ -950,7 +950,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticsearch.CfnDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusRedAlarm": { @@ -975,13 +975,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusYellowAlarm": { @@ -1006,13 +1006,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "FreeStorageSpaceTooLowAlarm": { @@ -1037,13 +1037,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "IndexWritesBlockedTooHighAlarm": { @@ -1068,13 +1068,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1099,13 +1099,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "CPUUtilizationTooHighAlarm": { @@ -1130,13 +1130,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1161,13 +1161,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1192,13 +1192,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1223,19 +1223,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-elasticsearch-kibana.LambdaToElasticSearchAndKibana", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -1262,7 +1262,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -1306,7 +1306,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1314,7 +1314,7 @@ "path": "lamels-deployFunctionWithClusterConfig/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1336,7 +1336,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1355,13 +1355,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -1405,7 +1405,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1413,7 +1413,7 @@ "path": "lamels-deployFunctionWithClusterConfig/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1435,7 +1435,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1454,13 +1454,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1472,13 +1472,13 @@ "path": "lamels-deployFunctionWithClusterConfig/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1494,7 +1494,7 @@ "path": "lamels-deployFunctionWithClusterConfig/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1525,7 +1525,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1577,19 +1577,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1613,13 +1613,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1653,19 +1653,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamels-deployFunctionWithClusterConfig/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1677,7 +1685,7 @@ "path": "lamels-deployFunctionWithClusterConfig/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1685,7 +1693,7 @@ "path": "lamels-deployFunctionWithClusterConfig/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1693,13 +1701,13 @@ "path": "lamels-deployFunctionWithClusterConfig/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1727,7 +1735,7 @@ "path": "lamels-deployFunctionWithClusterConfig/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1735,25 +1743,25 @@ "path": "lamels-deployFunctionWithClusterConfig/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1761,7 +1769,7 @@ "path": "lamels-deployFunctionWithClusterConfig/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1769,13 +1777,13 @@ "path": "lamels-deployFunctionWithClusterConfig/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1789,7 +1797,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.ts index 302ce408a..0363958e1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithClusterConfig.ts @@ -24,7 +24,7 @@ const stack = new Stack(app, defaults.generateIntegStackName(__filename), {}); const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/lamels-deployFunctionWithExistingVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/lamels-deployFunctionWithExistingVpc.assets.json index f124f7486..646f3dfe6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/lamels-deployFunctionWithExistingVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/lamels-deployFunctionWithExistingVpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } @@ -29,7 +29,7 @@ } } }, - "96a86975bc5b1ec274b10930551892b2e24be7128b00012cbc05ae6a1f02d25a": { + "64f045ef1a279063ea4fd2a55079c3c5a66bbd4c96d41c42d7cd4cca91a26a67": { "source": { "path": "lamels-deployFunctionWithExistingVpc.template.json", "packaging": "file" @@ -37,7 +37,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "96a86975bc5b1ec274b10930551892b2e24be7128b00012cbc05ae6a1f02d25a.json", + "objectKey": "64f045ef1a279063ea4fd2a55079c3c5a66bbd4c96d41c42d7cd4cca91a26a67.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/lamels-deployFunctionWithExistingVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/lamels-deployFunctionWithExistingVpc.template.json index accf7530f..fabdf6559 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/lamels-deployFunctionWithExistingVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/lamels-deployFunctionWithExistingVpc.template.json @@ -614,7 +614,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -625,7 +625,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -801,7 +801,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/manifest.json index bb844fed4..3e3406a90 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/96a86975bc5b1ec274b10930551892b2e24be7128b00012cbc05ae6a1f02d25a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/64f045ef1a279063ea4fd2a55079c3c5a66bbd4c96d41c42d7cd4cca91a26a67.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/tree.json index 1bc1309c1..466f27453 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "lamels-deployFunctionWithExistingVpc/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "lamels-deployFunctionWithExistingVpc/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "lamels-deployFunctionWithExistingVpc/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "lamels-deployFunctionWithExistingVpc/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "lamels-deployFunctionWithExistingVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "lamels-deployFunctionWithExistingVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,19 +835,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -859,7 +859,7 @@ "path": "lamels-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -867,7 +867,7 @@ "path": "lamels-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -875,13 +875,13 @@ "path": "lamels-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-lambda-elasticsearch-kibana4": { @@ -897,7 +897,7 @@ "path": "lamels-deployFunctionWithExistingVpc/test-lambda-elasticsearch-kibana4/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -960,7 +960,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1001,19 +1001,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -1041,13 +1041,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1063,7 +1063,7 @@ "path": "lamels-deployFunctionWithExistingVpc/test-lambda-elasticsearch-kibana4/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1071,13 +1071,13 @@ "path": "lamels-deployFunctionWithExistingVpc/test-lambda-elasticsearch-kibana4/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1110,7 +1110,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -1136,13 +1136,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPool": { @@ -1186,13 +1186,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPoolClient": { @@ -1230,13 +1230,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoIdentityPool": { @@ -1264,7 +1264,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.147.3" } }, "UserPoolDomain": { @@ -1311,7 +1311,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoAuthorizedRole": { @@ -1323,7 +1323,7 @@ "path": "lamels-deployFunctionWithExistingVpc/test-lambda-elasticsearch-kibana4/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1424,13 +1424,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IdentityPoolRoleMapping": { @@ -1454,7 +1454,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoKibanaConfigureRole": { @@ -1466,7 +1466,7 @@ "path": "lamels-deployFunctionWithExistingVpc/test-lambda-elasticsearch-kibana4/CognitoKibanaConfigureRole/ImportCognitoKibanaConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1491,13 +1491,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoKibanaConfigureRolePolicy": { @@ -1639,13 +1639,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "ElasticsearchDomain": { @@ -1826,7 +1826,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticsearch.CfnDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusRedAlarm": { @@ -1851,13 +1851,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusYellowAlarm": { @@ -1882,13 +1882,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "FreeStorageSpaceTooLowAlarm": { @@ -1913,13 +1913,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "IndexWritesBlockedTooHighAlarm": { @@ -1944,13 +1944,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1975,13 +1975,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "CPUUtilizationTooHighAlarm": { @@ -2006,13 +2006,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "JVMMemoryPressureTooHighAlarm": { @@ -2037,13 +2037,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -2068,13 +2068,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -2099,19 +2099,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-elasticsearch-kibana.LambdaToElasticSearchAndKibana", - "version": "2.51.0" + "version": "2.60.0" } }, "Integ": { @@ -2139,7 +2139,7 @@ "path": "lamels-deployFunctionWithExistingVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2147,25 +2147,25 @@ "path": "lamels-deployFunctionWithExistingVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2173,7 +2173,7 @@ "path": "lamels-deployFunctionWithExistingVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2181,13 +2181,13 @@ "path": "lamels-deployFunctionWithExistingVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -2201,7 +2201,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.ts index da8fdb678..2751f8256 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithExistingVpc.ts @@ -34,7 +34,7 @@ const vpc = defaults.getTestVpc(stack); const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/lamels-deployFunctionWithVpcProps.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/lamels-deployFunctionWithVpcProps.assets.json index b7dfa0a4d..d174114c4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/lamels-deployFunctionWithVpcProps.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/lamels-deployFunctionWithVpcProps.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } @@ -29,7 +29,7 @@ } } }, - "46912325e78ca4d93023bd4220790158ebe8048ea009da38ed9348a6810ba9fa": { + "8b47cc86e2f5fd6dec42d3577f3be6ee34460c2e9e113c18347c602f6aef5ec7": { "source": { "path": "lamels-deployFunctionWithVpcProps.template.json", "packaging": "file" @@ -37,7 +37,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "46912325e78ca4d93023bd4220790158ebe8048ea009da38ed9348a6810ba9fa.json", + "objectKey": "8b47cc86e2f5fd6dec42d3577f3be6ee34460c2e9e113c18347c602f6aef5ec7.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/lamels-deployFunctionWithVpcProps.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/lamels-deployFunctionWithVpcProps.template.json index 690f0370d..0e1071dec 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/lamels-deployFunctionWithVpcProps.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/lamels-deployFunctionWithVpcProps.template.json @@ -151,7 +151,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1213,7 +1213,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1224,7 +1224,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/manifest.json index 403d0b6f0..f510090e4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/46912325e78ca4d93023bd4220790158ebe8048ea009da38ed9348a6810ba9fa.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/8b47cc86e2f5fd6dec42d3577f3be6ee34460c2e9e113c18347c602f6aef5ec7.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/tree.json index cf78f74dd..a54f5cd95 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamels-deployFunctionWithVpcProps/test-lambda-elasticsearch-kibana3/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -125,19 +125,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -165,13 +165,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -187,7 +187,7 @@ "path": "lamels-deployFunctionWithVpcProps/test-lambda-elasticsearch-kibana3/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -195,13 +195,13 @@ "path": "lamels-deployFunctionWithVpcProps/test-lambda-elasticsearch-kibana3/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -234,7 +234,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -260,13 +260,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPool": { @@ -310,13 +310,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPoolClient": { @@ -354,13 +354,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoIdentityPool": { @@ -388,7 +388,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.147.3" } }, "UserPoolDomain": { @@ -435,7 +435,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoAuthorizedRole": { @@ -447,7 +447,7 @@ "path": "lamels-deployFunctionWithVpcProps/test-lambda-elasticsearch-kibana3/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -548,13 +548,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IdentityPoolRoleMapping": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoKibanaConfigureRole": { @@ -590,7 +590,7 @@ "path": "lamels-deployFunctionWithVpcProps/test-lambda-elasticsearch-kibana3/CognitoKibanaConfigureRole/ImportCognitoKibanaConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -615,13 +615,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoKibanaConfigureRolePolicy": { @@ -763,13 +763,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "ElasticsearchDomain": { @@ -950,7 +950,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticsearch.CfnDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusRedAlarm": { @@ -975,13 +975,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusYellowAlarm": { @@ -1006,13 +1006,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "FreeStorageSpaceTooLowAlarm": { @@ -1037,13 +1037,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "IndexWritesBlockedTooHighAlarm": { @@ -1068,13 +1068,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1099,13 +1099,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "CPUUtilizationTooHighAlarm": { @@ -1130,13 +1130,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1161,13 +1161,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1192,13 +1192,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1223,19 +1223,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-elasticsearch-kibana.LambdaToElasticSearchAndKibana", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -1262,7 +1262,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -1306,7 +1306,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1314,7 +1314,7 @@ "path": "lamels-deployFunctionWithVpcProps/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1336,7 +1336,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1355,13 +1355,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -1405,7 +1405,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1413,7 +1413,7 @@ "path": "lamels-deployFunctionWithVpcProps/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1435,7 +1435,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1454,13 +1454,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1472,13 +1472,13 @@ "path": "lamels-deployFunctionWithVpcProps/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1494,7 +1494,7 @@ "path": "lamels-deployFunctionWithVpcProps/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1525,7 +1525,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1577,19 +1577,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1613,13 +1613,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1653,19 +1653,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1677,7 +1677,7 @@ "path": "lamels-deployFunctionWithVpcProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1685,7 +1685,7 @@ "path": "lamels-deployFunctionWithVpcProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1693,13 +1693,13 @@ "path": "lamels-deployFunctionWithVpcProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1727,7 +1727,7 @@ "path": "lamels-deployFunctionWithVpcProps/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1735,25 +1735,25 @@ "path": "lamels-deployFunctionWithVpcProps/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1761,7 +1761,7 @@ "path": "lamels-deployFunctionWithVpcProps/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1769,13 +1769,13 @@ "path": "lamels-deployFunctionWithVpcProps/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1789,7 +1789,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.ts index 02d6ecad6..ec79e211b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployFunctionWithVpcProps.ts @@ -33,7 +33,7 @@ const stack = new Stack(app, defaults.generateIntegStackName(__filename), { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/lamels-deployToFiveZones.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/lamels-deployToFiveZones.assets.json index 810c27a07..68c2ae17f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/lamels-deployToFiveZones.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/lamels-deployToFiveZones.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "7826b8cd355347991439c0b9d397fb3e1b8b7ba6504fefa9b2fffd416b0cbd5d": { + "037b5294e2331c66a95a18b1296cf78a70dd2858cd470dd4c84ad938768d6d4b": { "source": { "path": "lamels-deployToFiveZones.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7826b8cd355347991439c0b9d397fb3e1b8b7ba6504fefa9b2fffd416b0cbd5d.json", + "objectKey": "037b5294e2331c66a95a18b1296cf78a70dd2858cd470dd4c84ad938768d6d4b.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/lamels-deployToFiveZones.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/lamels-deployToFiveZones.template.json index 4eaa853be..f3bc4256a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/lamels-deployToFiveZones.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/lamels-deployToFiveZones.template.json @@ -151,7 +151,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1221,7 +1221,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1232,7 +1232,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1258,6 +1266,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/manifest.json index e7b466d9d..a8662d77f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/manifest.json @@ -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}/7826b8cd355347991439c0b9d397fb3e1b8b7ba6504fefa9b2fffd416b0cbd5d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/037b5294e2331c66a95a18b1296cf78a70dd2858cd470dd4c84ad938768d6d4b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -286,6 +286,12 @@ "data": "VpcFlowLog8FF33A73" } ], + "/lamels-deployToFiveZones/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamels-deployToFiveZones/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/tree.json index b00d822b3..3c748811f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamels-deployToFiveZones/test-lambda-elasticsearch-kibana/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -125,19 +125,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -165,13 +165,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -187,7 +187,7 @@ "path": "lamels-deployToFiveZones/test-lambda-elasticsearch-kibana/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -195,13 +195,13 @@ "path": "lamels-deployToFiveZones/test-lambda-elasticsearch-kibana/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -234,7 +234,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -260,13 +260,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPool": { @@ -310,13 +310,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPoolClient": { @@ -354,13 +354,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoIdentityPool": { @@ -388,7 +388,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.147.3" } }, "UserPoolDomain": { @@ -435,7 +435,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoAuthorizedRole": { @@ -447,7 +447,7 @@ "path": "lamels-deployToFiveZones/test-lambda-elasticsearch-kibana/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -548,13 +548,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IdentityPoolRoleMapping": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoKibanaConfigureRole": { @@ -590,7 +590,7 @@ "path": "lamels-deployToFiveZones/test-lambda-elasticsearch-kibana/CognitoKibanaConfigureRole/ImportCognitoKibanaConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -615,13 +615,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoKibanaConfigureRolePolicy": { @@ -763,13 +763,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "ElasticsearchDomain": { @@ -950,7 +950,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticsearch.CfnDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusRedAlarm": { @@ -975,13 +975,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusYellowAlarm": { @@ -1006,13 +1006,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "FreeStorageSpaceTooLowAlarm": { @@ -1037,13 +1037,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "IndexWritesBlockedTooHighAlarm": { @@ -1068,13 +1068,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1099,13 +1099,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "CPUUtilizationTooHighAlarm": { @@ -1130,13 +1130,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1161,13 +1161,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1192,13 +1192,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1223,19 +1223,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-elasticsearch-kibana.LambdaToElasticSearchAndKibana", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -1262,7 +1262,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -1306,7 +1306,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1314,7 +1314,7 @@ "path": "lamels-deployToFiveZones/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1336,7 +1336,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1355,13 +1355,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -1405,7 +1405,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1413,7 +1413,7 @@ "path": "lamels-deployToFiveZones/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1435,7 +1435,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1454,13 +1454,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1472,13 +1472,13 @@ "path": "lamels-deployToFiveZones/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1494,7 +1494,7 @@ "path": "lamels-deployToFiveZones/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1525,7 +1525,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1577,19 +1577,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1613,13 +1613,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1653,19 +1653,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamels-deployToFiveZones/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1677,7 +1685,7 @@ "path": "lamels-deployToFiveZones/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1685,7 +1693,7 @@ "path": "lamels-deployToFiveZones/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1693,13 +1701,13 @@ "path": "lamels-deployToFiveZones/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1727,7 +1735,7 @@ "path": "lamels-deployToFiveZones/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1735,25 +1743,25 @@ "path": "lamels-deployToFiveZones/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1761,7 +1769,7 @@ "path": "lamels-deployToFiveZones/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1769,13 +1777,13 @@ "path": "lamels-deployToFiveZones/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1789,7 +1797,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.ts index 00898ef7d..b84fb35f0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-deployToFiveZones.ts @@ -24,7 +24,7 @@ const stack = new Stack(app, defaults.generateIntegStackName(__filename), {}); const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/lamels-disabledZoneAwareness.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/lamels-disabledZoneAwareness.assets.json index 2cd228f5f..13b101288 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/lamels-disabledZoneAwareness.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/lamels-disabledZoneAwareness.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "fa078f162ad31aec984d87d3aea9d75c7b250dabc75cf57f4af14d8eefae1982": { + "b9ba2c7f1434e3055a5c6fdf111d0d3e177c402c2bbfdb0db01c373bcce53a01": { "source": { "path": "lamels-disabledZoneAwareness.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fa078f162ad31aec984d87d3aea9d75c7b250dabc75cf57f4af14d8eefae1982.json", + "objectKey": "b9ba2c7f1434e3055a5c6fdf111d0d3e177c402c2bbfdb0db01c373bcce53a01.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/lamels-disabledZoneAwareness.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/lamels-disabledZoneAwareness.template.json index 325277125..1ff1b77b8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/lamels-disabledZoneAwareness.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/lamels-disabledZoneAwareness.template.json @@ -151,7 +151,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1154,7 +1154,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1165,7 +1165,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1191,6 +1199,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/manifest.json index 6afaf8283..e5ceaa63e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/manifest.json @@ -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}/fa078f162ad31aec984d87d3aea9d75c7b250dabc75cf57f4af14d8eefae1982.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b9ba2c7f1434e3055a5c6fdf111d0d3e177c402c2bbfdb0db01c373bcce53a01.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -268,6 +268,12 @@ "data": "VpcFlowLog8FF33A73" } ], + "/lamels-disabledZoneAwareness/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamels-disabledZoneAwareness/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/tree.json index 2366f0b0c..99a8ab2aa 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamels-disabledZoneAwareness/test-lambda-elasticsearch-kibana/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -125,19 +125,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -165,13 +165,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -187,7 +187,7 @@ "path": "lamels-disabledZoneAwareness/test-lambda-elasticsearch-kibana/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -195,13 +195,13 @@ "path": "lamels-disabledZoneAwareness/test-lambda-elasticsearch-kibana/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -234,7 +234,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -257,13 +257,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPool": { @@ -307,13 +307,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPoolClient": { @@ -351,13 +351,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoIdentityPool": { @@ -385,7 +385,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.147.3" } }, "UserPoolDomain": { @@ -432,7 +432,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoAuthorizedRole": { @@ -444,7 +444,7 @@ "path": "lamels-disabledZoneAwareness/test-lambda-elasticsearch-kibana/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -545,13 +545,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IdentityPoolRoleMapping": { @@ -575,7 +575,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoKibanaConfigureRole": { @@ -587,7 +587,7 @@ "path": "lamels-disabledZoneAwareness/test-lambda-elasticsearch-kibana/CognitoKibanaConfigureRole/ImportCognitoKibanaConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -612,13 +612,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoKibanaConfigureRolePolicy": { @@ -760,13 +760,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "ElasticsearchDomain": { @@ -941,7 +941,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticsearch.CfnDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusRedAlarm": { @@ -966,13 +966,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusYellowAlarm": { @@ -997,13 +997,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "FreeStorageSpaceTooLowAlarm": { @@ -1028,13 +1028,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "IndexWritesBlockedTooHighAlarm": { @@ -1059,13 +1059,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1090,13 +1090,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "CPUUtilizationTooHighAlarm": { @@ -1121,13 +1121,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1152,13 +1152,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1183,13 +1183,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1214,19 +1214,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-elasticsearch-kibana.LambdaToElasticSearchAndKibana", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -1253,7 +1253,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -1297,7 +1297,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1305,7 +1305,7 @@ "path": "lamels-disabledZoneAwareness/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1327,7 +1327,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1346,13 +1346,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1364,13 +1364,13 @@ "path": "lamels-disabledZoneAwareness/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1386,7 +1386,7 @@ "path": "lamels-disabledZoneAwareness/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1417,7 +1417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1469,19 +1469,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1505,13 +1505,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1545,19 +1545,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamels-disabledZoneAwareness/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1569,7 +1577,7 @@ "path": "lamels-disabledZoneAwareness/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1577,7 +1585,7 @@ "path": "lamels-disabledZoneAwareness/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1585,13 +1593,13 @@ "path": "lamels-disabledZoneAwareness/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1619,7 +1627,7 @@ "path": "lamels-disabledZoneAwareness/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1627,25 +1635,25 @@ "path": "lamels-disabledZoneAwareness/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1653,7 +1661,7 @@ "path": "lamels-disabledZoneAwareness/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1661,13 +1669,13 @@ "path": "lamels-disabledZoneAwareness/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1681,7 +1689,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.ts index fd6297dc8..132dc3bd0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-disabledZoneAwareness.ts @@ -24,7 +24,7 @@ const stack = new Stack(app, defaults.generateIntegStackName(__filename), {}); const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/lamels-domain-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/lamels-domain-arguments.assets.json index 35fc508a8..145f53b55 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/lamels-domain-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/lamels-domain-arguments.assets.json @@ -14,7 +14,7 @@ } } }, - "1c908f9559c76931b95e80b67fbe66ec9ce90da7d8cb218257195edc500e1cff": { + "22b047f96dad6f536b064f62a9a8af457e3ba2fda140d16b4bddeaca73706ff5": { "source": { "path": "lamels-domain-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "1c908f9559c76931b95e80b67fbe66ec9ce90da7d8cb218257195edc500e1cff.json", + "objectKey": "22b047f96dad6f536b064f62a9a8af457e3ba2fda140d16b4bddeaca73706ff5.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/lamels-domain-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/lamels-domain-arguments.template.json index c91e16645..113a8da12 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/lamels-domain-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/lamels-domain-arguments.template.json @@ -116,7 +116,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/manifest.json index 57c6ef3e7..40e054ab8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/manifest.json @@ -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}/1c908f9559c76931b95e80b67fbe66ec9ce90da7d8cb218257195edc500e1cff.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/22b047f96dad6f536b064f62a9a8af457e3ba2fda140d16b4bddeaca73706ff5.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/tree.json index fb26e412d..3d6d2ed75 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamels-domain-arguments/test-lambda-elasticsearch-kibana2/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -120,19 +120,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -148,7 +148,7 @@ "path": "lamels-domain-arguments/test-lambda-elasticsearch-kibana2/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -156,13 +156,13 @@ "path": "lamels-domain-arguments/test-lambda-elasticsearch-kibana2/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -195,7 +195,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -203,13 +203,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoUserPool": { @@ -253,13 +253,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoUserPoolClient": { @@ -297,13 +297,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoIdentityPool": { @@ -331,7 +331,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.145.0" } }, "UserPoolDomain": { @@ -378,7 +378,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoAuthorizedRole": { @@ -390,7 +390,7 @@ "path": "lamels-domain-arguments/test-lambda-elasticsearch-kibana2/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -491,13 +491,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "IdentityPoolRoleMapping": { @@ -521,7 +521,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoKibanaConfigureRole": { @@ -533,7 +533,7 @@ "path": "lamels-domain-arguments/test-lambda-elasticsearch-kibana2/CognitoKibanaConfigureRole/ImportCognitoKibanaConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -558,13 +558,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoKibanaConfigureRolePolicy": { @@ -706,13 +706,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } }, "ElasticsearchDomain": { @@ -875,7 +875,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticsearch.CfnDomain", - "version": "2.118.0" + "version": "2.145.0" } }, "StatusRedAlarm": { @@ -900,13 +900,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "StatusYellowAlarm": { @@ -931,13 +931,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "FreeStorageSpaceTooLowAlarm": { @@ -962,13 +962,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "IndexWritesBlockedTooHighAlarm": { @@ -993,13 +993,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1024,13 +1024,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "CPUUtilizationTooHighAlarm": { @@ -1055,13 +1055,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1086,13 +1086,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1117,13 +1117,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1148,19 +1148,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-elasticsearch-kibana.LambdaToElasticSearchAndKibana", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -1176,7 +1176,7 @@ "path": "lamels-domain-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -1188,7 +1188,7 @@ "path": "lamels-domain-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1196,25 +1196,25 @@ "path": "lamels-domain-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -1222,7 +1222,7 @@ "path": "lamels-domain-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1230,13 +1230,13 @@ "path": "lamels-domain-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -1244,13 +1244,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.ts index 118cdd841..24262dcfc 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-domain-arguments.ts @@ -17,6 +17,7 @@ import { LambdaToElasticSearchAndKibana } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, CreateShortUniqueTestName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -24,7 +25,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/lamels-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/lamels-no-arguments.assets.json index 85fbc6b6c..7ddc77e34 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/lamels-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/lamels-no-arguments.assets.json @@ -14,7 +14,7 @@ } } }, - "772f4d33c62943cd1b3c9cb1dc0da0f1338e350cc73bd6947a2f1373f2f8ae22": { + "0d5efd6c143923318d9845cdcb4850b57ecf9069928a199640a03c575f356ce4": { "source": { "path": "lamels-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "772f4d33c62943cd1b3c9cb1dc0da0f1338e350cc73bd6947a2f1373f2f8ae22.json", + "objectKey": "0d5efd6c143923318d9845cdcb4850b57ecf9069928a199640a03c575f356ce4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/lamels-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/lamels-no-arguments.template.json index f3658faa0..26071d27a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/lamels-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/lamels-no-arguments.template.json @@ -116,7 +116,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/manifest.json index 2d3d3ca3b..bdb19300d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/manifest.json @@ -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}/772f4d33c62943cd1b3c9cb1dc0da0f1338e350cc73bd6947a2f1373f2f8ae22.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0d5efd6c143923318d9845cdcb4850b57ecf9069928a199640a03c575f356ce4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/tree.json index d4a713e1d..af64852fa 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamels-no-arguments/test-lambda-elasticsearch-kibana/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -120,19 +120,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -148,7 +148,7 @@ "path": "lamels-no-arguments/test-lambda-elasticsearch-kibana/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -156,13 +156,13 @@ "path": "lamels-no-arguments/test-lambda-elasticsearch-kibana/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -195,7 +195,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -203,13 +203,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoUserPool": { @@ -253,13 +253,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoUserPoolClient": { @@ -297,13 +297,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoIdentityPool": { @@ -331,7 +331,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.145.0" } }, "UserPoolDomain": { @@ -378,7 +378,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoAuthorizedRole": { @@ -390,7 +390,7 @@ "path": "lamels-no-arguments/test-lambda-elasticsearch-kibana/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -491,13 +491,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "IdentityPoolRoleMapping": { @@ -521,7 +521,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoKibanaConfigureRole": { @@ -533,7 +533,7 @@ "path": "lamels-no-arguments/test-lambda-elasticsearch-kibana/CognitoKibanaConfigureRole/ImportCognitoKibanaConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -558,13 +558,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoKibanaConfigureRolePolicy": { @@ -706,13 +706,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } }, "ElasticsearchDomain": { @@ -875,7 +875,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticsearch.CfnDomain", - "version": "2.118.0" + "version": "2.145.0" } }, "StatusRedAlarm": { @@ -900,13 +900,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "StatusYellowAlarm": { @@ -931,13 +931,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "FreeStorageSpaceTooLowAlarm": { @@ -962,13 +962,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "IndexWritesBlockedTooHighAlarm": { @@ -993,13 +993,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1024,13 +1024,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "CPUUtilizationTooHighAlarm": { @@ -1055,13 +1055,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1086,13 +1086,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1117,13 +1117,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1148,19 +1148,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-elasticsearch-kibana.LambdaToElasticSearchAndKibana", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -1176,7 +1176,7 @@ "path": "lamels-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -1188,7 +1188,7 @@ "path": "lamels-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1196,25 +1196,25 @@ "path": "lamels-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -1222,7 +1222,7 @@ "path": "lamels-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1230,13 +1230,13 @@ "path": "lamels-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -1244,13 +1244,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.ts index 98e4bfdd1..e339d4eae 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/integ.lamels-no-arguments.ts @@ -17,6 +17,7 @@ import { LambdaToElasticSearchAndKibana } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, CreateShortUniqueTestName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -24,7 +25,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/lambda-elasticsearch-kibana.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/lambda-elasticsearch-kibana.test.ts index 4cdb919b1..7dedc45f4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/lambda-elasticsearch-kibana.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-elasticsearch-kibana/test/lambda-elasticsearch-kibana.test.ts @@ -125,7 +125,7 @@ test('check lambda function custom environment variable', () => { const template = Template.fromStack(stack); template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', @@ -564,7 +564,7 @@ test('Test error for Elasticsearch domain VPC props', () => { function getDefaultTestLambdaProps(): lambda.FunctionProps { return { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }; } @@ -591,7 +591,7 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new cdk.Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -599,7 +599,7 @@ test('Confirm call to CheckLambdaProps', () => { const props: LambdaToElasticSearchAndKibanaProps = { domainName: 'name', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/aws-lambda-eventbridge.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/aws-lambda-eventbridge.test.ts index ca46ce863..f91665d58 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/aws-lambda-eventbridge.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/aws-lambda-eventbridge.test.ts @@ -18,6 +18,7 @@ import * as events from "aws-cdk-lib/aws-events"; import * as ec2 from "aws-cdk-lib/aws-ec2"; import { LambdaToEventbridge, LambdaToEventbridgeProps } from '../lib'; import { Template } from 'aws-cdk-lib/assertions'; +import * as defaults from "@aws-solutions-constructs/core"; const xrayPolicyStatement = { Action: [ @@ -79,7 +80,7 @@ test('Test minimal deployment with new Lambda function', () => { // Helper declaration const construct = new LambdaToEventbridge(stack, 'lambda-to-eventbridge-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } @@ -128,7 +129,7 @@ test("Confirm CheckVpcProps is being called", () => { // Helper declaration new LambdaToEventbridge(stack, "lambda-to-eventbridge-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -148,7 +149,7 @@ test("Confirm CheckEventBridgeProps is called", () => { // Helper declaration new LambdaToEventbridge(stack, 'lambda-to-eventbridge-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -170,7 +171,7 @@ test('Test deployment w/ existing eventbus', () => { new LambdaToEventbridge(stack, 'lambda-to-eventbridge-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -207,7 +208,7 @@ test("Test minimal deployment that deploys a VPC without vpcProps", () => { // Helper declaration new LambdaToEventbridge(stack, "lambda-to-eventbridge-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -236,7 +237,7 @@ test("Test minimal deployment that deploys a VPC w/vpcProps", () => { // Helper declaration new LambdaToEventbridge(stack, "lambda-to-eventbridge-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -274,7 +275,7 @@ test("Test minimal deployment with an existing VPC", () => { // Helper declaration new LambdaToEventbridge(stack, "lambda-to-eventbridge-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -334,7 +335,7 @@ test("Test minimal deployment with an existing VPC and existing Lambda function const stack = new Stack(); const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -363,7 +364,7 @@ test('Test lambda function custom environment variable', () => { // Helper declaration new LambdaToEventbridge(stack, 'lambda-to-eventbridge-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -375,7 +376,7 @@ test('Test lambda function custom environment variable', () => { const template = Template.fromStack(stack); template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', @@ -416,7 +417,7 @@ test('check multiple constructs in a single stack', () => { const props: LambdaToEventbridgeProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, eventBusProps: { eventBusName: 'test' } @@ -433,7 +434,7 @@ test('check multiple lambda functions publishing to single event bus', () => { const props1: LambdaToEventbridgeProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, eventBusProps: { eventBusName: 'test' } @@ -443,7 +444,7 @@ test('check multiple lambda functions publishing to single event bus', () => { const props2: LambdaToEventbridgeProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingEventBusInterface: construct.eventBus @@ -479,7 +480,7 @@ test('check multiple lambda functions publishing to single event bus', () => { // Check environment variables template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', @@ -495,14 +496,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: LambdaToEventbridgeProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/lamevt-deployFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/lamevt-deployFunction.assets.json index ec0e70de4..995747faf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/lamevt-deployFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/lamevt-deployFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "7a98f8f881852f6845fb1429844edde314ab0330da86abcad6011f87eb4ae819": { + "3b2aaa70cea86f88ec66898b018542736c188b382e0db3d684703e3bfeffdc42": { "source": { "path": "lamevt-deployFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7a98f8f881852f6845fb1429844edde314ab0330da86abcad6011f87eb4ae819.json", + "objectKey": "3b2aaa70cea86f88ec66898b018542736c188b382e0db3d684703e3bfeffdc42.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/lamevt-deployFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/lamevt-deployFunction.template.json index 366e213df..2f7825964 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/lamevt-deployFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/lamevt-deployFunction.template.json @@ -136,7 +136,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/manifest.json index 928066f66..0efadea45 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/manifest.json @@ -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}/7a98f8f881852f6845fb1429844edde314ab0330da86abcad6011f87eb4ae819.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3b2aaa70cea86f88ec66898b018542736c188b382e0db3d684703e3bfeffdc42.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/tree.json index a15a4307f..afd5978b6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamevt-deployFunction/test-lambda-eventbridge/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -144,19 +144,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -172,7 +172,7 @@ "path": "lamevt-deployFunction/test-lambda-eventbridge/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -180,13 +180,13 @@ "path": "lamevt-deployFunction/test-lambda-eventbridge/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -214,7 +214,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -222,13 +222,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "default-event-bus": { @@ -236,13 +236,13 @@ "path": "lamevt-deployFunction/test-lambda-eventbridge/default-event-bus", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-eventbridge.LambdaToEventbridge", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -258,7 +258,7 @@ "path": "lamevt-deployFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -270,7 +270,7 @@ "path": "lamevt-deployFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -278,25 +278,25 @@ "path": "lamevt-deployFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -304,7 +304,7 @@ "path": "lamevt-deployFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -312,13 +312,13 @@ "path": "lamevt-deployFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -326,13 +326,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.ts index 6c476ae05..da3c6af77 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunction.ts @@ -17,6 +17,7 @@ import { LambdaToEventbridge, LambdaToEventbridgeProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from "@aws-solutions-constructs/core"; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-eventbridge // Definitions const props: LambdaToEventbridgeProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/lamevt-deployFunctionWithNewEventBus.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/lamevt-deployFunctionWithNewEventBus.assets.json index 20a05afbd..434d155f8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/lamevt-deployFunctionWithNewEventBus.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/lamevt-deployFunctionWithNewEventBus.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "f7f3bc47729cec23f57d9261a0b4563be51e8bd81176744c2a652fd7c74a7459": { + "2ecb5c151ee95861ae9db34854f13c5845f40ad319f8e5b35965f76a8f226ebf": { "source": { "path": "lamevt-deployFunctionWithNewEventBus.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f7f3bc47729cec23f57d9261a0b4563be51e8bd81176744c2a652fd7c74a7459.json", + "objectKey": "2ecb5c151ee95861ae9db34854f13c5845f40ad319f8e5b35965f76a8f226ebf.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/lamevt-deployFunctionWithNewEventBus.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/lamevt-deployFunctionWithNewEventBus.template.json index aef1e4365..091929beb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/lamevt-deployFunctionWithNewEventBus.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/lamevt-deployFunctionWithNewEventBus.template.json @@ -159,7 +159,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -591,7 +591,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -602,7 +602,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -686,6 +694,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/manifest.json index 0426aca25..da513519d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/manifest.json @@ -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}/f7f3bc47729cec23f57d9261a0b4563be51e8bd81176744c2a652fd7c74a7459.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2ecb5c151ee95861ae9db34854f13c5845f40ad319f8e5b35965f76a8f226ebf.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -190,6 +190,12 @@ "data": "VpcCLOUDWATCHEVENTS1A0DAFBF" } ], + "/lamevt-deployFunctionWithNewEventBus/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamevt-deployFunctionWithNewEventBus/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/tree.json index ac6de2402..d9c443b05 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamevt-deployFunctionWithNewEventBus/test-lambda-eventbridge/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -135,19 +135,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -175,13 +175,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -197,7 +197,7 @@ "path": "lamevt-deployFunctionWithNewEventBus/test-lambda-eventbridge/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -205,13 +205,13 @@ "path": "lamevt-deployFunctionWithNewEventBus/test-lambda-eventbridge/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -241,7 +241,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -267,13 +267,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "CustomEventBus": { @@ -291,19 +291,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-eventbridge.LambdaToEventbridge", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -330,7 +330,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -374,7 +374,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -382,7 +382,7 @@ "path": "lamevt-deployFunctionWithNewEventBus/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -404,7 +404,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -423,13 +423,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -473,7 +473,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -481,7 +481,7 @@ "path": "lamevt-deployFunctionWithNewEventBus/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -503,7 +503,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -522,13 +522,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -540,13 +540,13 @@ "path": "lamevt-deployFunctionWithNewEventBus/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -562,7 +562,7 @@ "path": "lamevt-deployFunctionWithNewEventBus/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -593,7 +593,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -645,19 +645,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -681,13 +681,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -721,13 +721,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "CLOUDWATCH_EVENTS": { @@ -777,19 +777,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamevt-deployFunctionWithNewEventBus/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -801,7 +809,7 @@ "path": "lamevt-deployFunctionWithNewEventBus/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -809,7 +817,7 @@ "path": "lamevt-deployFunctionWithNewEventBus/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -817,13 +825,13 @@ "path": "lamevt-deployFunctionWithNewEventBus/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "lamevt-deployFunctionWithNewEventBus-CLOUDWATCH_EVENTS-security-group": { @@ -879,13 +887,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -913,7 +921,7 @@ "path": "lamevt-deployFunctionWithNewEventBus/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -921,25 +929,25 @@ "path": "lamevt-deployFunctionWithNewEventBus/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -947,7 +955,7 @@ "path": "lamevt-deployFunctionWithNewEventBus/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -955,13 +963,13 @@ "path": "lamevt-deployFunctionWithNewEventBus/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -975,7 +983,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.ts index 8ca4d4b59..3ccb5adef 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithNewEventBus.ts @@ -17,6 +17,7 @@ import { LambdaToEventbridge, LambdaToEventbridgeProps } from "../lib"; import * as lambda from "aws-cdk-lib/aws-lambda"; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from "@aws-solutions-constructs/core"; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = "Integration Test for aws-lambda-eventbridge // Definitions const props: LambdaToEventbridgeProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/lamevt-deployFunctionWithVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/lamevt-deployFunctionWithVpc.assets.json index 66026d6e2..e0e0cfbe2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/lamevt-deployFunctionWithVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/lamevt-deployFunctionWithVpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "34444e04f545390fc59a3f1898f0b59caa08032b44f9f7f3c3af461fb17cfef8": { + "335957c0e84d316e16856e7dc736df0aa2e4bbe4e66a1eb9a3bfa790ac6cfad6": { "source": { "path": "lamevt-deployFunctionWithVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "34444e04f545390fc59a3f1898f0b59caa08032b44f9f7f3c3af461fb17cfef8.json", + "objectKey": "335957c0e84d316e16856e7dc736df0aa2e4bbe4e66a1eb9a3bfa790ac6cfad6.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/lamevt-deployFunctionWithVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/lamevt-deployFunctionWithVpc.template.json index b08d71ae0..c4009b4fd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/lamevt-deployFunctionWithVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/lamevt-deployFunctionWithVpc.template.json @@ -171,7 +171,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -597,7 +597,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -608,7 +608,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -692,6 +700,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/manifest.json index bf9a5f98f..af3378d38 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/manifest.json @@ -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}/34444e04f545390fc59a3f1898f0b59caa08032b44f9f7f3c3af461fb17cfef8.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/335957c0e84d316e16856e7dc736df0aa2e4bbe4e66a1eb9a3bfa790ac6cfad6.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -184,6 +184,12 @@ "data": "VpcCLOUDWATCHEVENTS1A0DAFBF" } ], + "/lamevt-deployFunctionWithVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamevt-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/tree.json index da65229bd..2af98bf24 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamevt-deployFunctionWithVpc/test-lambda-eventbridge/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -149,19 +149,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -189,13 +189,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -211,7 +211,7 @@ "path": "lamevt-deployFunctionWithVpc/test-lambda-eventbridge/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -219,13 +219,13 @@ "path": "lamevt-deployFunctionWithVpc/test-lambda-eventbridge/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -253,7 +253,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -279,13 +279,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "default-event-bus": { @@ -293,13 +293,13 @@ "path": "lamevt-deployFunctionWithVpc/test-lambda-eventbridge/default-event-bus", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-eventbridge.LambdaToEventbridge", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -326,7 +326,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -370,7 +370,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -378,7 +378,7 @@ "path": "lamevt-deployFunctionWithVpc/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -400,7 +400,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -419,13 +419,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -469,7 +469,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -477,7 +477,7 @@ "path": "lamevt-deployFunctionWithVpc/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -499,7 +499,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -518,13 +518,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -536,13 +536,13 @@ "path": "lamevt-deployFunctionWithVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -558,7 +558,7 @@ "path": "lamevt-deployFunctionWithVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -589,7 +589,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -641,19 +641,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -677,13 +677,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -717,13 +717,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "CLOUDWATCH_EVENTS": { @@ -773,19 +773,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamevt-deployFunctionWithVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -797,7 +805,7 @@ "path": "lamevt-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -805,7 +813,7 @@ "path": "lamevt-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -813,13 +821,13 @@ "path": "lamevt-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "lamevt-deployFunctionWithVpc-CLOUDWATCH_EVENTS-security-group": { @@ -875,13 +883,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -909,7 +917,7 @@ "path": "lamevt-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -917,25 +925,25 @@ "path": "lamevt-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -943,7 +951,7 @@ "path": "lamevt-deployFunctionWithVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -951,13 +959,13 @@ "path": "lamevt-deployFunctionWithVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -971,7 +979,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.ts index a10ab702d..b5e676441 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-deployFunctionWithVpc.ts @@ -17,6 +17,7 @@ import { LambdaToEventbridge, LambdaToEventbridgeProps } from "../lib"; import * as lambda from "aws-cdk-lib/aws-lambda"; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from "@aws-solutions-constructs/core"; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = "Integration Test for aws-lambda-eventbridge // Definitions const props: LambdaToEventbridgeProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/lamevt-existingEventBus.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/lamevt-existingEventBus.assets.json index e47b7b11d..1fd4bb619 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/lamevt-existingEventBus.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/lamevt-existingEventBus.assets.json @@ -14,7 +14,7 @@ } } }, - "071ea882239019b3ff66eacc52d9139422656d35783a8cf7f23eca5f00950e2b": { + "a6f5675ecff4913847878d898f96d035e8fc4d1e9f93b7e9b2ecebe097ed6fd4": { "source": { "path": "lamevt-existingEventBus.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "071ea882239019b3ff66eacc52d9139422656d35783a8cf7f23eca5f00950e2b.json", + "objectKey": "a6f5675ecff4913847878d898f96d035e8fc4d1e9f93b7e9b2ecebe097ed6fd4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/lamevt-existingEventBus.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/lamevt-existingEventBus.template.json index 3ffa74282..2b42c8957 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/lamevt-existingEventBus.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/lamevt-existingEventBus.template.json @@ -124,7 +124,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/manifest.json index 630d9510a..5f64c1059 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/manifest.json @@ -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}/071ea882239019b3ff66eacc52d9139422656d35783a8cf7f23eca5f00950e2b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a6f5675ecff4913847878d898f96d035e8fc4d1e9f93b7e9b2ecebe097ed6fd4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/tree.json index ef6d15b5f..a91413dc0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamevt-existingEventBus/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -126,19 +126,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -154,7 +154,7 @@ "path": "lamevt-existingEventBus/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -162,13 +162,13 @@ "path": "lamevt-existingEventBus/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -198,7 +198,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -206,13 +206,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "existing-event-bus": { @@ -230,13 +230,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnEventBus", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.EventBus", - "version": "2.118.0" + "version": "2.145.0" } }, "test-lambda-eventbridge": { @@ -244,7 +244,7 @@ "path": "lamevt-existingEventBus/test-lambda-eventbridge", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-eventbridge.LambdaToEventbridge", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -260,7 +260,7 @@ "path": "lamevt-existingEventBus/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -272,7 +272,7 @@ "path": "lamevt-existingEventBus/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -280,25 +280,25 @@ "path": "lamevt-existingEventBus/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -306,7 +306,7 @@ "path": "lamevt-existingEventBus/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -314,13 +314,13 @@ "path": "lamevt-existingEventBus/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -328,13 +328,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.ts index 73e106614..42ec6c442 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingEventBus.ts @@ -27,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-eventbridge // Definitions const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/lamevt-existingFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/lamevt-existingFunction.assets.json index 8a1e75d20..3dae92413 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/lamevt-existingFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/lamevt-existingFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "45a9d610629cdf43d5e9dc5c495a258bbd88feb79a2cfde073dadf1b501fe7ef": { + "143f7f69844a32984b466a3c11040305494cf51ebf12d301c8fd43dae7053770": { "source": { "path": "lamevt-existingFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "45a9d610629cdf43d5e9dc5c495a258bbd88feb79a2cfde073dadf1b501fe7ef.json", + "objectKey": "143f7f69844a32984b466a3c11040305494cf51ebf12d301c8fd43dae7053770.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/lamevt-existingFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/lamevt-existingFunction.template.json index f6a44d1db..0e844230b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/lamevt-existingFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/lamevt-existingFunction.template.json @@ -136,7 +136,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/manifest.json index b38c6e839..5fd4da746 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/manifest.json @@ -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}/45a9d610629cdf43d5e9dc5c495a258bbd88feb79a2cfde073dadf1b501fe7ef.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/143f7f69844a32984b466a3c11040305494cf51ebf12d301c8fd43dae7053770.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/tree.json index fc44cc965..7ffd0c885 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamevt-existingFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -140,19 +140,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -168,7 +168,7 @@ "path": "lamevt-existingFunction/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -176,13 +176,13 @@ "path": "lamevt-existingFunction/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -210,7 +210,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -218,13 +218,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "test-lambda-eventbridge": { @@ -236,13 +236,13 @@ "path": "lamevt-existingFunction/test-lambda-eventbridge/default-event-bus", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-eventbridge.LambdaToEventbridge", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -258,7 +258,7 @@ "path": "lamevt-existingFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -270,7 +270,7 @@ "path": "lamevt-existingFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -278,25 +278,25 @@ "path": "lamevt-existingFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -304,7 +304,7 @@ "path": "lamevt-existingFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -312,13 +312,13 @@ "path": "lamevt-existingFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -326,13 +326,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.ts index 48f9ea5d5..e0c518fcc 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-eventbridge/test/integ.lamevt-existingFunction.ts @@ -26,7 +26,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-eventbridge // Definitions const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/lamken-minimal-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/lamken-minimal-arguments.assets.json index 7b9d6f87d..2fd8c9dbd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/lamken-minimal-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/lamken-minimal-arguments.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "8580efe3fd26f681fd54ea431ac89cedb51cd29d31cc147a36452371f7f10619": { + "5f5b0e6efc98539c9a258f123fe38099da6e4f08a6d256724a8fa53582e5c8c8": { "source": { "path": "lamken-minimal-arguments.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "8580efe3fd26f681fd54ea431ac89cedb51cd29d31cc147a36452371f7f10619.json", + "objectKey": "5f5b0e6efc98539c9a258f123fe38099da6e4f08a6d256724a8fa53582e5c8c8.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/lamken-minimal-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/lamken-minimal-arguments.template.json index 531a55c9c..1c375635d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/lamken-minimal-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/lamken-minimal-arguments.template.json @@ -206,7 +206,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -217,7 +217,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -506,6 +514,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KENDRA_INDEX_ID": { "Fn::GetAtt": [ "minimalargumentskendraindexminimalarguments5CBDD236", @@ -521,7 +530,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -828,6 +837,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/manifest.json index 56d286b5c..d977476f9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/manifest.json @@ -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}/8580efe3fd26f681fd54ea431ac89cedb51cd29d31cc147a36452371f7f10619.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5f5b0e6efc98539c9a258f123fe38099da6e4f08a6d256724a8fa53582e5c8c8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "contentBucketLogAutoDeleteObjectsCustomResource533B8207" } ], + "/lamken-minimal-arguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamken-minimal-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/tree.json index 7f8b5e2e8..bcaef32fe 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "lamken-minimal-arguments/contentBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamken-minimal-arguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "lamken-minimal-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "lamken-minimal-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "lamken-minimal-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "contentBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -376,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -394,19 +402,19 @@ "path": "lamken-minimal-arguments/contentBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "minimal-arguments": { @@ -422,7 +430,7 @@ "path": "lamken-minimal-arguments/minimal-arguments/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -485,7 +493,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -539,19 +547,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -567,7 +575,7 @@ "path": "lamken-minimal-arguments/minimal-arguments/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -575,13 +583,13 @@ "path": "lamken-minimal-arguments/minimal-arguments/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -598,6 +606,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KENDRA_INDEX_ID": { "Fn::GetAtt": [ "minimalargumentskendraindexminimalarguments5CBDD236", @@ -613,7 +622,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -621,13 +630,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "kendra-index-role-minimal-arguments": { @@ -639,7 +648,7 @@ "path": "lamken-minimal-arguments/minimal-arguments/kendra-index-role-minimal-arguments/Importkendra-index-role-minimal-arguments", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -757,13 +766,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "kendra-index-minimal-arguments": { @@ -804,7 +813,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kendra.CfnIndex", - "version": "2.118.0" + "version": "2.147.3" } }, "data-source-role-minimal-arguments0": { @@ -816,7 +825,7 @@ "path": "lamken-minimal-arguments/minimal-arguments/data-source-role-minimal-arguments0/Importdata-source-role-minimal-arguments0", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -896,13 +905,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "data-source-minimal-arguments0": { @@ -953,13 +962,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kendra.CfnDataSource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kendra.LambdaToKendra", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -975,7 +984,7 @@ "path": "lamken-minimal-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -987,7 +996,7 @@ "path": "lamken-minimal-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -995,25 +1004,25 @@ "path": "lamken-minimal-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1021,7 +1030,7 @@ "path": "lamken-minimal-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1029,13 +1038,13 @@ "path": "lamken-minimal-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1043,13 +1052,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.ts index 845c47065..e84e3ab25 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-minimal-arguments.ts @@ -30,7 +30,7 @@ const testBucket = defaults.CreateScrapBucket(stack, "contentBucket"); new LambdaToKendra(stack, 'minimal-arguments', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }, kendraDataSourcesProps: [{ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/lamken-multiple-sources.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/lamken-multiple-sources.assets.json index a7ed28986..f2126bb75 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/lamken-multiple-sources.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/lamken-multiple-sources.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "d7525633944a7b968ad3592638d1ff0116991e97c963896bc9c74fecbbdbbd10": { + "e20588b4e92e15f49c9656d86faefe250c6d526692695f86ed01f3b60dc40e56": { "source": { "path": "lamken-multiple-sources.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d7525633944a7b968ad3592638d1ff0116991e97c963896bc9c74fecbbdbbd10.json", + "objectKey": "e20588b4e92e15f49c9656d86faefe250c6d526692695f86ed01f3b60dc40e56.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/lamken-multiple-sources.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/lamken-multiple-sources.template.json index d935f89e4..988af35b0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/lamken-multiple-sources.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/lamken-multiple-sources.template.json @@ -206,7 +206,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -217,7 +217,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -523,6 +531,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KENDRA_INDEX_ID": { "Fn::GetAtt": [ "minimalargumentskendraindexminimalarguments5CBDD236", @@ -538,7 +547,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -876,6 +885,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/manifest.json index 35810979a..ee663dc0d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/manifest.json @@ -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}/d7525633944a7b968ad3592638d1ff0116991e97c963896bc9c74fecbbdbbd10.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e20588b4e92e15f49c9656d86faefe250c6d526692695f86ed01f3b60dc40e56.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/lamken-multiple-sources/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamken-multiple-sources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/tree.json index 400683e96..251d7754b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "lamken-multiple-sources/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamken-multiple-sources/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "lamken-multiple-sources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "lamken-multiple-sources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "lamken-multiple-sources/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -376,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -394,19 +402,19 @@ "path": "lamken-multiple-sources/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "existingRole": { @@ -418,7 +426,7 @@ "path": "lamken-multiple-sources/existingRole/ImportexistingRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -443,13 +451,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "minimal-arguments": { @@ -465,7 +473,7 @@ "path": "lamken-multiple-sources/minimal-arguments/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -528,7 +536,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -582,19 +590,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -610,7 +618,7 @@ "path": "lamken-multiple-sources/minimal-arguments/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -618,13 +626,13 @@ "path": "lamken-multiple-sources/minimal-arguments/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -641,6 +649,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KENDRA_INDEX_ID": { "Fn::GetAtt": [ "minimalargumentskendraindexminimalarguments5CBDD236", @@ -656,7 +665,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -664,13 +673,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "kendra-index-role-minimal-arguments": { @@ -682,7 +691,7 @@ "path": "lamken-multiple-sources/minimal-arguments/kendra-index-role-minimal-arguments/Importkendra-index-role-minimal-arguments", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -800,13 +809,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "kendra-index-minimal-arguments": { @@ -847,7 +856,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kendra.CfnIndex", - "version": "2.118.0" + "version": "2.147.3" } }, "data-source-role-minimal-arguments0": { @@ -859,7 +868,7 @@ "path": "lamken-multiple-sources/minimal-arguments/data-source-role-minimal-arguments0/Importdata-source-role-minimal-arguments0", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -939,13 +948,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "data-source-minimal-arguments0": { @@ -996,7 +1005,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kendra.CfnDataSource", - "version": "2.118.0" + "version": "2.147.3" } }, "kendra-data-source-minimal-arguments1": { @@ -1035,13 +1044,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kendra.CfnDataSource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kendra.LambdaToKendra", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -1057,7 +1066,7 @@ "path": "lamken-multiple-sources/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -1069,7 +1078,7 @@ "path": "lamken-multiple-sources/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1077,25 +1086,25 @@ "path": "lamken-multiple-sources/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1103,7 +1112,7 @@ "path": "lamken-multiple-sources/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1111,13 +1120,13 @@ "path": "lamken-multiple-sources/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1125,13 +1134,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.ts index ba1645ad4..ffb52e233 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-multiple-sources.ts @@ -53,7 +53,7 @@ const webCrawlerSource = { new LambdaToKendra(stack, 'minimal-arguments', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }, kendraDataSourcesProps: [{ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/lamken-with-vpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/lamken-with-vpc.assets.json index f61aa555f..7cb6decc1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/lamken-with-vpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/lamken-with-vpc.assets.json @@ -1,28 +1,28 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -40,7 +40,7 @@ } } }, - "7a26a73db3020306b6823d1da5499e405d320802e44f91232bd5861d67a02f80": { + "42ef01e0e3df69ed6d1e05fcf6c7a7d62c88ddc2ad4dd9fc25cbb505d9d73d74": { "source": { "path": "lamken-with-vpc.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7a26a73db3020306b6823d1da5499e405d320802e44f91232bd5861d67a02f80.json", + "objectKey": "42ef01e0e3df69ed6d1e05fcf6c7a7d62c88ddc2ad4dd9fc25cbb505d9d73d74.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/lamken-with-vpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/lamken-with-vpc.template.json index 51e72a91f..7285af5c0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/lamken-with-vpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/lamken-with-vpc.template.json @@ -206,7 +206,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -217,7 +217,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -541,6 +549,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KENDRA_INDEX_ID": { "Fn::GetAtt": [ "minimalargumentskendraindexminimalarguments5CBDD236", @@ -556,7 +565,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1260,7 +1269,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1271,7 +1280,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1355,6 +1372,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/manifest.json index 025e3d119..7f0146967 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/manifest.json @@ -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}/7a26a73db3020306b6823d1da5499e405d320802e44f91232bd5861d67a02f80.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/42ef01e0e3df69ed6d1e05fcf6c7a7d62c88ddc2ad4dd9fc25cbb505d9d73d74.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/lamken-with-vpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamken-with-vpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/tree.json index 3fa50cc61..e7380c494 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "lamken-with-vpc/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamken-with-vpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "lamken-with-vpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "lamken-with-vpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "lamken-with-vpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -376,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -394,19 +402,19 @@ "path": "lamken-with-vpc/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "minimal-arguments": { @@ -422,7 +430,7 @@ "path": "lamken-with-vpc/minimal-arguments/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -485,7 +493,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -544,19 +552,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -584,13 +592,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -606,7 +614,7 @@ "path": "lamken-with-vpc/minimal-arguments/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -614,13 +622,13 @@ "path": "lamken-with-vpc/minimal-arguments/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -637,6 +645,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KENDRA_INDEX_ID": { "Fn::GetAtt": [ "minimalargumentskendraindexminimalarguments5CBDD236", @@ -652,7 +661,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -678,13 +687,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "kendra-index-role-minimal-arguments": { @@ -696,7 +705,7 @@ "path": "lamken-with-vpc/minimal-arguments/kendra-index-role-minimal-arguments/Importkendra-index-role-minimal-arguments", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -814,13 +823,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "kendra-index-minimal-arguments": { @@ -861,7 +870,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kendra.CfnIndex", - "version": "2.118.0" + "version": "2.147.3" } }, "data-source-role-minimal-arguments0": { @@ -873,7 +882,7 @@ "path": "lamken-with-vpc/minimal-arguments/data-source-role-minimal-arguments0/Importdata-source-role-minimal-arguments0", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -953,13 +962,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "data-source-minimal-arguments0": { @@ -1010,13 +1019,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kendra.CfnDataSource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kendra.LambdaToKendra", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -1043,7 +1052,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -1087,7 +1096,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1095,7 +1104,7 @@ "path": "lamken-with-vpc/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1117,7 +1126,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1136,13 +1145,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -1186,7 +1195,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1194,7 +1203,7 @@ "path": "lamken-with-vpc/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1216,7 +1225,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1235,13 +1244,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1253,13 +1262,13 @@ "path": "lamken-with-vpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1275,7 +1284,7 @@ "path": "lamken-with-vpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1306,7 +1315,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1358,19 +1367,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1394,13 +1403,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1434,13 +1443,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "KENDRA": { @@ -1490,19 +1499,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1514,7 +1523,7 @@ "path": "lamken-with-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1522,7 +1531,7 @@ "path": "lamken-with-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1530,13 +1539,13 @@ "path": "lamken-with-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "lamken-with-vpc-KENDRA-security-group": { @@ -1592,13 +1601,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1626,7 +1635,7 @@ "path": "lamken-with-vpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1634,25 +1643,25 @@ "path": "lamken-with-vpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1660,7 +1669,7 @@ "path": "lamken-with-vpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1668,13 +1677,13 @@ "path": "lamken-with-vpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1688,7 +1697,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.ts index 71fe17309..30a9d0c1e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/integ.lamken-with-vpc.ts @@ -30,7 +30,7 @@ const testBucket = defaults.CreateScrapBucket(stack, "scrapBucket"); new LambdaToKendra(stack, 'minimal-arguments', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }, kendraDataSourcesProps: [{ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/lambda-kendra.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/lambda-kendra.test.ts index a80ff5355..da156e490 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/lambda-kendra.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kendra/test/lambda-kendra.test.ts @@ -27,7 +27,7 @@ test('Launch with minimal code and check structure', () => { const lambdaProps: lambda.FunctionProps = { functionName: testFunctionName, code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -273,7 +273,7 @@ test('Check pattern properties on minimal launch', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -303,7 +303,7 @@ test('Launch with VPC', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -425,7 +425,7 @@ test('Launch with existing lambda', () => { const existingFunction = new lambda.Function(stack, 'existing-function', { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', timeout: cdk.Duration.seconds(testTimeout), functionName: testFunctionName @@ -449,7 +449,7 @@ test('Confirm error with data source with no bucket name', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -476,7 +476,7 @@ test('Launch with existing vpc', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -510,7 +510,7 @@ test('Launch with Read/Write permissions on kendra index', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -602,7 +602,7 @@ test('Launch with Write permissions on kendra index', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -667,7 +667,7 @@ test('Launch with Read permissions on kendra index', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -725,7 +725,7 @@ test('Launch with SubmitFeedback permissions on kendra index', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -776,7 +776,7 @@ test('Launch with existing kendra index', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -821,7 +821,7 @@ test('Launch with S3 data source with overridden defaults', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -861,7 +861,7 @@ test('Launch with S3 data source and unsupported data source', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -917,7 +917,7 @@ test('Launch with multiple S3 data sources', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -973,7 +973,7 @@ test('Test with custom environment variable name', () => { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -1021,7 +1021,7 @@ test('Confirm CheckVpcProps is being called', () => { const lambdaProps: lambda.FunctionProps = { functionName: testFunctionName, code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -1051,7 +1051,7 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new cdk.Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -1067,7 +1067,7 @@ test('Confirm call to CheckLambdaProps', () => { } ], lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/aws-lambda-kinesisfirehose.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/aws-lambda-kinesisfirehose.test.ts index 6a585408f..5f17b5fdc 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/aws-lambda-kinesisfirehose.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/aws-lambda-kinesisfirehose.test.ts @@ -28,7 +28,7 @@ test('Test that properties are set correctly', () => { const construct = new LambdaToKinesisFirehose(stack, 'test-target', { existingKinesisFirehose: destination.kinesisFirehose, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), } @@ -45,7 +45,7 @@ test('Test existing function is utilized correctly', () => { const destination = GetTestFirehoseDestination(stack, 'test-destination'); const testName = 'test-name'; const existingFunction = new lambda.Function(stack, 'test-function', { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), functionName: testName @@ -75,7 +75,7 @@ test('Test that lambda function props are incorporated', () => { new LambdaToKinesisFirehose(stack, 'test-target', { existingKinesisFirehose: destination.kinesisFirehose, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), functionName: testName @@ -98,7 +98,7 @@ test('Test that new VPC is created', () => { const construct = new LambdaToKinesisFirehose(stack, 'test-target', { existingKinesisFirehose: destination.kinesisFirehose, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -141,7 +141,7 @@ test('Test that existing VPC is used', () => { const construct = new LambdaToKinesisFirehose(stack, 'test-target', { existingKinesisFirehose: destination.kinesisFirehose, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -187,7 +187,7 @@ test('Test fail if existingFirehose does not have a stream name', () => { new LambdaToKinesisFirehose(stack, 'test-target', { existingKinesisFirehose: mutatedFirehose, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), functionName: testName @@ -206,7 +206,7 @@ test('Test fail Vpc check with vpcProps yet deployVpc is false', () => { new LambdaToKinesisFirehose(stack, 'test-target', { existingKinesisFirehose: destination.kinesisFirehose, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -229,7 +229,7 @@ test('Test fail Vpc check with vpcProps yet deployVpc is undefined', () => { new LambdaToKinesisFirehose(stack, 'test-target', { existingKinesisFirehose: destination.kinesisFirehose, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -261,7 +261,7 @@ test('Confirm CheckVpcProps() is being called', () => { existingKinesisFirehose: destination.kinesisFirehose, lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, deployVpc: true, @@ -276,7 +276,7 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new cdk.Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -285,7 +285,7 @@ test('Confirm call to CheckLambdaProps', () => { const props: LambdaToKinesisFirehoseProps = { existingKinesisFirehose: destination.kinesisFirehose, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/lamfhs-existing-function.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/lamfhs-existing-function.assets.json index 9630ba458..b35200203 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/lamfhs-existing-function.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/lamfhs-existing-function.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "542d5ad08c68012a5c78365a453a15420c6493d53a2eeba9297abd82cf2f99f2": { + "57b79c3a80780e474fc03e56b4f50443ba3ad5c25365af38dd8d1c15a16dd699": { "source": { "path": "lamfhs-existing-function.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "542d5ad08c68012a5c78365a453a15420c6493d53a2eeba9297abd82cf2f99f2.json", + "objectKey": "57b79c3a80780e474fc03e56b4f50443ba3ad5c25365af38dd8d1c15a16dd699.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/lamfhs-existing-function.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/lamfhs-existing-function.template.json index 65964a85c..59c8e9855 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/lamfhs-existing-function.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/lamfhs-existing-function.template.json @@ -552,7 +552,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -563,7 +563,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -682,7 +690,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "existingfunctionServiceRoleDefaultPolicyFAFC8F2C", @@ -708,6 +716,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/manifest.json index bb4185958..d0a2b4a6b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/manifest.json @@ -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}/542d5ad08c68012a5c78365a453a15420c6493d53a2eeba9297abd82cf2f99f2.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/57b79c3a80780e474fc03e56b4f50443ba3ad5c25365af38dd8d1c15a16dd699.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -148,6 +148,12 @@ "data": "destinationfirehoseKinesisFirehoseE8EB5D91" } ], + "/lamfhs-existing-function/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamfhs-existing-function/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/tree.json index f04de53af..0cb448334 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "lamfhs-existing-function/destination-firehose/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,19 +389,19 @@ "path": "lamfhs-existing-function/destination-firehose/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -417,7 +417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -437,19 +437,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -461,7 +461,7 @@ "path": "lamfhs-existing-function/destination-firehose/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -486,13 +486,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -584,13 +584,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -659,13 +659,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamfhs-existing-function/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -677,7 +685,7 @@ "path": "lamfhs-existing-function/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -685,7 +693,7 @@ "path": "lamfhs-existing-function/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -693,13 +701,13 @@ "path": "lamfhs-existing-function/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "destination-firehoseaws-managed-key": { @@ -707,7 +715,7 @@ "path": "lamfhs-existing-function/destination-firehoseaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "existing-function": { @@ -723,7 +731,7 @@ "path": "lamfhs-existing-function/existing-function/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -762,7 +770,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -805,19 +813,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "Code": { @@ -829,7 +837,7 @@ "path": "lamfhs-existing-function/existing-function/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -837,13 +845,13 @@ "path": "lamfhs-existing-function/existing-function/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -870,18 +878,18 @@ "Arn" ] }, - "runtime": "nodejs18.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "test-construct": { @@ -889,7 +897,7 @@ "path": "lamfhs-existing-function/test-construct", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kinesisfirehose.LambdaToKinesisFirehose", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -905,7 +913,7 @@ "path": "lamfhs-existing-function/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -917,7 +925,7 @@ "path": "lamfhs-existing-function/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -925,25 +933,25 @@ "path": "lamfhs-existing-function/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -951,7 +959,7 @@ "path": "lamfhs-existing-function/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -959,13 +967,13 @@ "path": "lamfhs-existing-function/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -973,13 +981,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.ts index d0bb730d3..57bae27cf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-function.ts @@ -27,7 +27,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const destination = GetTestFirehoseDestination(stack, 'destination-firehose'); const existingFunction = new lambda.Function(stack, 'existing-function', { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/lamfhs-existing-vpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/lamfhs-existing-vpc.assets.json index 2fffb40c5..dcd06c553 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/lamfhs-existing-vpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/lamfhs-existing-vpc.assets.json @@ -1,28 +1,28 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -40,7 +40,7 @@ } } }, - "d985842b76637edfad2bd2204414a5d4c27558511455b258f8068c2e9de0727a": { + "10a2508a0f66fdc669a1bc5d60d0b2a7d3c40e1803bcbc66af0584a8ac3ea83b": { "source": { "path": "lamfhs-existing-vpc.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d985842b76637edfad2bd2204414a5d4c27558511455b258f8068c2e9de0727a.json", + "objectKey": "10a2508a0f66fdc669a1bc5d60d0b2a7d3c40e1803bcbc66af0584a8ac3ea83b.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/lamfhs-existing-vpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/lamfhs-existing-vpc.template.json index ced83f96b..fc1a8e304 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/lamfhs-existing-vpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/lamfhs-existing-vpc.template.json @@ -552,7 +552,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -563,7 +563,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -1259,7 +1267,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1270,7 +1278,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1445,6 +1461,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "FIREHOSE_DELIVERYSTREAM_NAME": "KinesisFirehoselamfhsexistingvpcdestinationfirehose623CCD9C" } }, @@ -1455,7 +1472,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1564,6 +1581,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/manifest.json index 2e0f4fc9c..179d5c71d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/manifest.json @@ -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}/d985842b76637edfad2bd2204414a5d4c27558511455b258f8068c2e9de0727a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/10a2508a0f66fdc669a1bc5d60d0b2a7d3c40e1803bcbc66af0584a8ac3ea83b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -148,6 +148,12 @@ "data": "destinationfirehoseKinesisFirehoseE8EB5D91" } ], + "/lamfhs-existing-vpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamfhs-existing-vpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/tree.json index 27433b00d..fa9b28993 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "lamfhs-existing-vpc/destination-firehose/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,19 +389,19 @@ "path": "lamfhs-existing-vpc/destination-firehose/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -417,7 +417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -437,19 +437,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -461,7 +461,7 @@ "path": "lamfhs-existing-vpc/destination-firehose/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -486,13 +486,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -584,13 +584,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -659,13 +659,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.51.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamfhs-existing-vpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -677,7 +685,7 @@ "path": "lamfhs-existing-vpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -685,7 +693,7 @@ "path": "lamfhs-existing-vpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -693,13 +701,13 @@ "path": "lamfhs-existing-vpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "destination-firehoseaws-managed-key": { @@ -707,7 +715,7 @@ "path": "lamfhs-existing-vpc/destination-firehoseaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Vpc": { @@ -734,7 +742,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -778,7 +786,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -786,7 +794,7 @@ "path": "lamfhs-existing-vpc/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -808,7 +816,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -827,7 +835,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -847,7 +855,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -867,7 +875,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -895,13 +903,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -945,7 +953,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -953,7 +961,7 @@ "path": "lamfhs-existing-vpc/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -975,7 +983,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -994,7 +1002,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1014,7 +1022,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -1034,7 +1042,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -1062,13 +1070,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -1112,7 +1120,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1120,7 +1128,7 @@ "path": "lamfhs-existing-vpc/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1142,7 +1150,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1161,7 +1169,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1181,13 +1189,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -1231,7 +1239,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1239,7 +1247,7 @@ "path": "lamfhs-existing-vpc/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1261,7 +1269,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1280,7 +1288,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1300,13 +1308,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -1325,7 +1333,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -1344,7 +1352,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1356,13 +1364,13 @@ "path": "lamfhs-existing-vpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1378,7 +1386,7 @@ "path": "lamfhs-existing-vpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1409,7 +1417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1461,19 +1469,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1497,13 +1505,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1537,13 +1545,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "KINESIS_FIREHOSE": { @@ -1593,19 +1601,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1617,7 +1625,7 @@ "path": "lamfhs-existing-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1625,7 +1633,7 @@ "path": "lamfhs-existing-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1633,13 +1641,13 @@ "path": "lamfhs-existing-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-construct": { @@ -1655,7 +1663,7 @@ "path": "lamfhs-existing-vpc/test-construct/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1718,7 +1726,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1774,19 +1782,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -1814,13 +1822,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1836,7 +1844,7 @@ "path": "lamfhs-existing-vpc/test-construct/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1844,13 +1852,13 @@ "path": "lamfhs-existing-vpc/test-construct/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1867,6 +1875,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "FIREHOSE_DELIVERYSTREAM_NAME": "KinesisFirehoselamfhsexistingvpcdestinationfirehose623CCD9C" } }, @@ -1877,7 +1886,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -1903,19 +1912,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kinesisfirehose.LambdaToKinesisFirehose", - "version": "2.51.0" + "version": "2.60.0" } }, "lamfhs-existing-vpc-KINESIS_FIREHOSE-security-group": { @@ -1971,13 +1980,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -2005,7 +2014,7 @@ "path": "lamfhs-existing-vpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2013,25 +2022,25 @@ "path": "lamfhs-existing-vpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2039,7 +2048,7 @@ "path": "lamfhs-existing-vpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2047,13 +2056,13 @@ "path": "lamfhs-existing-vpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -2067,7 +2076,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.ts index 714a9c82d..fe53f15ca 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-existing-vpc.ts @@ -30,7 +30,7 @@ const myVpc = defaults.getTestVpc(stack); new LambdaToKinesisFirehose(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/lamfhs-new-vpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/lamfhs-new-vpc.assets.json index 376e670d2..34f58d5ee 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/lamfhs-new-vpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/lamfhs-new-vpc.assets.json @@ -1,28 +1,28 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -40,7 +40,7 @@ } } }, - "0646d2a165afe8ea8cd3e536f70dd32f4ed1dea70bcbf04a4e2737dd18600fe6": { + "d269166c8baccbb44116e510d85a47282e196ba7c609c005b8dd5e728c76c9a4": { "source": { "path": "lamfhs-new-vpc.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0646d2a165afe8ea8cd3e536f70dd32f4ed1dea70bcbf04a4e2737dd18600fe6.json", + "objectKey": "d269166c8baccbb44116e510d85a47282e196ba7c609c005b8dd5e728c76c9a4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/lamfhs-new-vpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/lamfhs-new-vpc.template.json index d853a1a33..8961e4e09 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/lamfhs-new-vpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/lamfhs-new-vpc.template.json @@ -552,7 +552,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -563,7 +563,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -749,6 +757,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "FIREHOSE_DELIVERYSTREAM_NAME": "KinesisFirehoselamfhsnewvpcdestinationfirehoseF2428936" } }, @@ -759,7 +768,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1185,7 +1194,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1196,7 +1205,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1280,6 +1297,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/manifest.json index 6a04122a6..0a0d34b29 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/manifest.json @@ -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}/0646d2a165afe8ea8cd3e536f70dd32f4ed1dea70bcbf04a4e2737dd18600fe6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d269166c8baccbb44116e510d85a47282e196ba7c609c005b8dd5e728c76c9a4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -148,6 +148,12 @@ "data": "destinationfirehoseKinesisFirehoseE8EB5D91" } ], + "/lamfhs-new-vpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamfhs-new-vpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/tree.json index 74b6c32dc..0f8a5499f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "lamfhs-new-vpc/destination-firehose/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,19 +389,19 @@ "path": "lamfhs-new-vpc/destination-firehose/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -417,7 +417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -437,19 +437,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -461,7 +461,7 @@ "path": "lamfhs-new-vpc/destination-firehose/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -486,13 +486,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -584,13 +584,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -659,13 +659,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.51.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamfhs-new-vpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -677,7 +685,7 @@ "path": "lamfhs-new-vpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -685,7 +693,7 @@ "path": "lamfhs-new-vpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -693,13 +701,13 @@ "path": "lamfhs-new-vpc/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "destination-firehoseaws-managed-key": { @@ -707,7 +715,7 @@ "path": "lamfhs-new-vpc/destination-firehoseaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "test-construct": { @@ -723,7 +731,7 @@ "path": "lamfhs-new-vpc/test-construct/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -786,7 +794,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -842,19 +850,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -882,13 +890,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -904,7 +912,7 @@ "path": "lamfhs-new-vpc/test-construct/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -912,13 +920,13 @@ "path": "lamfhs-new-vpc/test-construct/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -935,6 +943,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "FIREHOSE_DELIVERYSTREAM_NAME": "KinesisFirehoselamfhsnewvpcdestinationfirehoseF2428936" } }, @@ -945,7 +954,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -971,19 +980,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kinesisfirehose.LambdaToKinesisFirehose", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -1010,7 +1019,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -1054,7 +1063,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1062,7 +1071,7 @@ "path": "lamfhs-new-vpc/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1084,7 +1093,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1103,13 +1112,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -1153,7 +1162,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1161,7 +1170,7 @@ "path": "lamfhs-new-vpc/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1183,7 +1192,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1202,13 +1211,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1220,13 +1229,13 @@ "path": "lamfhs-new-vpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1242,7 +1251,7 @@ "path": "lamfhs-new-vpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1273,7 +1282,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1325,19 +1334,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1361,13 +1370,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1401,13 +1410,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "KINESIS_FIREHOSE": { @@ -1457,19 +1466,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1481,7 +1490,7 @@ "path": "lamfhs-new-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1489,7 +1498,7 @@ "path": "lamfhs-new-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1497,13 +1506,13 @@ "path": "lamfhs-new-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "lamfhs-new-vpc-KINESIS_FIREHOSE-security-group": { @@ -1559,13 +1568,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1593,7 +1602,7 @@ "path": "lamfhs-new-vpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1601,25 +1610,25 @@ "path": "lamfhs-new-vpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1627,7 +1636,7 @@ "path": "lamfhs-new-vpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1635,13 +1644,13 @@ "path": "lamfhs-new-vpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1655,7 +1664,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.ts index 216109a79..f45d69e52 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-new-vpc.ts @@ -29,7 +29,7 @@ const destination = GetTestFirehoseDestination(stack, 'destination-firehose'); new LambdaToKinesisFirehose(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/lamfhs-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/lamfhs-no-arguments.assets.json index c236798c9..944e22167 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/lamfhs-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/lamfhs-no-arguments.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "03794f52434ad8b4574d140b01c0c953327415f27498ce695e2ef128741c9089": { + "a823827ab1ed61f4b9983310d2ad71e8015be2b4b768e95978b9533b8c6e66ab": { "source": { "path": "lamfhs-no-arguments.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "03794f52434ad8b4574d140b01c0c953327415f27498ce695e2ef128741c9089.json", + "objectKey": "a823827ab1ed61f4b9983310d2ad71e8015be2b4b768e95978b9533b8c6e66ab.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/lamfhs-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/lamfhs-no-arguments.template.json index f02bb5a56..16e05e6f7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/lamfhs-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/lamfhs-no-arguments.template.json @@ -552,7 +552,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -563,7 +563,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -714,6 +722,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "FIREHOSE_DELIVERYSTREAM_NAME": "KinesisFirehoselamfhsnoargumentsdestinationfirehoseC6583242" } }, @@ -724,7 +733,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -753,6 +762,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/manifest.json index 931e8311a..a3bf8c56f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/manifest.json @@ -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}/03794f52434ad8b4574d140b01c0c953327415f27498ce695e2ef128741c9089.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a823827ab1ed61f4b9983310d2ad71e8015be2b4b768e95978b9533b8c6e66ab.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -148,6 +148,12 @@ "data": "destinationfirehoseKinesisFirehoseE8EB5D91" } ], + "/lamfhs-no-arguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamfhs-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/tree.json index 4fcbb284a..97f838805 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "lamfhs-no-arguments/destination-firehose/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,19 +389,19 @@ "path": "lamfhs-no-arguments/destination-firehose/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-group": { @@ -417,7 +417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "firehose-log-stream": { @@ -437,19 +437,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehoseRole": { @@ -461,7 +461,7 @@ "path": "lamfhs-no-arguments/destination-firehose/KinesisFirehoseRole/ImportKinesisFirehoseRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -486,13 +486,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehosePolicy": { @@ -584,13 +584,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "KinesisFirehose": { @@ -659,13 +659,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesisfirehose.CfnDeliveryStream", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-kinesisfirehose-s3.KinesisFirehoseToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamfhs-no-arguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -677,7 +685,7 @@ "path": "lamfhs-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -685,7 +693,7 @@ "path": "lamfhs-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -693,13 +701,13 @@ "path": "lamfhs-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "destination-firehoseaws-managed-key": { @@ -707,7 +715,7 @@ "path": "lamfhs-no-arguments/destination-firehoseaws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "test-construct": { @@ -723,7 +731,7 @@ "path": "lamfhs-no-arguments/test-construct/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -786,7 +794,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -837,19 +845,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -865,7 +873,7 @@ "path": "lamfhs-no-arguments/test-construct/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -873,13 +881,13 @@ "path": "lamfhs-no-arguments/test-construct/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -896,6 +904,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "FIREHOSE_DELIVERYSTREAM_NAME": "KinesisFirehoselamfhsnoargumentsdestinationfirehoseC6583242" } }, @@ -906,7 +915,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -914,19 +923,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kinesisfirehose.LambdaToKinesisFirehose", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -942,7 +951,7 @@ "path": "lamfhs-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -954,7 +963,7 @@ "path": "lamfhs-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -962,25 +971,25 @@ "path": "lamfhs-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -988,7 +997,7 @@ "path": "lamfhs-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -996,13 +1005,13 @@ "path": "lamfhs-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1010,13 +1019,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.ts index 5f9b435f4..794841269 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisfirehose/test/integ.lamfhs-no-arguments.ts @@ -28,7 +28,7 @@ const destination = GetTestFirehoseDestination(stack, 'destination-firehose'); new LambdaToKinesisFirehose(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/lamkin-existingLambda.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/lamkin-existingLambda.assets.json index e5fbb4d3a..699471b45 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/lamkin-existingLambda.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/lamkin-existingLambda.assets.json @@ -14,7 +14,7 @@ } } }, - "99d7f5f3533a138f2ecbd69dbf6a216bbea8b7c4f4068697c09114725adbb37a": { + "09548146cae0b4cceb25220c20dfdae971ffea8124c218f1286544615180a126": { "source": { "path": "lamkin-existingLambda.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "99d7f5f3533a138f2ecbd69dbf6a216bbea8b7c4f4068697c09114725adbb37a.json", + "objectKey": "09548146cae0b4cceb25220c20dfdae971ffea8124c218f1286544615180a126.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/lamkin-existingLambda.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/lamkin-existingLambda.template.json index f2f1152c0..2487c210e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/lamkin-existingLambda.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/lamkin-existingLambda.template.json @@ -114,6 +114,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "testlambdakinesisstreamsKinesisStream11A82116" } @@ -126,7 +127,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/manifest.json index b3a54da88..54fded306 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/manifest.json @@ -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}/99d7f5f3533a138f2ecbd69dbf6a216bbea8b7c4f4068697c09114725adbb37a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/09548146cae0b4cceb25220c20dfdae971ffea8124c218f1286544615180a126.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/tree.json index 2f0b1722d..8efc0288b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamkin-existingLambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -130,19 +130,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -158,7 +158,7 @@ "path": "lamkin-existingLambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -166,13 +166,13 @@ "path": "lamkin-existingLambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -189,6 +189,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "testlambdakinesisstreamsKinesisStream11A82116" } @@ -201,7 +202,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -209,13 +210,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "test-lambda-kinesisstreams": { @@ -242,13 +243,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -273,13 +274,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -304,19 +305,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kinesisstreams.LambdaToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "Integ": { @@ -344,7 +345,7 @@ "path": "lamkin-existingLambda/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -352,25 +353,25 @@ "path": "lamkin-existingLambda/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -378,7 +379,7 @@ "path": "lamkin-existingLambda/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -386,13 +387,13 @@ "path": "lamkin-existingLambda/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -406,7 +407,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.ts index b1747d934..e1b35bebd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingLambda.ts @@ -17,13 +17,14 @@ import { LambdaToKinesisStreams } from "../lib"; import { deployLambdaFunction, generateIntegStackName } from '@aws-solutions-constructs/core'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from "@aws-solutions-constructs/core"; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); const existingLambdaObj = deployLambdaFunction(stack, { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }); diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/lamkin-existingStream.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/lamkin-existingStream.assets.json index 2c1e95a63..7cdd26e97 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/lamkin-existingStream.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/lamkin-existingStream.assets.json @@ -14,7 +14,7 @@ } } }, - "2a82d91b995a0843c821ef3ca3816d6b5fca43baf2ebc4c978abf98e55a2df66": { + "a3ceba1a6c1e58ab2df5925eb5aa23d7642d6b42402c9716203ce6db282f2f81": { "source": { "path": "lamkin-existingStream.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2a82d91b995a0843c821ef3ca3816d6b5fca43baf2ebc4c978abf98e55a2df66.json", + "objectKey": "a3ceba1a6c1e58ab2df5925eb5aa23d7642d6b42402c9716203ce6db282f2f81.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/lamkin-existingStream.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/lamkin-existingStream.template.json index fc8778d82..676c96b0a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/lamkin-existingStream.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/lamkin-existingStream.template.json @@ -129,6 +129,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "teststream04374A09" } @@ -141,7 +142,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/manifest.json index 04ac3dea2..65e93a964 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/manifest.json @@ -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}/2a82d91b995a0843c821ef3ca3816d6b5fca43baf2ebc4c978abf98e55a2df66.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a3ceba1a6c1e58ab2df5925eb5aa23d7642d6b42402c9716203ce6db282f2f81.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/tree.json index 7215f2643..6aa5bb8d3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.js.snapshot/tree.json @@ -30,13 +30,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.145.0" } }, "test-lambda-kinesisstreams": { @@ -52,7 +52,7 @@ "path": "lamkin-existingStream/test-lambda-kinesisstreams/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -115,7 +115,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -165,19 +165,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -193,7 +193,7 @@ "path": "lamkin-existingStream/test-lambda-kinesisstreams/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -201,13 +201,13 @@ "path": "lamkin-existingStream/test-lambda-kinesisstreams/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -224,6 +224,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "teststream04374A09" } @@ -236,7 +237,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -244,13 +245,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -275,13 +276,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -306,19 +307,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kinesisstreams.LambdaToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "Integ": { @@ -346,7 +347,7 @@ "path": "lamkin-existingStream/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -354,25 +355,25 @@ "path": "lamkin-existingStream/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -380,7 +381,7 @@ "path": "lamkin-existingStream/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -388,13 +389,13 @@ "path": "lamkin-existingStream/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -408,7 +409,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.ts index 95a6e8862..cb150a242 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStream.ts @@ -19,6 +19,7 @@ import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import * as kinesis from 'aws-cdk-lib/aws-kinesis'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { StreamEncryption, StreamMode } from "aws-cdk-lib/aws-kinesis"; +import * as defaults from "@aws-solutions-constructs/core"; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -31,7 +32,7 @@ const existingStreamObj = new kinesis.Stream(stack, 'test-stream', { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingStreamObj diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkin-existingStreamWithCmk.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkin-existingStreamWithCmk.assets.json index 1d0c3507e..2396ae2d8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkin-existingStreamWithCmk.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkin-existingStreamWithCmk.assets.json @@ -14,7 +14,7 @@ } } }, - "c5de7cce3428a7483787a98e8da014fb320e7bcfc3bbd3d889dd99c67de54d09": { + "5f77ff3099cf0cc5f35635ee1ed177f2812ed4de5748a7f3e799fbe4d094676d": { "source": { "path": "lamkin-existingStreamWithCmk.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c5de7cce3428a7483787a98e8da014fb320e7bcfc3bbd3d889dd99c67de54d09.json", + "objectKey": "5f77ff3099cf0cc5f35635ee1ed177f2812ed4de5748a7f3e799fbe4d094676d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkin-existingStreamWithCmk.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkin-existingStreamWithCmk.template.json index bf5547cca..50e39e41a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkin-existingStreamWithCmk.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkin-existingStreamWithCmk.template.json @@ -183,6 +183,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "teststream04374A09" } @@ -195,7 +196,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/manifest.json index 30f93d654..199bde8b0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/manifest.json @@ -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}/c5de7cce3428a7483787a98e8da014fb320e7bcfc3bbd3d889dd99c67de54d09.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5f77ff3099cf0cc5f35635ee1ed177f2812ed4de5748a7f3e799fbe4d094676d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/tree.json index e9bedb307..6b7368195 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.js.snapshot/tree.json @@ -51,13 +51,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.145.0" } }, "test-stream": { @@ -85,13 +85,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.145.0" } }, "test-lambda-kinesisstreams": { @@ -107,7 +107,7 @@ "path": "lamkin-existingStreamWithCmk/test-lambda-kinesisstreams/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -170,7 +170,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -235,19 +235,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -263,7 +263,7 @@ "path": "lamkin-existingStreamWithCmk/test-lambda-kinesisstreams/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -271,13 +271,13 @@ "path": "lamkin-existingStreamWithCmk/test-lambda-kinesisstreams/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -294,6 +294,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "teststream04374A09" } @@ -306,7 +307,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -314,13 +315,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -345,13 +346,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -376,19 +377,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kinesisstreams.LambdaToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "Integ": { @@ -416,7 +417,7 @@ "path": "lamkin-existingStreamWithCmk/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -424,25 +425,25 @@ "path": "lamkin-existingStreamWithCmk/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -450,7 +451,7 @@ "path": "lamkin-existingStreamWithCmk/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -458,13 +459,13 @@ "path": "lamkin-existingStreamWithCmk/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -478,7 +479,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.ts index 7a7a34a67..073911f27 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingStreamWithCmk.ts @@ -19,6 +19,7 @@ import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import * as kinesis from 'aws-cdk-lib/aws-kinesis'; import * as kms from 'aws-cdk-lib/aws-kms'; import * as lambda from 'aws-cdk-lib/aws-lambda'; +import * as defaults from "@aws-solutions-constructs/core"; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -34,7 +35,7 @@ const existingStreamObj = new kinesis.Stream(stack, 'test-stream', { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingStreamObj diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.assets.json index f7d5861f2..c02b7d527 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.assets.json @@ -27,7 +27,7 @@ } } }, - "14757bf5638fc12659b51121e61f16dad1b33594745b27aa35a6ea01c87bcf3b": { + "a13469466fb3072e6af5ee57648891aa1d964a3c2fa82b0e5562ed4bc7416a09": { "source": { "path": "lamkin-existingVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "14757bf5638fc12659b51121e61f16dad1b33594745b27aa35a6ea01c87bcf3b.json", + "objectKey": "a13469466fb3072e6af5ee57648891aa1d964a3c2fa82b0e5562ed4bc7416a09.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.template.json index 3714e7583..68f482b7a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.template.json @@ -671,7 +671,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -845,6 +853,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "testlambdakinesisstreamsKinesisStream11A82116" } @@ -857,7 +866,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1005,6 +1014,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/manifest.json index 0cef21739..d137ed579 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/manifest.json @@ -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}/14757bf5638fc12659b51121e61f16dad1b33594745b27aa35a6ea01c87bcf3b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a13469466fb3072e6af5ee57648891aa1d964a3c2fa82b0e5562ed4bc7416a09.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -256,6 +256,12 @@ "data": "VpcKINESISSTREAMSC07D91B5" } ], + "/lamkin-existingVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamkin-existingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/tree.json index 0a0fec436..c57e5eb35 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "lamkin-existingVpc/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "lamkin-existingVpc/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.143.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "lamkin-existingVpc/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "lamkin-existingVpc/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.143.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "lamkin-existingVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "lamkin-existingVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_STREAMS": { @@ -891,19 +891,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamkin-existingVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -915,7 +923,7 @@ "path": "lamkin-existingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -923,7 +931,7 @@ "path": "lamkin-existingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -931,13 +939,13 @@ "path": "lamkin-existingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "test-lambda-kinesisstreams": { @@ -953,7 +961,7 @@ "path": "lamkin-existingVpc/test-lambda-kinesisstreams/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1016,7 +1024,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1071,19 +1079,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -1111,13 +1119,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1133,7 +1141,7 @@ "path": "lamkin-existingVpc/test-lambda-kinesisstreams/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1141,13 +1149,13 @@ "path": "lamkin-existingVpc/test-lambda-kinesisstreams/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1164,6 +1172,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "testlambdakinesisstreamsKinesisStream11A82116" } @@ -1176,7 +1185,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -1202,13 +1211,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStream": { @@ -1231,13 +1240,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -1262,13 +1271,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -1293,19 +1302,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kinesisstreams.LambdaToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "lamkin-existingVpc-KINESIS_STREAMS-security-group": { @@ -1361,13 +1370,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1395,7 +1404,7 @@ "path": "lamkin-existingVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1403,25 +1412,25 @@ "path": "lamkin-existingVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1429,7 +1438,7 @@ "path": "lamkin-existingVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1437,13 +1446,13 @@ "path": "lamkin-existingVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1457,7 +1466,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.ts index 1a150f471..6b115f297 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-existingVpc.ts @@ -17,6 +17,7 @@ import { LambdaToKinesisStreams } from "../lib"; import { buildVpc, DefaultPublicPrivateVpcProps, generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from "@aws-solutions-constructs/core"; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -28,7 +29,7 @@ const existingVpc = buildVpc(stack, { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingVpc diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.assets.json index 80c9854cd..6f0db1155 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.assets.json @@ -14,7 +14,7 @@ } } }, - "560629c98458dfa8ed72aecced1d81dcc3a4293757b2846c2a6effb4185fa615": { + "b524d572ce6e6fe581caff5fba44e82de65a4f31678081b308890e7f1d64240d": { "source": { "path": "lamkin-newStreamFromProps.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "560629c98458dfa8ed72aecced1d81dcc3a4293757b2846c2a6effb4185fa615.json", + "objectKey": "b524d572ce6e6fe581caff5fba44e82de65a4f31678081b308890e7f1d64240d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.template.json index 656e3caaa..0229af6a4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.template.json @@ -114,6 +114,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "testlambdakinesisstreamsKinesisStream11A82116" } @@ -126,7 +127,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/manifest.json index dee710420..b1897f4cc 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/manifest.json @@ -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}/560629c98458dfa8ed72aecced1d81dcc3a4293757b2846c2a6effb4185fa615.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b524d572ce6e6fe581caff5fba44e82de65a4f31678081b308890e7f1d64240d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/tree.json index 2814f6181..f13b682ce 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamkin-newStreamFromProps/test-lambda-kinesisstreams/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -134,19 +134,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -162,7 +162,7 @@ "path": "lamkin-newStreamFromProps/test-lambda-kinesisstreams/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -170,13 +170,13 @@ "path": "lamkin-newStreamFromProps/test-lambda-kinesisstreams/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -193,6 +193,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "testlambdakinesisstreamsKinesisStream11A82116" } @@ -205,7 +206,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -213,13 +214,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStream": { @@ -244,13 +245,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -275,13 +276,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -306,19 +307,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kinesisstreams.LambdaToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "Integ": { @@ -346,7 +347,7 @@ "path": "lamkin-newStreamFromProps/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -354,25 +355,25 @@ "path": "lamkin-newStreamFromProps/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -380,7 +381,7 @@ "path": "lamkin-newStreamFromProps/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -388,13 +389,13 @@ "path": "lamkin-newStreamFromProps/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -408,7 +409,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.ts index 2a571be13..8050800f1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newStreamFromProps.ts @@ -18,6 +18,7 @@ import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { StreamMode } from "aws-cdk-lib/aws-kinesis"; +import * as defaults from "@aws-solutions-constructs/core"; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -25,7 +26,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, kinesisStreamProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.assets.json index 2c96e7974..b351f48b4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.assets.json @@ -27,7 +27,7 @@ } } }, - "c6b470ed8d75f522d86877046f23146a39dfe3f4acc01c487ab4eb9f66f7600a": { + "f74dce0107daf0523ad4af1919cf8d23bf0a81262c51acab374784a4748bdcec": { "source": { "path": "lamkin-newVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c6b470ed8d75f522d86877046f23146a39dfe3f4acc01c487ab4eb9f66f7600a.json", + "objectKey": "f74dce0107daf0523ad4af1919cf8d23bf0a81262c51acab374784a4748bdcec.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.template.json index 3bc691db2..e5bf2529c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.template.json @@ -149,6 +149,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "testlambdakinesisstreamsKinesisStream11A82116" } @@ -161,7 +162,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -637,7 +638,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -721,6 +730,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/manifest.json index b3c809747..37669a562 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/manifest.json @@ -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}/c6b470ed8d75f522d86877046f23146a39dfe3f4acc01c487ab4eb9f66f7600a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f74dce0107daf0523ad4af1919cf8d23bf0a81262c51acab374784a4748bdcec.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -202,6 +202,12 @@ "data": "VpcKINESISSTREAMSC07D91B5" } ], + "/lamkin-newVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamkin-newVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/tree.json index cdea1e00f..5090b1015 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamkin-newVpc/test-lambda-kinesisstreams/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -139,19 +139,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -179,13 +179,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -201,7 +201,7 @@ "path": "lamkin-newVpc/test-lambda-kinesisstreams/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -209,13 +209,13 @@ "path": "lamkin-newVpc/test-lambda-kinesisstreams/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -232,6 +232,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "testlambdakinesisstreamsKinesisStream11A82116" } @@ -244,7 +245,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -270,13 +271,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStream": { @@ -299,13 +300,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -330,13 +331,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -361,19 +362,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kinesisstreams.LambdaToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -400,7 +401,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -444,7 +445,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -452,7 +453,7 @@ "path": "lamkin-newVpc/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -474,7 +475,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -493,13 +494,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -543,7 +544,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -551,7 +552,7 @@ "path": "lamkin-newVpc/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -573,7 +574,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -592,13 +593,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -610,13 +611,13 @@ "path": "lamkin-newVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -632,7 +633,7 @@ "path": "lamkin-newVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -663,7 +664,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -715,19 +716,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -751,13 +752,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -791,13 +792,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_STREAMS": { @@ -847,19 +848,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamkin-newVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -871,7 +880,7 @@ "path": "lamkin-newVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -879,7 +888,7 @@ "path": "lamkin-newVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -887,13 +896,13 @@ "path": "lamkin-newVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "lamkin-newVpc-KINESIS_STREAMS-security-group": { @@ -949,13 +958,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -983,7 +992,7 @@ "path": "lamkin-newVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -991,25 +1000,25 @@ "path": "lamkin-newVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1017,7 +1026,7 @@ "path": "lamkin-newVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1025,13 +1034,13 @@ "path": "lamkin-newVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1045,7 +1054,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.ts index 4a7e6ebff..4fd3979f5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpc.ts @@ -17,6 +17,7 @@ import { LambdaToKinesisStreams } from "../lib"; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import * as lambda from 'aws-cdk-lib/aws-lambda'; +import * as defaults from "@aws-solutions-constructs/core"; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -24,7 +25,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, deployVpc: true diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.assets.json index ada25ee46..784807990 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.assets.json @@ -27,7 +27,7 @@ } } }, - "198b7bba8d1755e78d89438cb40b656111e4db12774d3a04bbe600864cb72490": { + "146810e48d38f20d8701a86f5ebc3049e2fad4a7b473c1be9c1efbab715634ea": { "source": { "path": "lamkin-newVpcFromProps.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "198b7bba8d1755e78d89438cb40b656111e4db12774d3a04bbe600864cb72490.json", + "objectKey": "146810e48d38f20d8701a86f5ebc3049e2fad4a7b473c1be9c1efbab715634ea.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.template.json index 652ab7fa2..e779bbb44 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.template.json @@ -149,6 +149,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "testlambdakinesisstreamsKinesisStream11A82116" } @@ -161,7 +162,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -573,7 +574,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -657,6 +666,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/manifest.json index c0883028b..585139f9f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/manifest.json @@ -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}/198b7bba8d1755e78d89438cb40b656111e4db12774d3a04bbe600864cb72490.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/146810e48d38f20d8701a86f5ebc3049e2fad4a7b473c1be9c1efbab715634ea.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -184,6 +184,12 @@ "data": "VpcKINESISSTREAMSC07D91B5" } ], + "/lamkin-newVpcFromProps/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamkin-newVpcFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/tree.json index 7337c687d..950c6b130 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamkin-newVpcFromProps/test-lambda-kinesisstreams/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -139,19 +139,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -179,13 +179,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -201,7 +201,7 @@ "path": "lamkin-newVpcFromProps/test-lambda-kinesisstreams/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -209,13 +209,13 @@ "path": "lamkin-newVpcFromProps/test-lambda-kinesisstreams/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -232,6 +232,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "testlambdakinesisstreamsKinesisStream11A82116" } @@ -244,7 +245,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -267,13 +268,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStream": { @@ -296,13 +297,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -327,13 +328,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -358,19 +359,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kinesisstreams.LambdaToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "Vpc": { @@ -397,7 +398,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -441,7 +442,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -449,7 +450,7 @@ "path": "lamkin-newVpcFromProps/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -471,7 +472,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -490,13 +491,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -508,13 +509,13 @@ "path": "lamkin-newVpcFromProps/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -530,7 +531,7 @@ "path": "lamkin-newVpcFromProps/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -561,7 +562,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -613,19 +614,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -649,13 +650,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -689,13 +690,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "KINESIS_STREAMS": { @@ -742,19 +743,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamkin-newVpcFromProps/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -766,7 +775,7 @@ "path": "lamkin-newVpcFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -774,7 +783,7 @@ "path": "lamkin-newVpcFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -782,13 +791,13 @@ "path": "lamkin-newVpcFromProps/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "lamkin-newVpcFromProps-KINESIS_STREAMS-security-group": { @@ -844,13 +853,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -878,7 +887,7 @@ "path": "lamkin-newVpcFromProps/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -886,25 +895,25 @@ "path": "lamkin-newVpcFromProps/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -912,7 +921,7 @@ "path": "lamkin-newVpcFromProps/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -920,13 +929,13 @@ "path": "lamkin-newVpcFromProps/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -940,7 +949,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.ts index 474460de3..a1e8582f5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-newVpcFromProps.ts @@ -17,6 +17,7 @@ import { LambdaToKinesisStreams } from "../lib"; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import * as lambda from 'aws-cdk-lib/aws-lambda'; +import * as defaults from "@aws-solutions-constructs/core"; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -24,7 +25,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, vpcProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/lamkin-noArguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/lamkin-noArguments.assets.json index e84dca83a..0aef20a1d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/lamkin-noArguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/lamkin-noArguments.assets.json @@ -14,7 +14,7 @@ } } }, - "08b65b7bd147fc639ec39a433e10a584350a390af3639085de9732729221b589": { + "ddccb402765c7c4af30842629e1b744e2ab9b5e690cd691aaa84a429e7ae035e": { "source": { "path": "lamkin-noArguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "08b65b7bd147fc639ec39a433e10a584350a390af3639085de9732729221b589.json", + "objectKey": "ddccb402765c7c4af30842629e1b744e2ab9b5e690cd691aaa84a429e7ae035e.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/lamkin-noArguments.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/lamkin-noArguments.template.json index d73a52cf2..ac2131f30 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/lamkin-noArguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/lamkin-noArguments.template.json @@ -114,6 +114,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "testlambdakinesisstreamsKinesisStream11A82116" } @@ -126,7 +127,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/manifest.json index 617f778ef..0c7ff85ad 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/manifest.json @@ -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}/08b65b7bd147fc639ec39a433e10a584350a390af3639085de9732729221b589.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ddccb402765c7c4af30842629e1b744e2ab9b5e690cd691aaa84a429e7ae035e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/tree.json index 176cffb22..16bc3c1e2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamkin-noArguments/test-lambda-kinesisstreams/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -134,19 +134,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -162,7 +162,7 @@ "path": "lamkin-noArguments/test-lambda-kinesisstreams/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -170,13 +170,13 @@ "path": "lamkin-noArguments/test-lambda-kinesisstreams/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -193,6 +193,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "KINESIS_DATASTREAM_NAME": { "Ref": "testlambdakinesisstreamsKinesisStream11A82116" } @@ -205,7 +206,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -213,13 +214,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStream": { @@ -242,13 +243,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.CfnStream", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kinesis.Stream", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamGetRecordsIteratorAgeAlarm": { @@ -273,13 +274,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } }, "KinesisStreamReadProvisionedThroughputExceededAlarm": { @@ -304,19 +305,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-kinesisstreams.LambdaToKinesisStreams", - "version": "2.57.0" + "version": "2.60.0" } }, "Integ": { @@ -344,7 +345,7 @@ "path": "lamkin-noArguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -352,25 +353,25 @@ "path": "lamkin-noArguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -378,7 +379,7 @@ "path": "lamkin-noArguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -386,13 +387,13 @@ "path": "lamkin-noArguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -406,7 +407,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.ts index 02ef2a0d2..f7cb36095 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/integ.lamkin-noArguments.ts @@ -17,6 +17,7 @@ import { LambdaToKinesisStreams } from "../lib"; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import * as lambda from 'aws-cdk-lib/aws-lambda'; +import * as defaults from "@aws-solutions-constructs/core"; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); @@ -24,7 +25,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, }); diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/lambda-kinesisstream.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/lambda-kinesisstream.test.ts index 05fd96014..22df58361 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/lambda-kinesisstream.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-kinesisstreams/test/lambda-kinesisstream.test.ts @@ -27,7 +27,7 @@ test('Default construct has all expected properties', () => { const construct = new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' } }); @@ -46,7 +46,7 @@ test('New VPC is created when deployVpc flag is true', () => { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, deployVpc: true @@ -70,7 +70,7 @@ test('Existing VPC is used when specified', () => { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingVpc @@ -92,7 +92,7 @@ test('New VPC is created from user-provided vpcProps', () => { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, vpcProps: { @@ -117,7 +117,7 @@ test('Lambda Function has default stream environment variable', () => { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' } }); @@ -145,7 +145,7 @@ test('Lambda Function stream name environment variable can be overridden', () => new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, streamEnvironmentVariableName: 'CUSTOM_ENV_VAR_NAME' @@ -174,7 +174,7 @@ test('Kinesis Stream is encrypted with AWS-managed CMK by default', () => { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' } }); @@ -194,7 +194,7 @@ test('CloudWatch Alarms are created for Kinesis Stream by default', () => { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' } }); @@ -217,7 +217,7 @@ test('CloudWatch Alarms are not created when createCloudWatchAlarms property is new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, createCloudWatchAlarms: false @@ -232,7 +232,7 @@ test('Error is thrown when vpc is specified and existing lambda function is not const existingLambdaObj = new lambda.Function(stack, 'test-lamba', { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }); @@ -253,7 +253,7 @@ test('Construct uses existing Lambda Function', () => { const existingLambdaObj = new lambda.Function(stack, 'test-lamba', { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', functionName: 'my-lambda-function' }); @@ -278,7 +278,7 @@ test('Construct uses existing Kinesis Stream', () => { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingStreamObj @@ -303,7 +303,7 @@ test('Construct uses unencrypted existing stream', () => { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingStreamObj @@ -326,7 +326,7 @@ test('Construct uses unencrypted streams from stream props', () => { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, kinesisStreamProps: { @@ -352,7 +352,7 @@ test('Construct grants PutRecord permission for the Lambda Function to write to new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' } }); @@ -408,7 +408,7 @@ test('When a Customer-manged CMK is used on an existing stream, construct grants new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingStreamObj @@ -567,7 +567,7 @@ test('Confirm CheckVpcProps() is being called', () => { new LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, deployVpc: true, @@ -582,14 +582,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new cdk.Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: LambdaToKinesisStreamsProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -608,7 +608,7 @@ test('Confirm call to CheckKinesisStreamProps', () => { const props: LambdaToKinesisStreamsProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/lamopn-cluster-config.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/lamopn-cluster-config.assets.json index 168888ffd..dc768f740 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/lamopn-cluster-config.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/lamopn-cluster-config.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "8b378664b31f9adea874ca304eb64d09d48dcc8695e007bc5513f691c363f73d": { + "ce91b64a7a17fe9af7e818a4f8f6f6cdd0b75111d4d078827610389c859641ae": { "source": { "path": "lamopn-cluster-config.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "8b378664b31f9adea874ca304eb64d09d48dcc8695e007bc5513f691c363f73d.json", + "objectKey": "ce91b64a7a17fe9af7e818a4f8f6f6cdd0b75111d4d078827610389c859641ae.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/lamopn-cluster-config.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/lamopn-cluster-config.template.json index 3799222e4..58d9ff659 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/lamopn-cluster-config.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/lamopn-cluster-config.template.json @@ -151,7 +151,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1221,7 +1221,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1232,7 +1232,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1258,6 +1266,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/manifest.json index 8167e9f55..153081049 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/manifest.json @@ -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}/8b378664b31f9adea874ca304eb64d09d48dcc8695e007bc5513f691c363f73d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ce91b64a7a17fe9af7e818a4f8f6f6cdd0b75111d4d078827610389c859641ae.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -286,6 +286,12 @@ "data": "VpcFlowLog8FF33A73" } ], + "/lamopn-cluster-config/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamopn-cluster-config/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/tree.json index fd65b28b9..081dc58d9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamopn-cluster-config/test-lambda-opensearch/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -125,19 +125,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -165,13 +165,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -187,7 +187,7 @@ "path": "lamopn-cluster-config/test-lambda-opensearch/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -195,13 +195,13 @@ "path": "lamopn-cluster-config/test-lambda-opensearch/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -234,7 +234,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -260,13 +260,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPool": { @@ -310,13 +310,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPoolClient": { @@ -354,13 +354,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoIdentityPool": { @@ -388,7 +388,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.147.3" } }, "UserPoolDomain": { @@ -435,7 +435,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoAuthorizedRole": { @@ -447,7 +447,7 @@ "path": "lamopn-cluster-config/test-lambda-opensearch/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -548,13 +548,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IdentityPoolRoleMapping": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoDashboardConfigureRole": { @@ -590,7 +590,7 @@ "path": "lamopn-cluster-config/test-lambda-opensearch/CognitoDashboardConfigureRole/ImportCognitoDashboardConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -615,13 +615,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoDashboardConfigureRolePolicy": { @@ -763,13 +763,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "OpenSearchDomain": { @@ -950,7 +950,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_opensearchservice.CfnDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusRedAlarm": { @@ -975,13 +975,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusYellowAlarm": { @@ -1006,13 +1006,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "FreeStorageSpaceTooLowAlarm": { @@ -1037,13 +1037,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "IndexWritesBlockedTooHighAlarm": { @@ -1068,13 +1068,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1099,13 +1099,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "CPUUtilizationTooHighAlarm": { @@ -1130,13 +1130,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1161,13 +1161,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1192,13 +1192,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1223,19 +1223,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-opensearch.LambdaToOpenSearch", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -1262,7 +1262,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -1306,7 +1306,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1314,7 +1314,7 @@ "path": "lamopn-cluster-config/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1336,7 +1336,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1355,13 +1355,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -1405,7 +1405,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1413,7 +1413,7 @@ "path": "lamopn-cluster-config/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1435,7 +1435,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1454,13 +1454,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1472,13 +1472,13 @@ "path": "lamopn-cluster-config/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1494,7 +1494,7 @@ "path": "lamopn-cluster-config/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1525,7 +1525,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1577,19 +1577,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1613,13 +1613,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1653,19 +1653,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamopn-cluster-config/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1677,7 +1685,7 @@ "path": "lamopn-cluster-config/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1685,7 +1693,7 @@ "path": "lamopn-cluster-config/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1693,13 +1701,13 @@ "path": "lamopn-cluster-config/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1727,7 +1735,7 @@ "path": "lamopn-cluster-config/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1735,25 +1743,25 @@ "path": "lamopn-cluster-config/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1761,7 +1769,7 @@ "path": "lamopn-cluster-config/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1769,13 +1777,13 @@ "path": "lamopn-cluster-config/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1789,7 +1797,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.ts index 8d150d9fb..980f332ad 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-cluster-config.ts @@ -24,7 +24,7 @@ const stack = new Stack(app, defaults.generateIntegStackName(__filename), {}); const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/lamopn-disabled-zone-awareness.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/lamopn-disabled-zone-awareness.assets.json index af8e27d46..03e43a67d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/lamopn-disabled-zone-awareness.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/lamopn-disabled-zone-awareness.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "c38368ee7b0278f3ccee51c0988d3bc2bfb4ef44527995c89193105e9e601043": { + "12b2c777fcbca6e98014ab2c23c088db65ec69162032901dddf421849421520b": { "source": { "path": "lamopn-disabled-zone-awareness.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c38368ee7b0278f3ccee51c0988d3bc2bfb4ef44527995c89193105e9e601043.json", + "objectKey": "12b2c777fcbca6e98014ab2c23c088db65ec69162032901dddf421849421520b.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/lamopn-disabled-zone-awareness.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/lamopn-disabled-zone-awareness.template.json index c085a1141..f5514ba51 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/lamopn-disabled-zone-awareness.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/lamopn-disabled-zone-awareness.template.json @@ -151,7 +151,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1154,7 +1154,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1165,7 +1165,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1191,6 +1199,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/manifest.json index 1b9280aad..c58c1d4c9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/manifest.json @@ -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}/c38368ee7b0278f3ccee51c0988d3bc2bfb4ef44527995c89193105e9e601043.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/12b2c777fcbca6e98014ab2c23c088db65ec69162032901dddf421849421520b.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -268,6 +268,12 @@ "data": "VpcFlowLog8FF33A73" } ], + "/lamopn-disabled-zone-awareness/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamopn-disabled-zone-awareness/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/tree.json index c2b2f9b13..e3c28bf9b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamopn-disabled-zone-awareness/test-lambda-opensearch/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -125,19 +125,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -165,13 +165,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -187,7 +187,7 @@ "path": "lamopn-disabled-zone-awareness/test-lambda-opensearch/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -195,13 +195,13 @@ "path": "lamopn-disabled-zone-awareness/test-lambda-opensearch/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -234,7 +234,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -257,13 +257,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPool": { @@ -307,13 +307,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPoolClient": { @@ -351,13 +351,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoIdentityPool": { @@ -385,7 +385,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.147.3" } }, "UserPoolDomain": { @@ -432,7 +432,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoAuthorizedRole": { @@ -444,7 +444,7 @@ "path": "lamopn-disabled-zone-awareness/test-lambda-opensearch/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -545,13 +545,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IdentityPoolRoleMapping": { @@ -575,7 +575,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoDashboardConfigureRole": { @@ -587,7 +587,7 @@ "path": "lamopn-disabled-zone-awareness/test-lambda-opensearch/CognitoDashboardConfigureRole/ImportCognitoDashboardConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -612,13 +612,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoDashboardConfigureRolePolicy": { @@ -760,13 +760,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "OpenSearchDomain": { @@ -941,7 +941,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_opensearchservice.CfnDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusRedAlarm": { @@ -966,13 +966,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusYellowAlarm": { @@ -997,13 +997,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "FreeStorageSpaceTooLowAlarm": { @@ -1028,13 +1028,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "IndexWritesBlockedTooHighAlarm": { @@ -1059,13 +1059,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1090,13 +1090,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "CPUUtilizationTooHighAlarm": { @@ -1121,13 +1121,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1152,13 +1152,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1183,13 +1183,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1214,19 +1214,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-opensearch.LambdaToOpenSearch", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -1253,7 +1253,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -1297,7 +1297,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1305,7 +1305,7 @@ "path": "lamopn-disabled-zone-awareness/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1327,7 +1327,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1346,13 +1346,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1364,13 +1364,13 @@ "path": "lamopn-disabled-zone-awareness/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1386,7 +1386,7 @@ "path": "lamopn-disabled-zone-awareness/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1417,7 +1417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1469,19 +1469,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1505,13 +1505,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1545,19 +1545,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamopn-disabled-zone-awareness/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1569,7 +1577,7 @@ "path": "lamopn-disabled-zone-awareness/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1577,7 +1585,7 @@ "path": "lamopn-disabled-zone-awareness/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1585,13 +1593,13 @@ "path": "lamopn-disabled-zone-awareness/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1619,7 +1627,7 @@ "path": "lamopn-disabled-zone-awareness/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1627,25 +1635,25 @@ "path": "lamopn-disabled-zone-awareness/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1653,7 +1661,7 @@ "path": "lamopn-disabled-zone-awareness/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1661,13 +1669,13 @@ "path": "lamopn-disabled-zone-awareness/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1681,7 +1689,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.ts index a4f1761df..77b978d64 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-disabled-zone-awareness.ts @@ -24,7 +24,7 @@ const stack = new Stack(app, defaults.generateIntegStackName(__filename), {}); const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/lamopn-domain-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/lamopn-domain-arguments.assets.json index 850122fef..b4517de6e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/lamopn-domain-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/lamopn-domain-arguments.assets.json @@ -14,7 +14,7 @@ } } }, - "12cd8a22b11a5a678b3b7da4fcd50f583634c3b3d1117fbbca51639e0c19d36d": { + "81b9637313df17d6ea86bce7920075d1fc3116aebc6101b0248726d043c840b4": { "source": { "path": "lamopn-domain-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "12cd8a22b11a5a678b3b7da4fcd50f583634c3b3d1117fbbca51639e0c19d36d.json", + "objectKey": "81b9637313df17d6ea86bce7920075d1fc3116aebc6101b0248726d043c840b4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/lamopn-domain-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/lamopn-domain-arguments.template.json index 90f923c55..e94e7296c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/lamopn-domain-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/lamopn-domain-arguments.template.json @@ -116,7 +116,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/manifest.json index 89869319c..ca45fbd08 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/manifest.json @@ -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}/12cd8a22b11a5a678b3b7da4fcd50f583634c3b3d1117fbbca51639e0c19d36d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/81b9637313df17d6ea86bce7920075d1fc3116aebc6101b0248726d043c840b4.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/tree.json index 76c566b1e..f569ccdb7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamopn-domain-arguments/test-lambda-opensearch/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -120,19 +120,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -148,7 +148,7 @@ "path": "lamopn-domain-arguments/test-lambda-opensearch/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -156,13 +156,13 @@ "path": "lamopn-domain-arguments/test-lambda-opensearch/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -195,7 +195,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -203,13 +203,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoUserPool": { @@ -253,13 +253,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoUserPoolClient": { @@ -297,13 +297,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoIdentityPool": { @@ -331,7 +331,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.145.0" } }, "UserPoolDomain": { @@ -378,7 +378,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoAuthorizedRole": { @@ -390,7 +390,7 @@ "path": "lamopn-domain-arguments/test-lambda-opensearch/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -491,13 +491,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "IdentityPoolRoleMapping": { @@ -521,7 +521,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoDashboardConfigureRole": { @@ -533,7 +533,7 @@ "path": "lamopn-domain-arguments/test-lambda-opensearch/CognitoDashboardConfigureRole/ImportCognitoDashboardConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -558,13 +558,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoDashboardConfigureRolePolicy": { @@ -706,13 +706,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } }, "OpenSearchDomain": { @@ -875,7 +875,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_opensearchservice.CfnDomain", - "version": "2.118.0" + "version": "2.145.0" } }, "StatusRedAlarm": { @@ -900,13 +900,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "StatusYellowAlarm": { @@ -931,13 +931,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "FreeStorageSpaceTooLowAlarm": { @@ -962,13 +962,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "IndexWritesBlockedTooHighAlarm": { @@ -993,13 +993,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1024,13 +1024,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "CPUUtilizationTooHighAlarm": { @@ -1055,13 +1055,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1086,13 +1086,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1117,13 +1117,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1148,19 +1148,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-opensearch.LambdaToOpenSearch", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -1176,7 +1176,7 @@ "path": "lamopn-domain-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -1188,7 +1188,7 @@ "path": "lamopn-domain-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1196,25 +1196,25 @@ "path": "lamopn-domain-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -1222,7 +1222,7 @@ "path": "lamopn-domain-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1230,13 +1230,13 @@ "path": "lamopn-domain-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -1244,13 +1244,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.ts index 28f73f9b3..051899036 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-domain-arguments.ts @@ -17,6 +17,7 @@ import { LambdaToOpenSearch } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, CreateShortUniqueTestName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from "@aws-solutions-constructs/core"; // Setup const app = new App(); @@ -24,7 +25,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/lamopn-existing-vpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/lamopn-existing-vpc.assets.json index d5a8ca176..10c444769 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/lamopn-existing-vpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/lamopn-existing-vpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } @@ -29,7 +29,7 @@ } } }, - "078c36ce2aee080fad1e5145bcf50eb1a07c5cf386f41433807449f5dcfdba33": { + "0d84428d2ca7d33cfb643c2c31211d041a0ba7a2abbaf95d0653ab05f3dbb7a0": { "source": { "path": "lamopn-existing-vpc.template.json", "packaging": "file" @@ -37,7 +37,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "078c36ce2aee080fad1e5145bcf50eb1a07c5cf386f41433807449f5dcfdba33.json", + "objectKey": "0d84428d2ca7d33cfb643c2c31211d041a0ba7a2abbaf95d0653ab05f3dbb7a0.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/lamopn-existing-vpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/lamopn-existing-vpc.template.json index 03eca07ba..9d6a73002 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/lamopn-existing-vpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/lamopn-existing-vpc.template.json @@ -614,7 +614,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -625,7 +625,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -801,7 +801,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/manifest.json index 7a94e93bb..5c8a65cbb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/078c36ce2aee080fad1e5145bcf50eb1a07c5cf386f41433807449f5dcfdba33.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/0d84428d2ca7d33cfb643c2c31211d041a0ba7a2abbaf95d0653ab05f3dbb7a0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/tree.json index 1734c8382..55bf2e6be 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "lamopn-existing-vpc/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "lamopn-existing-vpc/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "lamopn-existing-vpc/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "lamopn-existing-vpc/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "lamopn-existing-vpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "lamopn-existing-vpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,19 +835,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -859,7 +859,7 @@ "path": "lamopn-existing-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -867,7 +867,7 @@ "path": "lamopn-existing-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -875,13 +875,13 @@ "path": "lamopn-existing-vpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-lambda-elasticsearch-kibana4": { @@ -897,7 +897,7 @@ "path": "lamopn-existing-vpc/test-lambda-elasticsearch-kibana4/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -960,7 +960,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1001,19 +1001,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -1041,13 +1041,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1063,7 +1063,7 @@ "path": "lamopn-existing-vpc/test-lambda-elasticsearch-kibana4/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1071,13 +1071,13 @@ "path": "lamopn-existing-vpc/test-lambda-elasticsearch-kibana4/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1110,7 +1110,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -1136,13 +1136,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPool": { @@ -1186,13 +1186,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPoolClient": { @@ -1230,13 +1230,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoIdentityPool": { @@ -1264,7 +1264,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.147.3" } }, "UserPoolDomain": { @@ -1311,7 +1311,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoAuthorizedRole": { @@ -1323,7 +1323,7 @@ "path": "lamopn-existing-vpc/test-lambda-elasticsearch-kibana4/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1424,13 +1424,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IdentityPoolRoleMapping": { @@ -1454,7 +1454,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoDashboardConfigureRole": { @@ -1466,7 +1466,7 @@ "path": "lamopn-existing-vpc/test-lambda-elasticsearch-kibana4/CognitoDashboardConfigureRole/ImportCognitoDashboardConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1491,13 +1491,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoDashboardConfigureRolePolicy": { @@ -1639,13 +1639,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "OpenSearchDomain": { @@ -1826,7 +1826,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_opensearchservice.CfnDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusRedAlarm": { @@ -1851,13 +1851,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusYellowAlarm": { @@ -1882,13 +1882,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "FreeStorageSpaceTooLowAlarm": { @@ -1913,13 +1913,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "IndexWritesBlockedTooHighAlarm": { @@ -1944,13 +1944,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1975,13 +1975,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "CPUUtilizationTooHighAlarm": { @@ -2006,13 +2006,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "JVMMemoryPressureTooHighAlarm": { @@ -2037,13 +2037,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -2068,13 +2068,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -2099,19 +2099,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-opensearch.LambdaToOpenSearch", - "version": "2.51.0" + "version": "2.60.0" } }, "Integ": { @@ -2139,7 +2139,7 @@ "path": "lamopn-existing-vpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2147,25 +2147,25 @@ "path": "lamopn-existing-vpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -2173,7 +2173,7 @@ "path": "lamopn-existing-vpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -2181,13 +2181,13 @@ "path": "lamopn-existing-vpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -2201,7 +2201,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.ts index 7efce67e6..b2a2bb08d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-existing-vpc.ts @@ -34,7 +34,7 @@ const vpc = defaults.getTestVpc(stack); const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/lamopn-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/lamopn-no-arguments.assets.json index 64cc650bd..aa00cf4da 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/lamopn-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/lamopn-no-arguments.assets.json @@ -14,7 +14,7 @@ } } }, - "2235d70f906e02fb16b8671977edfcd6540291e1871151e800e5c29d95831eea": { + "33d0d24ef506e019ff4e870b732e5bf8add26a8cf60228db670c4ce4d0e779c9": { "source": { "path": "lamopn-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2235d70f906e02fb16b8671977edfcd6540291e1871151e800e5c29d95831eea.json", + "objectKey": "33d0d24ef506e019ff4e870b732e5bf8add26a8cf60228db670c4ce4d0e779c9.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/lamopn-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/lamopn-no-arguments.template.json index 3c7f2b2be..df504444f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/lamopn-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/lamopn-no-arguments.template.json @@ -116,7 +116,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/manifest.json index b32677c20..ca06a098e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/manifest.json @@ -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}/2235d70f906e02fb16b8671977edfcd6540291e1871151e800e5c29d95831eea.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/33d0d24ef506e019ff4e870b732e5bf8add26a8cf60228db670c4ce4d0e779c9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/tree.json index 53f969373..6e4e1f94e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamopn-no-arguments/test-lambda-opensearch/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -120,19 +120,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -148,7 +148,7 @@ "path": "lamopn-no-arguments/test-lambda-opensearch/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -156,13 +156,13 @@ "path": "lamopn-no-arguments/test-lambda-opensearch/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -195,7 +195,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -203,13 +203,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoUserPool": { @@ -253,13 +253,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoUserPoolClient": { @@ -297,13 +297,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoIdentityPool": { @@ -331,7 +331,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.145.0" } }, "UserPoolDomain": { @@ -378,7 +378,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoAuthorizedRole": { @@ -390,7 +390,7 @@ "path": "lamopn-no-arguments/test-lambda-opensearch/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -491,13 +491,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "IdentityPoolRoleMapping": { @@ -521,7 +521,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoDashboardConfigureRole": { @@ -533,7 +533,7 @@ "path": "lamopn-no-arguments/test-lambda-opensearch/CognitoDashboardConfigureRole/ImportCognitoDashboardConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -558,13 +558,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "CognitoDashboardConfigureRolePolicy": { @@ -706,13 +706,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } }, "OpenSearchDomain": { @@ -875,7 +875,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_opensearchservice.CfnDomain", - "version": "2.118.0" + "version": "2.145.0" } }, "StatusRedAlarm": { @@ -900,13 +900,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "StatusYellowAlarm": { @@ -931,13 +931,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "FreeStorageSpaceTooLowAlarm": { @@ -962,13 +962,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "IndexWritesBlockedTooHighAlarm": { @@ -993,13 +993,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1024,13 +1024,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "CPUUtilizationTooHighAlarm": { @@ -1055,13 +1055,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1086,13 +1086,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1117,13 +1117,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1148,19 +1148,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-opensearch.LambdaToOpenSearch", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -1176,7 +1176,7 @@ "path": "lamopn-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -1188,7 +1188,7 @@ "path": "lamopn-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1196,25 +1196,25 @@ "path": "lamopn-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -1222,7 +1222,7 @@ "path": "lamopn-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1230,13 +1230,13 @@ "path": "lamopn-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -1244,13 +1244,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.ts index 224f4536c..5a86c3fc5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-no-arguments.ts @@ -17,6 +17,7 @@ import { LambdaToOpenSearch } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, CreateShortUniqueTestName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from "@aws-solutions-constructs/core"; // Setup const app = new App(); @@ -24,7 +25,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/lamopn-vpc-props.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/lamopn-vpc-props.assets.json index 3fee381cd..199c442fe 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/lamopn-vpc-props.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/lamopn-vpc-props.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } @@ -29,7 +29,7 @@ } } }, - "944c54a3a3f1a4e09dbe459b9bf12409158f65085c6512f54ac07b9299462b9a": { + "abdc44d4baff27848b7a74f6366caa3753cdb7e39fe92aedcec13c29a8562388": { "source": { "path": "lamopn-vpc-props.template.json", "packaging": "file" @@ -37,7 +37,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "944c54a3a3f1a4e09dbe459b9bf12409158f65085c6512f54ac07b9299462b9a.json", + "objectKey": "abdc44d4baff27848b7a74f6366caa3753cdb7e39fe92aedcec13c29a8562388.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/lamopn-vpc-props.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/lamopn-vpc-props.template.json index 397e4b199..fd72a8d25 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/lamopn-vpc-props.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/lamopn-vpc-props.template.json @@ -151,7 +151,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -1213,7 +1213,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1224,7 +1224,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/manifest.json index 1f15130a5..c79895576 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/944c54a3a3f1a4e09dbe459b9bf12409158f65085c6512f54ac07b9299462b9a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/abdc44d4baff27848b7a74f6366caa3753cdb7e39fe92aedcec13c29a8562388.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/tree.json index 869928690..2ad676113 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamopn-vpc-props/test-lambda-opensearch/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -125,19 +125,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -165,13 +165,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -187,7 +187,7 @@ "path": "lamopn-vpc-props/test-lambda-opensearch/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -195,13 +195,13 @@ "path": "lamopn-vpc-props/test-lambda-opensearch/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -234,7 +234,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -260,13 +260,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPool": { @@ -310,13 +310,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPool", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPool", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoUserPoolClient": { @@ -354,13 +354,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.UserPoolClient", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoIdentityPool": { @@ -388,7 +388,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPool", - "version": "2.118.0" + "version": "2.147.3" } }, "UserPoolDomain": { @@ -435,7 +435,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnUserPoolDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoAuthorizedRole": { @@ -447,7 +447,7 @@ "path": "lamopn-vpc-props/test-lambda-opensearch/CognitoAuthorizedRole/ImportCognitoAuthorizedRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -548,13 +548,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "IdentityPoolRoleMapping": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cognito.CfnIdentityPoolRoleAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoDashboardConfigureRole": { @@ -590,7 +590,7 @@ "path": "lamopn-vpc-props/test-lambda-opensearch/CognitoDashboardConfigureRole/ImportCognitoDashboardConfigureRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -615,13 +615,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "CognitoDashboardConfigureRolePolicy": { @@ -763,13 +763,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } }, "OpenSearchDomain": { @@ -950,7 +950,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_opensearchservice.CfnDomain", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusRedAlarm": { @@ -975,13 +975,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "StatusYellowAlarm": { @@ -1006,13 +1006,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "FreeStorageSpaceTooLowAlarm": { @@ -1037,13 +1037,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "IndexWritesBlockedTooHighAlarm": { @@ -1068,13 +1068,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "AutomatedSnapshotFailureTooHighAlarm": { @@ -1099,13 +1099,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "CPUUtilizationTooHighAlarm": { @@ -1130,13 +1130,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "JVMMemoryPressureTooHighAlarm": { @@ -1161,13 +1161,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterCPUUtilizationTooHighAlarm": { @@ -1192,13 +1192,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } }, "MasterJVMMemoryPressureTooHighAlarm": { @@ -1223,19 +1223,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-opensearch.LambdaToOpenSearch", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -1262,7 +1262,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -1306,7 +1306,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1314,7 +1314,7 @@ "path": "lamopn-vpc-props/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1336,7 +1336,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1355,13 +1355,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -1405,7 +1405,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -1413,7 +1413,7 @@ "path": "lamopn-vpc-props/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -1435,7 +1435,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -1454,13 +1454,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1472,13 +1472,13 @@ "path": "lamopn-vpc-props/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1494,7 +1494,7 @@ "path": "lamopn-vpc-props/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1525,7 +1525,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1577,19 +1577,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1613,13 +1613,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1653,19 +1653,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1677,7 +1677,7 @@ "path": "lamopn-vpc-props/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1685,7 +1685,7 @@ "path": "lamopn-vpc-props/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1693,13 +1693,13 @@ "path": "lamopn-vpc-props/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1727,7 +1727,7 @@ "path": "lamopn-vpc-props/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1735,25 +1735,25 @@ "path": "lamopn-vpc-props/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1761,7 +1761,7 @@ "path": "lamopn-vpc-props/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1769,13 +1769,13 @@ "path": "lamopn-vpc-props/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1789,7 +1789,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.ts index 06ffc6864..cf2acca61 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/integ.lamopn-vpc-props.ts @@ -32,7 +32,7 @@ const stack = new Stack(app, defaults.generateIntegStackName(__filename), { const lambdaProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/lambda-opensearch.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/lambda-opensearch.test.ts index 503a67492..abfddef0c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/lambda-opensearch.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-opensearch/test/lambda-opensearch.test.ts @@ -30,7 +30,7 @@ function deployLambdaToOpenSearch(stack: cdk.Stack) { function getDefaultTestLambdaProps(): lambda.FunctionProps { return { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', }; } @@ -94,7 +94,7 @@ test('Check for an existing Lambda object', () => { const existingLambdaObj = defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', functionName: 'test-function' } @@ -127,7 +127,7 @@ test('Check Lambda function custom environment variable', () => { const template = Template.fromStack(stack); template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', @@ -630,7 +630,7 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new cdk.Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -638,7 +638,7 @@ test('Confirm call to CheckLambdaProps', () => { const props: LambdaToOpenSearchProps = { openSearchDomainName: 'name', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/lams3-customLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/lams3-customLoggingBucket.assets.json index c31abdecc..15d4010e5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/lams3-customLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/lams3-customLoggingBucket.assets.json @@ -14,20 +14,20 @@ } } }, - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "858effa8d20d0b81dbb8abac8e009d866833c981a746e2c1916692c106060cf9": { + "c6f32e5040d43e9660ce8ae92db36575cbeb4233d0b0cec353384e12f813b80c": { "source": { "path": "lams3-customLoggingBucket.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "858effa8d20d0b81dbb8abac8e009d866833c981a746e2c1916692c106060cf9.json", + "objectKey": "c6f32e5040d43e9660ce8ae92db36575cbeb4233d0b0cec353384e12f813b80c.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/lams3-customLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/lams3-customLoggingBucket.template.json index 979aeeaf2..d4d830252 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/lams3-customLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/lams3-customLoggingBucket.template.json @@ -150,7 +150,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -492,7 +492,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -503,7 +503,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -540,6 +548,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/manifest.json index df8c2cd4b..b65f0bce0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/manifest.json @@ -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}/858effa8d20d0b81dbb8abac8e009d866833c981a746e2c1916692c106060cf9.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c6f32e5040d43e9660ce8ae92db36575cbeb4233d0b0cec353384e12f813b80c.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -130,6 +130,12 @@ "data": "testlambdas3S3BucketPolicyE899B211" } ], + "/lams3-customLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lams3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/tree.json index 4f926122c..330854adc 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lams3-customLoggingBucket/test-lambda-s3/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -157,19 +157,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -185,7 +185,7 @@ "path": "lams3-customLoggingBucket/test-lambda-s3/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -193,13 +193,13 @@ "path": "lams3-customLoggingBucket/test-lambda-s3/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -229,7 +229,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -237,13 +237,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "S3LoggingBucket": { @@ -297,7 +297,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -431,13 +431,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -449,19 +449,19 @@ "path": "lams3-customLoggingBucket/test-lambda-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -514,7 +514,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -573,25 +573,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-s3.LambdaToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lams3-customLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -603,7 +611,7 @@ "path": "lams3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -611,7 +619,7 @@ "path": "lams3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -619,13 +627,13 @@ "path": "lams3-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -641,7 +649,7 @@ "path": "lams3-customLoggingBucket/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -653,7 +661,7 @@ "path": "lams3-customLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -661,25 +669,25 @@ "path": "lams3-customLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -687,7 +695,7 @@ "path": "lams3-customLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -695,13 +703,13 @@ "path": "lams3-customLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -709,13 +717,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.ts index 1adf6ab09..a28f2527f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-customLoggingBucket.ts @@ -18,6 +18,7 @@ import { LambdaToS3 } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from "@aws-solutions-constructs/core"; const app = new App(); @@ -26,7 +27,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); new LambdaToS3(stack, 'test-lambda-s3', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/lams3-deployFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/lams3-deployFunction.assets.json index d9624fd4d..4febdf5fa 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/lams3-deployFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/lams3-deployFunction.assets.json @@ -14,20 +14,20 @@ } } }, - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "eff02f4c277c01ec6dea6f6f1655eca03a16f6a4990454c08815c68359d18e14": { + "85d4c6524783c8409140cd70389f76bc03d92a5d88cbc1c7b6b84e151e07f7fe": { "source": { "path": "lams3-deployFunction.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "eff02f4c277c01ec6dea6f6f1655eca03a16f6a4990454c08815c68359d18e14.json", + "objectKey": "85d4c6524783c8409140cd70389f76bc03d92a5d88cbc1c7b6b84e151e07f7fe.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/lams3-deployFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/lams3-deployFunction.template.json index 69fe26fa8..218e6dee8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/lams3-deployFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/lams3-deployFunction.template.json @@ -151,7 +151,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -554,7 +554,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -565,7 +565,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -602,6 +610,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/manifest.json index 393b3f138..420c956c6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/manifest.json @@ -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}/eff02f4c277c01ec6dea6f6f1655eca03a16f6a4990454c08815c68359d18e14.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/85d4c6524783c8409140cd70389f76bc03d92a5d88cbc1c7b6b84e151e07f7fe.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -136,6 +136,12 @@ "data": "testlambdas3S3BucketAutoDeleteObjectsCustomResourceF8A326E6" } ], + "/lams3-deployFunction/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lams3-deployFunction/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/tree.json index a3df97a3a..678812624 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lams3-deployFunction/test-lambda-s3/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -157,19 +157,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -185,7 +185,7 @@ "path": "lams3-deployFunction/test-lambda-s3/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -193,13 +193,13 @@ "path": "lams3-deployFunction/test-lambda-s3/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -229,7 +229,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -237,13 +237,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "S3LoggingBucket": { @@ -284,7 +284,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -418,13 +418,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -436,19 +436,19 @@ "path": "lams3-deployFunction/test-lambda-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -507,7 +507,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -605,13 +605,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -623,25 +623,33 @@ "path": "lams3-deployFunction/test-lambda-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-s3.LambdaToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lams3-deployFunction/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -653,7 +661,7 @@ "path": "lams3-deployFunction/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -661,7 +669,7 @@ "path": "lams3-deployFunction/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -669,13 +677,13 @@ "path": "lams3-deployFunction/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -691,7 +699,7 @@ "path": "lams3-deployFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -703,7 +711,7 @@ "path": "lams3-deployFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -711,25 +719,25 @@ "path": "lams3-deployFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -737,7 +745,7 @@ "path": "lams3-deployFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -745,13 +753,13 @@ "path": "lams3-deployFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -759,13 +767,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.ts index 8e4b13d67..157ea24f4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunction.ts @@ -28,7 +28,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-s3'; // Definitions const props: LambdaToS3Props = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/lams3-deployFunctionWithVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/lams3-deployFunctionWithVpc.assets.json index 815b18df4..296bdb9e3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/lams3-deployFunctionWithVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/lams3-deployFunctionWithVpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "60c5a0cf6ca22304bb623c643ba5816bf139879d9899da3091342bb08bc02a2b": { + "62a22da0c7e317e7970ccd3d3a5c19d02e31d95c1e6a77acebbc6484ec2c5369": { "source": { "path": "lams3-deployFunctionWithVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "60c5a0cf6ca22304bb623c643ba5816bf139879d9899da3091342bb08bc02a2b.json", + "objectKey": "62a22da0c7e317e7970ccd3d3a5c19d02e31d95c1e6a77acebbc6484ec2c5369.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/lams3-deployFunctionWithVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/lams3-deployFunctionWithVpc.template.json index db4abe144..a9489e697 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/lams3-deployFunctionWithVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/lams3-deployFunctionWithVpc.template.json @@ -186,7 +186,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -698,7 +698,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -709,7 +709,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -735,6 +743,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/manifest.json index fdf1b94b1..0d798a249 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/manifest.json @@ -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}/60c5a0cf6ca22304bb623c643ba5816bf139879d9899da3091342bb08bc02a2b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/62a22da0c7e317e7970ccd3d3a5c19d02e31d95c1e6a77acebbc6484ec2c5369.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -196,6 +196,12 @@ "data": "VpcS3A5408339" } ], + "/lams3-deployFunctionWithVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lams3-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/tree.json index c5fa02ae9..89e494159 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lams3-deployFunctionWithVpc/test-lambda-s3/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -162,19 +162,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -202,13 +202,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -224,7 +224,7 @@ "path": "lams3-deployFunctionWithVpc/test-lambda-s3/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -232,13 +232,13 @@ "path": "lams3-deployFunctionWithVpc/test-lambda-s3/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -268,7 +268,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -294,13 +294,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -348,7 +348,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -407,25 +407,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-s3.LambdaToS3", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -452,7 +452,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -496,7 +496,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -504,7 +504,7 @@ "path": "lams3-deployFunctionWithVpc/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -526,7 +526,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -545,13 +545,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -595,7 +595,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -603,7 +603,7 @@ "path": "lams3-deployFunctionWithVpc/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -625,7 +625,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -644,13 +644,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -662,13 +662,13 @@ "path": "lams3-deployFunctionWithVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -684,7 +684,7 @@ "path": "lams3-deployFunctionWithVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -715,7 +715,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -767,19 +767,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -803,13 +803,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -843,13 +843,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "S3": { @@ -890,19 +890,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.GatewayVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lams3-deployFunctionWithVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -914,7 +922,7 @@ "path": "lams3-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -922,7 +930,7 @@ "path": "lams3-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -930,13 +938,13 @@ "path": "lams3-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -964,7 +972,7 @@ "path": "lams3-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -972,25 +980,25 @@ "path": "lams3-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -998,7 +1006,7 @@ "path": "lams3-deployFunctionWithVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1006,13 +1014,13 @@ "path": "lams3-deployFunctionWithVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1026,7 +1034,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.ts index 74018706a..625912189 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-deployFunctionWithVpc.ts @@ -17,18 +17,18 @@ import { LambdaToS3, LambdaToS3Props } from "../lib"; import * as lambda from "aws-cdk-lib/aws-lambda"; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as s3 from "aws-cdk-lib/aws-s3"; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); stack.templateOptions.description = "Integration Test for aws-lambda-s3"; -import * as s3 from "aws-cdk-lib/aws-s3"; -import * as defaults from '@aws-solutions-constructs/core'; // Definitions const props: LambdaToS3Props = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/lams3-existingFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/lams3-existingFunction.assets.json index 459b87534..b7ab6b9e7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/lams3-existingFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/lams3-existingFunction.assets.json @@ -14,20 +14,20 @@ } } }, - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "bbbfd0214c4e00285428e3fdb162fdcab0ef4ff419e2f8565f8752145f5e9198": { + "cf517c600a6fc85d8ac90b2a51046abf1ce47a93f6e42ab59115eca7e1b1c51f": { "source": { "path": "lams3-existingFunction.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bbbfd0214c4e00285428e3fdb162fdcab0ef4ff419e2f8565f8752145f5e9198.json", + "objectKey": "cf517c600a6fc85d8ac90b2a51046abf1ce47a93f6e42ab59115eca7e1b1c51f.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/lams3-existingFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/lams3-existingFunction.template.json index 5a0292cfc..2eff7912c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/lams3-existingFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/lams3-existingFunction.template.json @@ -151,7 +151,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -544,7 +544,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -555,7 +555,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -592,6 +600,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/manifest.json index 607d7640d..651720d78 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/manifest.json @@ -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}/bbbfd0214c4e00285428e3fdb162fdcab0ef4ff419e2f8565f8752145f5e9198.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cf517c600a6fc85d8ac90b2a51046abf1ce47a93f6e42ab59115eca7e1b1c51f.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -136,6 +136,12 @@ "data": "testlambdas3S3BucketAutoDeleteObjectsCustomResourceF8A326E6" } ], + "/lams3-existingFunction/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lams3-existingFunction/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/tree.json index 01c5c277e..feda260bd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lams3-existingFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -153,19 +153,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -181,7 +181,7 @@ "path": "lams3-existingFunction/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -189,13 +189,13 @@ "path": "lams3-existingFunction/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -225,7 +225,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -233,13 +233,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "test-lambda-s3": { @@ -284,7 +284,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -418,13 +418,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -436,19 +436,19 @@ "path": "lams3-existingFunction/test-lambda-s3/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -507,7 +507,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -605,13 +605,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -623,25 +623,33 @@ "path": "lams3-existingFunction/test-lambda-s3/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-s3.LambdaToS3", - "version": "2.50.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lams3-existingFunction/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -653,7 +661,7 @@ "path": "lams3-existingFunction/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -661,7 +669,7 @@ "path": "lams3-existingFunction/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -669,13 +677,13 @@ "path": "lams3-existingFunction/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -691,7 +699,7 @@ "path": "lams3-existingFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -703,7 +711,7 @@ "path": "lams3-existingFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -711,25 +719,25 @@ "path": "lams3-existingFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -737,7 +745,7 @@ "path": "lams3-existingFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -745,13 +753,13 @@ "path": "lams3-existingFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -759,13 +767,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.ts index 874674f4a..1cf82ba59 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-existingFunction.ts @@ -26,7 +26,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-s3'; // Definitions const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/lams3-pre-existing-bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/lams3-pre-existing-bucket.assets.json index 615ee0f16..c458f5c82 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/lams3-pre-existing-bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/lams3-pre-existing-bucket.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "01acd519a5baa389d9a30f99738fcdde97f25fef9906b9c4b06367014e9b28a8": { + "3e8f57756fcfd1ecde7e56bfac6eda028c92f8f8804b930a148d16162a43e909": { "source": { "path": "lams3-pre-existing-bucket.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "01acd519a5baa389d9a30f99738fcdde97f25fef9906b9c4b06367014e9b28a8.json", + "objectKey": "3e8f57756fcfd1ecde7e56bfac6eda028c92f8f8804b930a148d16162a43e909.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/lams3-pre-existing-bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/lams3-pre-existing-bucket.template.json index 704061206..fd5d809fb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/lams3-pre-existing-bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/lams3-pre-existing-bucket.template.json @@ -206,7 +206,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -217,7 +217,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -549,7 +557,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -578,6 +586,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/manifest.json index b2e37a30c..448a92da2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/manifest.json @@ -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}/01acd519a5baa389d9a30f99738fcdde97f25fef9906b9c4b06367014e9b28a8.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3e8f57756fcfd1ecde7e56bfac6eda028c92f8f8804b930a148d16162a43e909.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/lams3-pre-existing-bucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lams3-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/tree.json index 8f5c19ed1..f1aa7a912 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "lams3-pre-existing-bucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lams3-pre-existing-bucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "lams3-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "lams3-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "lams3-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -376,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -394,19 +402,19 @@ "path": "lams3-pre-existing-bucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "mybucket": { @@ -414,7 +422,7 @@ "path": "lams3-pre-existing-bucket/mybucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-lambda-s3-pre-existing-bucket": { @@ -430,7 +438,7 @@ "path": "lams3-pre-existing-bucket/test-lambda-s3-pre-existing-bucket/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -493,7 +501,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -577,19 +585,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -605,7 +613,7 @@ "path": "lams3-pre-existing-bucket/test-lambda-s3-pre-existing-bucket/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -613,13 +621,13 @@ "path": "lams3-pre-existing-bucket/test-lambda-s3-pre-existing-bucket/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -649,7 +657,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -657,19 +665,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-s3.LambdaToS3", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -685,7 +693,7 @@ "path": "lams3-pre-existing-bucket/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -697,7 +705,7 @@ "path": "lams3-pre-existing-bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -705,25 +713,25 @@ "path": "lams3-pre-existing-bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -731,7 +739,7 @@ "path": "lams3-pre-existing-bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -739,13 +747,13 @@ "path": "lams3-pre-existing-bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -753,13 +761,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.ts index cfab3ea50..b73a9d4bb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/integ.lams3-pre-existing-bucket.ts @@ -19,6 +19,7 @@ import * as s3 from 'aws-cdk-lib/aws-s3'; import { CreateScrapBucket, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -33,7 +34,7 @@ const mybucket: s3.IBucket = s3.Bucket.fromBucketName(stack, 'mybucket', existin const props: LambdaToS3Props = { existingBucketObj: mybucket, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/lambda-s3.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/lambda-s3.test.ts index a05aaaf95..8a76eaab5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/lambda-s3.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-s3/test/lambda-s3.test.ts @@ -26,7 +26,7 @@ test('Test the properties', () => { // Helper declaration const pattern = new LambdaToS3(stack, 'lambda-to-s3-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -47,7 +47,7 @@ test('Test the bucketProps override', () => { // Helper declaration new LambdaToS3(stack, 'lambda-to-s3-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -69,7 +69,7 @@ test("Test minimal deployment that deploys a VPC without vpcProps", () => { // Helper declaration new LambdaToS3(stack, "lambda-to-s3-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -117,7 +117,7 @@ test("Test minimal deployment that deploys a VPC w/vpcProps", () => { // Helper declaration new LambdaToS3(stack, "lambda-to-s3-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -174,7 +174,7 @@ test("Test minimal deployment with an existing VPC", () => { // Helper declaration new LambdaToS3(stack, "lambda-to-s3-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -213,7 +213,7 @@ test("Test minimal deployment with an existing VPC and existing Lambda function const stack = new Stack(); const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -245,7 +245,7 @@ test('Test lambda function custom environment variable', () => { new LambdaToS3(stack, 'lambda-to-s3-stack', { existingBucketObj: mybucket, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -256,7 +256,7 @@ test('Test lambda function custom environment variable', () => { const template = Template.fromStack(stack); template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', @@ -281,7 +281,7 @@ test("Confirm that CheckS3Props is being called", () => { // Helper declaration new LambdaToS3(stack, "bad-s3-args", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -300,7 +300,7 @@ test('Test that CheckProps() is flagging errors correctly', () => { const stack = new Stack(); const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -309,7 +309,7 @@ test('Test that CheckProps() is flagging errors correctly', () => { new LambdaToS3(stack, "lambda-to-s3-stack", { existingLambdaObj: testLambdaFunction, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -329,7 +329,7 @@ test('s3 bucket with bucket, loggingBucket, and auto delete objects', () => { new LambdaToS3(stack, 'lambda-s3', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, bucketProps: { @@ -363,7 +363,7 @@ test('s3 bucket with one content bucket and no logging bucket', () => { new LambdaToS3(stack, 'lambda-s3', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, bucketProps: { @@ -382,7 +382,7 @@ test('Test bad bucket permission', () => { const props = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, bucketProps: { @@ -414,7 +414,7 @@ test("Confirm that CheckVpcProps is being called", () => { // Helper declaration new LambdaToS3(stack, "bad-s3-args", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -433,14 +433,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: LambdaToS3Props = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/aws-lambda-sagemakerendpoint.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/aws-lambda-sagemakerendpoint.test.ts index c0a3efec8..1d8f76748 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/aws-lambda-sagemakerendpoint.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sagemakerendpoint/test/aws-lambda-sagemakerendpoint.test.ts @@ -597,7 +597,7 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -610,7 +610,7 @@ test('Confirm call to CheckLambdaProps', () => { }, }, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -639,7 +639,7 @@ test('Confirm call to CheckSagemakerProps', () => { existingSagemakerEndpointObj: deploySagemakerEndpointResponse.endpoint, endpointProps: { endpointConfigName: 'test' }, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/lamsec-deployFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/lamsec-deployFunction.assets.json index f6404f9e7..a34474be0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/lamsec-deployFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/lamsec-deployFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "880b5cdeae07a9007bf7d25f1a6dc9eac8b90346d0ab395a963b93545506f0f0": { + "1cf756c0320e17410ada919facac6ed00c925f64562bf89d0635b860bedfbe51": { "source": { "path": "lamsec-deployFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "880b5cdeae07a9007bf7d25f1a6dc9eac8b90346d0ab395a963b93545506f0f0.json", + "objectKey": "1cf756c0320e17410ada919facac6ed00c925f64562bf89d0635b860bedfbe51.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/lamsec-deployFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/lamsec-deployFunction.template.json index 9f70d6611..a23ae54fe 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/lamsec-deployFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/lamsec-deployFunction.template.json @@ -124,7 +124,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/manifest.json index 7e5876025..ad97c6ab5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/manifest.json @@ -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}/880b5cdeae07a9007bf7d25f1a6dc9eac8b90346d0ab395a963b93545506f0f0.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1cf756c0320e17410ada919facac6ed00c925f64562bf89d0635b860bedfbe51.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/tree.json index 694758f85..c79032cf8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamsec-deployFunction/test-lambda-secretsmanager/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -130,19 +130,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -158,7 +158,7 @@ "path": "lamsec-deployFunction/test-lambda-secretsmanager/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -166,13 +166,13 @@ "path": "lamsec-deployFunction/test-lambda-secretsmanager/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -202,7 +202,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -210,13 +210,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "secret": { @@ -234,19 +234,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.Secret", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-secretsmanager.LambdaToSecretsmanager", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -262,7 +262,7 @@ "path": "lamsec-deployFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -274,7 +274,7 @@ "path": "lamsec-deployFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -282,25 +282,25 @@ "path": "lamsec-deployFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -308,7 +308,7 @@ "path": "lamsec-deployFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -316,13 +316,13 @@ "path": "lamsec-deployFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -330,13 +330,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.ts index 12dabe331..a98c70df6 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunction.ts @@ -17,6 +17,7 @@ import {LambdaToSecretsmanager, LambdaToSecretsmanagerProps} from '../lib'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-secretsmana // Definitions const props: LambdaToSecretsmanagerProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsec-deployFunctionWithExistingVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsec-deployFunctionWithExistingVpc.assets.json index e6fbba21c..d1d1f34f6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsec-deployFunctionWithExistingVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsec-deployFunctionWithExistingVpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "866ffc8bad93a64431285277a99984416862edce03b94fdce329050fccc8d372": { + "a0b49a3bdffc9a1db55e4e79de6c307de5344b0ca1c970f2196a628e1c3af191": { "source": { "path": "lamsec-deployFunctionWithExistingVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "866ffc8bad93a64431285277a99984416862edce03b94fdce329050fccc8d372.json", + "objectKey": "a0b49a3bdffc9a1db55e4e79de6c307de5344b0ca1c970f2196a628e1c3af191.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsec-deployFunctionWithExistingVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsec-deployFunctionWithExistingVpc.template.json index 43e89cb5d..a73a2e0a7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsec-deployFunctionWithExistingVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsec-deployFunctionWithExistingVpc.template.json @@ -661,7 +661,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -672,7 +672,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -855,7 +863,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -982,6 +990,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/manifest.json index 917b3d9ce..9c17b50eb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/manifest.json @@ -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}/866ffc8bad93a64431285277a99984416862edce03b94fdce329050fccc8d372.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a0b49a3bdffc9a1db55e4e79de6c307de5344b0ca1c970f2196a628e1c3af191.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -256,6 +256,12 @@ "data": "VpcSECRETSMANAGERF52907C2" } ], + "/lamsec-deployFunctionWithExistingVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamsec-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/tree.json index 9ae01e4a5..b393f8bab 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "lamsec-deployFunctionWithExistingVpc/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "lamsec-deployFunctionWithExistingVpc/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "lamsec-deployFunctionWithExistingVpc/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "lamsec-deployFunctionWithExistingVpc/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "lamsec-deployFunctionWithExistingVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "lamsec-deployFunctionWithExistingVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "SECRETS_MANAGER": { @@ -891,19 +891,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamsec-deployFunctionWithExistingVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -915,7 +923,7 @@ "path": "lamsec-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -923,7 +931,7 @@ "path": "lamsec-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -931,13 +939,13 @@ "path": "lamsec-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-lambda-secretsmanager-stack": { @@ -953,7 +961,7 @@ "path": "lamsec-deployFunctionWithExistingVpc/test-lambda-secretsmanager-stack/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1016,7 +1024,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1067,19 +1075,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -1107,13 +1115,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1129,7 +1137,7 @@ "path": "lamsec-deployFunctionWithExistingVpc/test-lambda-secretsmanager-stack/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1137,13 +1145,13 @@ "path": "lamsec-deployFunctionWithExistingVpc/test-lambda-secretsmanager-stack/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1173,7 +1181,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -1199,13 +1207,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "secret": { @@ -1223,19 +1231,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.Secret", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-secretsmanager.LambdaToSecretsmanager", - "version": "2.51.0" + "version": "2.60.0" } }, "lamsec-deployFunctionWithExistingVpc-SECRETS_MANAGER-security-group": { @@ -1291,13 +1299,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1325,7 +1333,7 @@ "path": "lamsec-deployFunctionWithExistingVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1333,25 +1341,25 @@ "path": "lamsec-deployFunctionWithExistingVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1359,7 +1367,7 @@ "path": "lamsec-deployFunctionWithExistingVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1367,13 +1375,13 @@ "path": "lamsec-deployFunctionWithExistingVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1387,7 +1395,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.ts index 80ce983c7..721cc7209 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithExistingVpc.ts @@ -36,7 +36,7 @@ const vpc = defaults.buildVpc(stack, { // Definitions const props: LambdaToSecretsmanagerProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsec-deployFunctionWithVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsec-deployFunctionWithVpc.assets.json index b3a38f3b4..c0ee101bb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsec-deployFunctionWithVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsec-deployFunctionWithVpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "3e96a03de5cfcdd400cf059642107c4e5d82255739abe948e6369bf756f2dae8": { + "6aa89e59ba64067219537ccf116444dda70ccd298eaa7fe42169df80bdc01254": { "source": { "path": "lamsec-deployFunctionWithVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3e96a03de5cfcdd400cf059642107c4e5d82255739abe948e6369bf756f2dae8.json", + "objectKey": "6aa89e59ba64067219537ccf116444dda70ccd298eaa7fe42169df80bdc01254.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsec-deployFunctionWithVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsec-deployFunctionWithVpc.template.json index 92f12ee8f..29866cf7f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsec-deployFunctionWithVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsec-deployFunctionWithVpc.template.json @@ -159,7 +159,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -603,7 +603,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -614,7 +614,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -698,6 +706,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/manifest.json index fe803f919..a5ab4d35b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/manifest.json @@ -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}/3e96a03de5cfcdd400cf059642107c4e5d82255739abe948e6369bf756f2dae8.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6aa89e59ba64067219537ccf116444dda70ccd298eaa7fe42169df80bdc01254.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -190,6 +190,12 @@ "data": "VpcSECRETSMANAGERF52907C2" } ], + "/lamsec-deployFunctionWithVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamsec-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/tree.json index c22e94b88..7fd406dfd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamsec-deployFunctionWithVpc/test-lambda-secretsmanager/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -135,19 +135,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -175,13 +175,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -197,7 +197,7 @@ "path": "lamsec-deployFunctionWithVpc/test-lambda-secretsmanager/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -205,13 +205,13 @@ "path": "lamsec-deployFunctionWithVpc/test-lambda-secretsmanager/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -241,7 +241,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -267,13 +267,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "secret": { @@ -291,19 +291,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.Secret", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-secretsmanager.LambdaToSecretsmanager", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -330,7 +330,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -374,7 +374,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -382,7 +382,7 @@ "path": "lamsec-deployFunctionWithVpc/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -404,7 +404,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -423,13 +423,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -473,7 +473,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -481,7 +481,7 @@ "path": "lamsec-deployFunctionWithVpc/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -503,7 +503,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -522,13 +522,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -540,13 +540,13 @@ "path": "lamsec-deployFunctionWithVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -562,7 +562,7 @@ "path": "lamsec-deployFunctionWithVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -593,7 +593,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -645,19 +645,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -681,13 +681,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -721,13 +721,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "SECRETS_MANAGER": { @@ -777,19 +777,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamsec-deployFunctionWithVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -801,7 +809,7 @@ "path": "lamsec-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -809,7 +817,7 @@ "path": "lamsec-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -817,13 +825,13 @@ "path": "lamsec-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "lamsec-deployFunctionWithVpc-SECRETS_MANAGER-security-group": { @@ -879,13 +887,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -913,7 +921,7 @@ "path": "lamsec-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -921,25 +929,25 @@ "path": "lamsec-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -947,7 +955,7 @@ "path": "lamsec-deployFunctionWithVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -955,13 +963,13 @@ "path": "lamsec-deployFunctionWithVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -975,7 +983,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.ts index c70c3973f..032117249 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-deployFunctionWithVpc.ts @@ -17,8 +17,9 @@ import { LambdaToSecretsmanagerProps, LambdaToSecretsmanager } from '../lib'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; -// Setup +// import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); stack.templateOptions.description = "Integration Test for aws-lambda-secretsmanager"; @@ -26,7 +27,7 @@ stack.templateOptions.description = "Integration Test for aws-lambda-secretsmana // Definitions const props: LambdaToSecretsmanagerProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.assets.json index 3ab61eb91..130c2bc70 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "d12218a763ae607c09ffb72b925a57ea552697f5d35bf1fe7f74bffbab1b3f8a": { + "61e6bebc35c977a2f2a620286b2ca59bb34b9928c91c28468653b0c20895ddaa": { "source": { "path": "lamsec-existingFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d12218a763ae607c09ffb72b925a57ea552697f5d35bf1fe7f74bffbab1b3f8a.json", + "objectKey": "61e6bebc35c977a2f2a620286b2ca59bb34b9928c91c28468653b0c20895ddaa.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.template.json index fa65f0919..658535a63 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.template.json @@ -124,7 +124,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/manifest.json index eb2f964c2..29ca84a38 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/manifest.json @@ -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}/d12218a763ae607c09ffb72b925a57ea552697f5d35bf1fe7f74bffbab1b3f8a.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/61e6bebc35c977a2f2a620286b2ca59bb34b9928c91c28468653b0c20895ddaa.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/tree.json index 6c435af81..2e3d5594b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamsec-existingFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -126,19 +126,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -154,7 +154,7 @@ "path": "lamsec-existingFunction/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -162,13 +162,13 @@ "path": "lamsec-existingFunction/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -198,7 +198,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -206,13 +206,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "test-lambda-secretsmanager": { @@ -234,19 +234,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.CfnSecret", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_secretsmanager.Secret", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-secretsmanager.LambdaToSecretsmanager", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -262,7 +262,7 @@ "path": "lamsec-existingFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -274,7 +274,7 @@ "path": "lamsec-existingFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -282,25 +282,25 @@ "path": "lamsec-existingFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -308,7 +308,7 @@ "path": "lamsec-existingFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -316,13 +316,13 @@ "path": "lamsec-existingFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -330,13 +330,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.ts index f438e83bc..dad66bc9c 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/integ.lamsec-existingFunction.ts @@ -26,7 +26,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-secretsmana // Definitions const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/lambda-secretsmanager.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/lambda-secretsmanager.test.ts index 4c6fad89d..921d9fae2 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/lambda-secretsmanager.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/test/lambda-secretsmanager.test.ts @@ -26,7 +26,7 @@ test('Test the properties', () => { // Helper declaration const pattern = new LambdaToSecretsmanager(stack, 'lambda-to-secretsmanager-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -47,7 +47,7 @@ test('Test deployment w/ existing secret', () => { const existingSecret = new secrets.Secret(stack, 'secret', {}); const pattern = new LambdaToSecretsmanager(stack, 'lambda-to-secretsmanager-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -67,7 +67,7 @@ test('Test deployment w/ existing function', () => { const stack = new Stack(); // Helper declaration const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; @@ -92,7 +92,7 @@ test('Test minimal deployment write access to Secret', () => { // Helper declaration new LambdaToSecretsmanager(stack, 'lambda-to-secretsmanager-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -113,7 +113,7 @@ test("Test minimal deployment that deploys a VPC without vpcProps", () => { // Helper declaration new LambdaToSecretsmanager(stack, "lambda-to-secretsmanager-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -162,7 +162,7 @@ test("Test minimal deployment that deploys a VPC w/vpcProps", () => { // Helper declaration new LambdaToSecretsmanager(stack, "lambda-to-secretsmanager-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -220,7 +220,7 @@ test("Test minimal deployment with an existing VPC", () => { // Helper declaration new LambdaToSecretsmanager(stack, "lambda-to-secretsmanager-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -260,7 +260,7 @@ test("Check error when existing lambda function is not in VPC and construct is i const stack = new Stack(); const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -293,7 +293,7 @@ test("Confirm CheckVpcProps is called", () => { // Helper declaration new LambdaToSecretsmanager(stack, "lambda-to-secretsmanager-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -313,7 +313,7 @@ test('Test lambda function custom environment variable', () => { // Helper declaration new LambdaToSecretsmanager(stack, 'lambda-to-secretsmanager-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -328,7 +328,7 @@ test('Test lambda function custom environment variable', () => { const template = Template.fromStack(stack); template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', @@ -351,7 +351,7 @@ test('Test overriding secretProps to pass a customer provided CMK', () => { // Helper declaration new LambdaToSecretsmanager(stack, 'lambda-to-secretsmanager-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -367,7 +367,7 @@ test('Test overriding secretProps to pass a customer provided CMK', () => { const template = Template.fromStack(stack); template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', @@ -400,14 +400,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: LambdaToSecretsmanagerProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -426,7 +426,7 @@ test('Confirm call to CheckSecretsManagerProps', () => { const props: LambdaToSecretsmanagerProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/lamsns-deployFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/lamsns-deployFunction.assets.json index df1200d8c..c81bca087 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/lamsns-deployFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/lamsns-deployFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "5f8e5eb4a5dd64d5107dfb614b24bef594d8c33923b1a1ef632f76f1f36975b6": { + "84811654ebcf598db48d82b813657bac59231142eda722937f1785314c8b9d1a": { "source": { "path": "lamsns-deployFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "5f8e5eb4a5dd64d5107dfb614b24bef594d8c33923b1a1ef632f76f1f36975b6.json", + "objectKey": "84811654ebcf598db48d82b813657bac59231142eda722937f1785314c8b9d1a.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/lamsns-deployFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/lamsns-deployFunction.template.json index 999afc56d..275fd0af8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/lamsns-deployFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/lamsns-deployFunction.template.json @@ -127,7 +127,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/manifest.json index 4b687dc9d..9a3a4ee75 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/manifest.json @@ -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}/5f8e5eb4a5dd64d5107dfb614b24bef594d8c33923b1a1ef632f76f1f36975b6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/84811654ebcf598db48d82b813657bac59231142eda722937f1785314c8b9d1a.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/tree.json index fae43cc70..ca15ac613 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamsns-deployFunction/test-lambda-sns/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -127,19 +127,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -155,7 +155,7 @@ "path": "lamsns-deployFunction/test-lambda-sns/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -163,13 +163,13 @@ "path": "lamsns-deployFunction/test-lambda-sns/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -205,7 +205,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -213,13 +213,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "aws-managed-key": { @@ -227,7 +227,7 @@ "path": "lamsns-deployFunction/test-lambda-sns/aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "SnsTopic": { @@ -264,7 +264,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.118.0" + "version": "2.145.0" } }, "Policy": { @@ -360,25 +360,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sns.LambdaToSns", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -394,7 +394,7 @@ "path": "lamsns-deployFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -406,7 +406,7 @@ "path": "lamsns-deployFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -414,25 +414,25 @@ "path": "lamsns-deployFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -440,7 +440,7 @@ "path": "lamsns-deployFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -448,13 +448,13 @@ "path": "lamsns-deployFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -462,13 +462,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.ts index d676bd0ee..0c5fa5105 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunction.ts @@ -17,6 +17,7 @@ import { LambdaToSns, LambdaToSnsProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-sns'; // Definitions const props: LambdaToSnsProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/lamsns-deployFunctionWithVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/lamsns-deployFunctionWithVpc.assets.json index 43109a01a..a9e348478 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/lamsns-deployFunctionWithVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/lamsns-deployFunctionWithVpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "eaa0346c4ff539bfe6679152cc21c124666aaee311fcd3a0fbd5d5f8f0a70943": { + "505afffea273f062c22221cacb18bd174f863a09744ada2d1428dcb595ebfa5c": { "source": { "path": "lamsns-deployFunctionWithVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "eaa0346c4ff539bfe6679152cc21c124666aaee311fcd3a0fbd5d5f8f0a70943.json", + "objectKey": "505afffea273f062c22221cacb18bd174f863a09744ada2d1428dcb595ebfa5c.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/lamsns-deployFunctionWithVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/lamsns-deployFunctionWithVpc.template.json index 0a7e787ca..ebac29630 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/lamsns-deployFunctionWithVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/lamsns-deployFunctionWithVpc.template.json @@ -162,7 +162,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -697,7 +697,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -708,7 +708,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -792,6 +800,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/manifest.json index 76966de2b..2483c6bd2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/manifest.json @@ -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}/eaa0346c4ff539bfe6679152cc21c124666aaee311fcd3a0fbd5d5f8f0a70943.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/505afffea273f062c22221cacb18bd174f863a09744ada2d1428dcb595ebfa5c.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -196,6 +196,12 @@ "data": "VpcSNS5B664381" } ], + "/lamsns-deployFunctionWithVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamsns-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/tree.json index d3b6c8f12..c295a7325 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamsns-deployFunctionWithVpc/test-lambda-sns/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -132,19 +132,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -172,13 +172,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -194,7 +194,7 @@ "path": "lamsns-deployFunctionWithVpc/test-lambda-sns/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -202,13 +202,13 @@ "path": "lamsns-deployFunctionWithVpc/test-lambda-sns/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -244,7 +244,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -270,13 +270,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "aws-managed-key": { @@ -284,7 +284,7 @@ "path": "lamsns-deployFunctionWithVpc/test-lambda-sns/aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "SnsTopic": { @@ -321,7 +321,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -417,25 +417,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sns.LambdaToSns", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -462,7 +462,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -506,7 +506,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -514,7 +514,7 @@ "path": "lamsns-deployFunctionWithVpc/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -536,7 +536,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -555,13 +555,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -605,7 +605,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -613,7 +613,7 @@ "path": "lamsns-deployFunctionWithVpc/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -635,7 +635,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -654,13 +654,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -672,13 +672,13 @@ "path": "lamsns-deployFunctionWithVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -694,7 +694,7 @@ "path": "lamsns-deployFunctionWithVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -725,7 +725,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -777,19 +777,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -813,13 +813,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -853,13 +853,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "SNS": { @@ -909,19 +909,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamsns-deployFunctionWithVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -933,7 +941,7 @@ "path": "lamsns-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -941,7 +949,7 @@ "path": "lamsns-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -949,13 +957,13 @@ "path": "lamsns-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "lamsns-deployFunctionWithVpc-SNS-security-group": { @@ -1011,13 +1019,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1045,7 +1053,7 @@ "path": "lamsns-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1053,25 +1061,25 @@ "path": "lamsns-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1079,7 +1087,7 @@ "path": "lamsns-deployFunctionWithVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1087,13 +1095,13 @@ "path": "lamsns-deployFunctionWithVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1107,7 +1115,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.ts index a91d4997b..0c596166f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-deployFunctionWithVpc.ts @@ -17,6 +17,7 @@ import { LambdaToSns, LambdaToSnsProps } from "../lib"; import * as lambda from "aws-cdk-lib/aws-lambda"; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = "Integration Test for aws-lambda-sns"; // Definitions const props: LambdaToSnsProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/lamsns-existingFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/lamsns-existingFunction.assets.json index 7e0c8484b..05f973534 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/lamsns-existingFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/lamsns-existingFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "993cb84724defbc88190b9e479b46236fa8b9a18e08ee37d1fd8c6cd560e7ab8": { + "16812beaec48c1808a07629e6629935ed835efbaaa9f372bd6837c192658be3d": { "source": { "path": "lamsns-existingFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "993cb84724defbc88190b9e479b46236fa8b9a18e08ee37d1fd8c6cd560e7ab8.json", + "objectKey": "16812beaec48c1808a07629e6629935ed835efbaaa9f372bd6837c192658be3d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/lamsns-existingFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/lamsns-existingFunction.template.json index f08989369..bd3119096 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/lamsns-existingFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/lamsns-existingFunction.template.json @@ -127,7 +127,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/manifest.json index f6d22c152..1575d2783 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/manifest.json @@ -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}/993cb84724defbc88190b9e479b46236fa8b9a18e08ee37d1fd8c6cd560e7ab8.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/16812beaec48c1808a07629e6629935ed835efbaaa9f372bd6837c192658be3d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/tree.json index 11c662bb6..5c39ed6b2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamsns-existingFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -123,19 +123,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -151,7 +151,7 @@ "path": "lamsns-existingFunction/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -159,13 +159,13 @@ "path": "lamsns-existingFunction/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -201,7 +201,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -209,13 +209,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "test-lambda-sns": { @@ -227,7 +227,7 @@ "path": "lamsns-existingFunction/test-lambda-sns/aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "SnsTopic": { @@ -264,7 +264,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.118.0" + "version": "2.145.0" } }, "Policy": { @@ -360,25 +360,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sns.LambdaToSns", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -394,7 +394,7 @@ "path": "lamsns-existingFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -406,7 +406,7 @@ "path": "lamsns-existingFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -414,25 +414,25 @@ "path": "lamsns-existingFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -440,7 +440,7 @@ "path": "lamsns-existingFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -448,13 +448,13 @@ "path": "lamsns-existingFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -462,13 +462,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.ts index ca9071ca3..ee6be5bd3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/integ.lamsns-existingFunction.ts @@ -26,7 +26,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-sns'; // Definitions const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/lambda-sns.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/lambda-sns.test.ts index ab840f7c6..794b33c03 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/lambda-sns.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sns/test/lambda-sns.test.ts @@ -19,6 +19,7 @@ import * as sns from "aws-cdk-lib/aws-sns"; import * as ec2 from "aws-cdk-lib/aws-ec2"; import { LambdaToSns, LambdaToSnsProps } from '../lib'; import { Template } from 'aws-cdk-lib/assertions'; +import * as defaults from '@aws-solutions-constructs/core'; test('Test deployment with new Lambda function', () => { // Stack @@ -26,7 +27,7 @@ test('Test deployment with new Lambda function', () => { // Helper declaration const testConstruct = new LambdaToSns(stack, 'lambda-to-sns-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -88,7 +89,7 @@ test('Test deployment with existing existingTopicObj', () => { // Helper declaration new LambdaToSns(stack, 'lambda-to-sns-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -110,7 +111,7 @@ test('override topicProps', () => { const props: LambdaToSnsProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, topicProps: { @@ -132,7 +133,7 @@ test('Test the properties', () => { // Helper declaration const pattern = new LambdaToSns(stack, 'lambda-to-sns-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } @@ -151,7 +152,7 @@ test("Test minimal deployment that deploys a VPC without vpcProps", () => { // Helper declaration new LambdaToSns(stack, "lambda-to-sns-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -199,7 +200,7 @@ test("Test minimal deployment that deploys a VPC w/vpcProps", () => { // Helper declaration new LambdaToSns(stack, "lambda-to-sns-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -256,7 +257,7 @@ test("Test minimal deployment with an existing VPC", () => { // Helper declaration new LambdaToSns(stack, "lambda-to-sns-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -295,7 +296,7 @@ test("Test minimal deployment with an existing VPC and existing Lambda function const stack = new Stack(); const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -324,7 +325,7 @@ test('Test lambda function custom environment variable', () => { // Helper declaration new LambdaToSns(stack, 'lambda-to-sns-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -336,7 +337,7 @@ test('Test lambda function custom environment variable', () => { const template = Template.fromStack(stack); template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', @@ -360,7 +361,7 @@ test('Topic is encrypted with imported CMK when set on encryptionKey prop', () = const cmk = new kms.Key(stack, 'cmk'); new LambdaToSns(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -387,7 +388,7 @@ test('Topic is encrypted with imported CMK when set on topicProps.masterKey prop const cmk = new kms.Key(stack, 'cmk'); new LambdaToSns(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -415,7 +416,7 @@ test('Topic is encrypted with provided encryptionKeyProps', () => { new LambdaToSns(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -453,7 +454,7 @@ test('Topic is encrypted by default with AWS-managed KMS key when no other encry new LambdaToSns(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -492,7 +493,7 @@ test('Topic is encrypted with customer managed KMS Key when enable encryption fl new LambdaToSns(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -536,7 +537,7 @@ test('Test that CheckSnsProps is getting called', () => { const props: LambdaToSnsProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingTopicObj: topic, @@ -557,14 +558,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: LambdaToSnsProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/lamsqslam-defaultDeployment.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/lamsqslam-defaultDeployment.assets.json index 95b05b275..e830b7fbd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/lamsqslam-defaultDeployment.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/lamsqslam-defaultDeployment.assets.json @@ -27,7 +27,7 @@ } } }, - "2419bfe6a42c7a80e0abd8b4550022b5def30f5130c2cd600ec67f0037c810e0": { + "aeb28bc089bf76e81ba2c05ed5d795de062c5adead7cfca5c07efdff6e9eb1fc": { "source": { "path": "lamsqslam-defaultDeployment.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2419bfe6a42c7a80e0abd8b4550022b5def30f5130c2cd600ec67f0037c810e0.json", + "objectKey": "aeb28bc089bf76e81ba2c05ed5d795de062c5adead7cfca5c07efdff6e9eb1fc.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/lamsqslam-defaultDeployment.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/lamsqslam-defaultDeployment.template.json index 3102f52f6..5f09cdbf5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/lamsqslam-defaultDeployment.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/lamsqslam-defaultDeployment.template.json @@ -128,7 +128,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -449,7 +449,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/manifest.json index c1d2f90c5..79241e332 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/manifest.json @@ -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}/2419bfe6a42c7a80e0abd8b4550022b5def30f5130c2cd600ec67f0037c810e0.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/aeb28bc089bf76e81ba2c05ed5d795de062c5adead7cfca5c07efdff6e9eb1fc.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -159,24 +159,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testlambdasqslambdalambdatosqsdeadLetterQueue016B6E58": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqslambdalambdatosqsdeadLetterQueue016B6E58", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "testlambdasqslambdalambdatosqsdeadLetterQueuePolicyAA313AD2": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqslambdalambdatosqsdeadLetterQueuePolicyAA313AD2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "lamsqslam-defaultDeployment" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/tree.json index f3ff0bde2..82442fbe9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.js.snapshot/tree.json @@ -25,7 +25,7 @@ "path": "lamsqslam-defaultDeployment/test-lambda-sqs-lambda/lambda-to-sqs/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -88,7 +88,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -138,19 +138,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -166,7 +166,7 @@ "path": "lamsqslam-defaultDeployment/test-lambda-sqs-lambda/lambda-to-sqs/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -174,13 +174,13 @@ "path": "lamsqslam-defaultDeployment/test-lambda-sqs-lambda/lambda-to-sqs/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -210,7 +210,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -218,13 +218,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "queue-dlq": { @@ -242,7 +242,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -325,19 +325,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "queue": { @@ -364,7 +364,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -447,25 +447,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs.LambdaToSqs", - "version": "2.58.1" + "version": "2.60.0" } }, "sqs-to-lambda": { @@ -481,7 +481,7 @@ "path": "lamsqslam-defaultDeployment/test-lambda-sqs-lambda/sqs-to-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -544,7 +544,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -596,19 +596,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -624,7 +624,7 @@ "path": "lamsqslam-defaultDeployment/test-lambda-sqs-lambda/sqs-to-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -632,13 +632,13 @@ "path": "lamsqslam-defaultDeployment/test-lambda-sqs-lambda/sqs-to-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -665,7 +665,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -673,7 +673,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } }, "SqsEventSource:lamsqslamdefaultDeploymenttestlambdasqslambdalambdatosqsqueue3E64D956": { @@ -699,31 +699,31 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-sqs-lambda.SqsToLambda", - "version": "2.58.1" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs-lambda.LambdaToSqsToLambda", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -751,7 +751,7 @@ "path": "lamsqslam-defaultDeployment/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -759,25 +759,25 @@ "path": "lamsqslam-defaultDeployment/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -785,7 +785,7 @@ "path": "lamsqslam-defaultDeployment/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -793,13 +793,13 @@ "path": "lamsqslam-defaultDeployment/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -813,7 +813,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.ts index e7d50a68e..cf68417b3 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-defaultDeployment.ts @@ -17,6 +17,7 @@ import { LambdaToSqsToLambda, LambdaToSqsToLambdaProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,12 +27,12 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-sqs-lambda' // Definitions const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`) }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`) } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/lamsqslam-deployProducerFunctionWithVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/lamsqslam-deployProducerFunctionWithVpc.assets.json index ddd51d2b3..f16aa1eb0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/lamsqslam-deployProducerFunctionWithVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/lamsqslam-deployProducerFunctionWithVpc.assets.json @@ -40,7 +40,7 @@ } } }, - "3c9a8f0d48c83ad58db3ebf308da62a227204de7215e57eabce2d77a5eddb217": { + "baa851f5b129916e9114d6020735592a75c9af1f31e7e20f04438f4b65e15968": { "source": { "path": "lamsqslam-deployProducerFunctionWithVpc.template.json", "packaging": "file" @@ -48,7 +48,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3c9a8f0d48c83ad58db3ebf308da62a227204de7215e57eabce2d77a5eddb217.json", + "objectKey": "baa851f5b129916e9114d6020735592a75c9af1f31e7e20f04438f4b65e15968.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/lamsqslam-deployProducerFunctionWithVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/lamsqslam-deployProducerFunctionWithVpc.template.json index f877067c3..81d462c10 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/lamsqslam-deployProducerFunctionWithVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/lamsqslam-deployProducerFunctionWithVpc.template.json @@ -163,7 +163,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -864,7 +864,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -993,7 +993,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1019,6 +1027,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/manifest.json index 219b5a795..780d6e9f7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/manifest.json @@ -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}/3c9a8f0d48c83ad58db3ebf308da62a227204de7215e57eabce2d77a5eddb217.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/baa851f5b129916e9114d6020735592a75c9af1f31e7e20f04438f4b65e15968.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -238,6 +238,12 @@ "data": "testlambdasqssqstolambdaLambdaFunctionSqsEventSourcelamsqslamdeployProducerFunctionWithVpctestlambdasqslambdatosqsqueueD62DE11EB9A24E09" } ], + "/lamsqslam-deployProducerFunctionWithVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamsqslam-deployProducerFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -261,24 +267,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testlambdasqslambdatosqsdeadLetterQueue0FF744BB": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqslambdatosqsdeadLetterQueue0FF744BB", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "testlambdasqslambdatosqsdeadLetterQueuePolicy4A3E49B3": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqslambdatosqsdeadLetterQueuePolicy4A3E49B3", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "lamsqslam-deployProducerFunctionWithVpc" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/tree.json index 764bebc45..d0a9a1ed1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.js.snapshot/tree.json @@ -25,7 +25,7 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/test-lambda-sqs/lambda-to-sqs/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -88,7 +88,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -143,19 +143,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -183,13 +183,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -205,7 +205,7 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/test-lambda-sqs/lambda-to-sqs/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -213,13 +213,13 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/test-lambda-sqs/lambda-to-sqs/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -249,7 +249,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -275,13 +275,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "queue-dlq": { @@ -299,7 +299,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -382,19 +382,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } }, "queue": { @@ -421,7 +421,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -504,25 +504,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs.LambdaToSqs", - "version": "2.58.1" + "version": "2.60.0" } }, "Vpc": { @@ -549,7 +549,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -593,7 +593,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -601,7 +601,7 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/test-lambda-sqs/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -642,13 +642,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -692,7 +692,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -700,7 +700,7 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/test-lambda-sqs/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -722,7 +722,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -741,13 +741,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -759,13 +759,13 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/test-lambda-sqs/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -781,7 +781,7 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/test-lambda-sqs/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -812,7 +812,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -864,19 +864,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -900,13 +900,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -940,13 +940,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "SQS": { @@ -996,19 +996,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" } }, "test-lambda-sqs-SQS-security-group": { @@ -1064,13 +1064,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "sqs-to-lambda": { @@ -1086,7 +1086,7 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/test-lambda-sqs/sqs-to-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1149,7 +1149,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1201,19 +1201,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1229,7 +1229,7 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/test-lambda-sqs/sqs-to-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1237,13 +1237,13 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/test-lambda-sqs/sqs-to-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1270,7 +1270,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -1278,7 +1278,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } }, "SqsEventSource:lamsqslamdeployProducerFunctionWithVpctestlambdasqslambdatosqsqueueD62DE11E": { @@ -1304,31 +1304,39 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-sqs-lambda.SqsToLambda", - "version": "2.58.1" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs-lambda.LambdaToSqsToLambda", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamsqslam-deployProducerFunctionWithVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1340,7 +1348,7 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1348,7 +1356,7 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1356,13 +1364,13 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1390,7 +1398,7 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1398,25 +1406,25 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1424,7 +1432,7 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1432,13 +1440,13 @@ "path": "lamsqslam-deployProducerFunctionWithVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1452,7 +1460,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.ts index 640f7295c..4a456aa96 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-deployProducerFunctionWithVpc.ts @@ -17,6 +17,7 @@ import { LambdaToSqsToLambda, LambdaToSqsToLambdaProps } from "../lib"; import * as lambda from "aws-cdk-lib/aws-lambda"; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,12 +27,12 @@ stack.templateOptions.description = "Integration Test for aws-lambda-sqs-lambda" // Definitions const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`) }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/lamsqslam-existingConsumerFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/lamsqslam-existingConsumerFunction.assets.json index 0ea573f28..10080b00d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/lamsqslam-existingConsumerFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/lamsqslam-existingConsumerFunction.assets.json @@ -27,7 +27,7 @@ } } }, - "59c383168bd71dddb38c554bdf21f1b075b084669ff18a19d5ec9f81b082ba42": { + "67fc9b4e1d8a44d9dec8bf13d6eb5c3dd14bdf089c5d7ca2e8ed855f18f9de11": { "source": { "path": "lamsqslam-existingConsumerFunction.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "59c383168bd71dddb38c554bdf21f1b075b084669ff18a19d5ec9f81b082ba42.json", + "objectKey": "67fc9b4e1d8a44d9dec8bf13d6eb5c3dd14bdf089c5d7ca2e8ed855f18f9de11.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/lamsqslam-existingConsumerFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/lamsqslam-existingConsumerFunction.template.json index 7c08ee9c5..97c014d18 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/lamsqslam-existingConsumerFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/lamsqslam-existingConsumerFunction.template.json @@ -127,7 +127,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -296,7 +296,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/manifest.json index d226b4a7e..be45584ec 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/manifest.json @@ -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}/59c383168bd71dddb38c554bdf21f1b075b084669ff18a19d5ec9f81b082ba42.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/67fc9b4e1d8a44d9dec8bf13d6eb5c3dd14bdf089c5d7ca2e8ed855f18f9de11.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -159,24 +159,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testlambdasqslambdalambdatosqsdeadLetterQueue016B6E58": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqslambdalambdatosqsdeadLetterQueue016B6E58", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "testlambdasqslambdalambdatosqsdeadLetterQueuePolicyAA313AD2": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqslambdalambdatosqsdeadLetterQueuePolicyAA313AD2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "lamsqslam-existingConsumerFunction" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/tree.json index a8349ddab..32bb05171 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamsqslam-existingConsumerFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -132,19 +132,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -160,7 +160,7 @@ "path": "lamsqslam-existingConsumerFunction/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -168,13 +168,13 @@ "path": "lamsqslam-existingConsumerFunction/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -201,7 +201,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -209,7 +209,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } }, "SqsEventSource:lamsqslamexistingConsumerFunctiontestlambdasqslambdalambdatosqsqueueADB261AF": { @@ -235,19 +235,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "test-lambda-sqs-lambda": { @@ -267,7 +267,7 @@ "path": "lamsqslam-existingConsumerFunction/test-lambda-sqs-lambda/lambda-to-sqs/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -330,7 +330,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -380,19 +380,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -408,7 +408,7 @@ "path": "lamsqslam-existingConsumerFunction/test-lambda-sqs-lambda/lambda-to-sqs/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -416,13 +416,13 @@ "path": "lamsqslam-existingConsumerFunction/test-lambda-sqs-lambda/lambda-to-sqs/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -452,7 +452,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -460,13 +460,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "queue-dlq": { @@ -484,7 +484,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -567,19 +567,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "queue": { @@ -606,7 +606,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -689,25 +689,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs.LambdaToSqs", - "version": "2.58.1" + "version": "2.60.0" } }, "sqs-to-lambda": { @@ -715,13 +715,13 @@ "path": "lamsqslam-existingConsumerFunction/test-lambda-sqs-lambda/sqs-to-lambda", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-sqs-lambda.SqsToLambda", - "version": "2.58.1" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs-lambda.LambdaToSqsToLambda", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -749,7 +749,7 @@ "path": "lamsqslam-existingConsumerFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -757,25 +757,25 @@ "path": "lamsqslam-existingConsumerFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -783,7 +783,7 @@ "path": "lamsqslam-existingConsumerFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -791,13 +791,13 @@ "path": "lamsqslam-existingConsumerFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -811,7 +811,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.ts index 12150b88f..78ab95e8b 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingConsumerFunction.ts @@ -26,7 +26,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-sqs-lambda' // Definitions const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`) }; @@ -35,7 +35,7 @@ const existingConsumerFn = defaults.deployLambdaFunction(stack, lambdaFunctionPr const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/lamsqslam-existingProducerFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/lamsqslam-existingProducerFunction.assets.json index 71b96ca50..4a173a964 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/lamsqslam-existingProducerFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/lamsqslam-existingProducerFunction.assets.json @@ -27,7 +27,7 @@ } } }, - "f68b36afc18c0d6f41cd97584beffeced34cb2f13157026ea06e0a1586613325": { + "85677c5836ee58e8b65ef236fb960093c176f2d3f6c7798685388dcf7def0fb7": { "source": { "path": "lamsqslam-existingProducerFunction.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f68b36afc18c0d6f41cd97584beffeced34cb2f13157026ea06e0a1586613325.json", + "objectKey": "85677c5836ee58e8b65ef236fb960093c176f2d3f6c7798685388dcf7def0fb7.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/lamsqslam-existingProducerFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/lamsqslam-existingProducerFunction.template.json index 6615d1bd2..671de35a9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/lamsqslam-existingProducerFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/lamsqslam-existingProducerFunction.template.json @@ -128,7 +128,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -449,7 +449,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/manifest.json index c7e950815..0fd00a1e0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/manifest.json @@ -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}/f68b36afc18c0d6f41cd97584beffeced34cb2f13157026ea06e0a1586613325.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/85677c5836ee58e8b65ef236fb960093c176f2d3f6c7798685388dcf7def0fb7.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -159,24 +159,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testlambdasqslambdalambdatosqsdeadLetterQueue016B6E58": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqslambdalambdatosqsdeadLetterQueue016B6E58", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "testlambdasqslambdalambdatosqsdeadLetterQueuePolicyAA313AD2": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqslambdalambdatosqsdeadLetterQueuePolicyAA313AD2", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "lamsqslam-existingProducerFunction" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/tree.json index 5c2d897e2..8d8861db8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamsqslam-existingProducerFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -130,19 +130,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -158,7 +158,7 @@ "path": "lamsqslam-existingProducerFunction/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -166,13 +166,13 @@ "path": "lamsqslam-existingProducerFunction/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -202,7 +202,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -210,13 +210,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "test-lambda-sqs-lambda": { @@ -242,7 +242,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -325,19 +325,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "queue": { @@ -364,7 +364,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -447,25 +447,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs.LambdaToSqs", - "version": "2.58.1" + "version": "2.60.0" } }, "sqs-to-lambda": { @@ -481,7 +481,7 @@ "path": "lamsqslam-existingProducerFunction/test-lambda-sqs-lambda/sqs-to-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -544,7 +544,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -596,19 +596,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -624,7 +624,7 @@ "path": "lamsqslam-existingProducerFunction/test-lambda-sqs-lambda/sqs-to-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -632,13 +632,13 @@ "path": "lamsqslam-existingProducerFunction/test-lambda-sqs-lambda/sqs-to-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -665,7 +665,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -673,7 +673,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } }, "SqsEventSource:lamsqslamexistingProducerFunctiontestlambdasqslambdalambdatosqsqueue8D69F5FD": { @@ -699,31 +699,31 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-sqs-lambda.SqsToLambda", - "version": "2.58.1" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs-lambda.LambdaToSqsToLambda", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -751,7 +751,7 @@ "path": "lamsqslam-existingProducerFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -759,25 +759,25 @@ "path": "lamsqslam-existingProducerFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -785,7 +785,7 @@ "path": "lamsqslam-existingProducerFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -793,13 +793,13 @@ "path": "lamsqslam-existingProducerFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -813,7 +813,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.ts index f89ef2f04..36813a175 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingProducerFunction.ts @@ -26,7 +26,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-sqs-lambda' // Definitions const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`) }; @@ -36,7 +36,7 @@ const existingProducerFn = defaults.deployLambdaFunction(stack, lambdaFunctionPr const props: LambdaToSqsToLambdaProps = { existingProducerLambdaObj: existingProducerFn, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`) } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/lamsqslam-existingQueue.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/lamsqslam-existingQueue.assets.json index 4d478ff93..71a1f5cb8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/lamsqslam-existingQueue.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/lamsqslam-existingQueue.assets.json @@ -27,7 +27,7 @@ } } }, - "f2ef976225a12045ee8ad678b244703fa667242bb49fc65a6c861c4771654976": { + "21e294f73d52d50472c8623037992acf520d2e09ec8979f3332b06cdfd9bb027": { "source": { "path": "lamsqslam-existingQueue.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f2ef976225a12045ee8ad678b244703fa667242bb49fc65a6c861c4771654976.json", + "objectKey": "21e294f73d52d50472c8623037992acf520d2e09ec8979f3332b06cdfd9bb027.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/lamsqslam-existingQueue.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/lamsqslam-existingQueue.template.json index 74beaec5f..f274b69c7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/lamsqslam-existingQueue.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/lamsqslam-existingQueue.template.json @@ -295,7 +295,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -449,7 +449,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/manifest.json index bf734d4ee..3fc722627 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/manifest.json @@ -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}/f2ef976225a12045ee8ad678b244703fa667242bb49fc65a6c861c4771654976.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21e294f73d52d50472c8623037992acf520d2e09ec8979f3332b06cdfd9bb027.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -159,24 +159,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "deadLetterQueue3F848E28": [ - { - "type": "aws:cdk:logicalId", - "data": "deadLetterQueue3F848E28", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "deadLetterQueuePolicy14A9D269": [ - { - "type": "aws:cdk:logicalId", - "data": "deadLetterQueuePolicy14A9D269", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "lamsqslam-existingQueue" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/tree.json index 43a5a9220..9a2d85086 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.js.snapshot/tree.json @@ -23,7 +23,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -106,19 +106,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "existing-sqs-queue": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -228,19 +228,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "test-lambda-sqs-lambda": { @@ -260,7 +260,7 @@ "path": "lamsqslam-existingQueue/test-lambda-sqs-lambda/lambda-to-sqs/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -323,7 +323,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -373,19 +373,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -401,7 +401,7 @@ "path": "lamsqslam-existingQueue/test-lambda-sqs-lambda/lambda-to-sqs/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -409,13 +409,13 @@ "path": "lamsqslam-existingQueue/test-lambda-sqs-lambda/lambda-to-sqs/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -445,7 +445,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -453,19 +453,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs.LambdaToSqs", - "version": "2.58.1" + "version": "2.60.0" } }, "sqs-to-lambda": { @@ -481,7 +481,7 @@ "path": "lamsqslam-existingQueue/test-lambda-sqs-lambda/sqs-to-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -544,7 +544,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -596,19 +596,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -624,7 +624,7 @@ "path": "lamsqslam-existingQueue/test-lambda-sqs-lambda/sqs-to-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -632,13 +632,13 @@ "path": "lamsqslam-existingQueue/test-lambda-sqs-lambda/sqs-to-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -665,7 +665,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -673,7 +673,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } }, "SqsEventSource:lamsqslamexistingQueueexistingsqsqueue9D244BAE": { @@ -699,31 +699,31 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-sqs-lambda.SqsToLambda", - "version": "2.58.1" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs-lambda.LambdaToSqsToLambda", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -751,7 +751,7 @@ "path": "lamsqslam-existingQueue/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -759,25 +759,25 @@ "path": "lamsqslam-existingQueue/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -785,7 +785,7 @@ "path": "lamsqslam-existingQueue/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -793,13 +793,13 @@ "path": "lamsqslam-existingQueue/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -813,7 +813,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.ts index cca774663..f14ba3d7a 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/integ.lamsqslam-existingQueue.ts @@ -29,13 +29,13 @@ const buildQueueResponse = defaults.buildQueue(stack, 'existing-sqs-queue', {}); const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`) }, existingQueueObj: buildQueueResponse.queue, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`) } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/lambda-sqs-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/lambda-sqs-lambda.test.ts index 2c049c915..2b127e607 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/lambda-sqs-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs-lambda/test/lambda-sqs-lambda.test.ts @@ -26,13 +26,13 @@ test('Test minimal deployment', () => { // Helper declaration const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`), functionName: 'producer-function' }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`), functionName: 'consumer-function' @@ -121,7 +121,7 @@ test('Test deployment w/ existing producer function', () => { // Define existing resources const existingProducerFn = defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`), functionName: 'existing-producer-function' @@ -131,7 +131,7 @@ test('Test deployment w/ existing producer function', () => { const props: LambdaToSqsToLambdaProps = { existingProducerLambdaObj: existingProducerFn, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`), functionName: 'deployed-consumer-function' @@ -156,7 +156,7 @@ test('Test deployment w/ existing consumer function', () => { // Define existing resources const existingConsumerFn = defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`), functionName: 'existing-consumer-function' @@ -165,7 +165,7 @@ test('Test deployment w/ existing consumer function', () => { // Helper declaration const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`), functionName: 'deployed-producer-function' @@ -197,13 +197,13 @@ test('Test deployment w/ existing queue', () => { // Helper declaration const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`), functionName: 'producer-function' }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`), functionName: 'consumer-function' @@ -225,12 +225,12 @@ test('Test deployment w/ DLQ explicitly disabled', () => { // Helper declaration const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`) }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`) }, @@ -253,12 +253,12 @@ test('Test deployment w/ DLQ explicitly enabled and w/ MRC override', () => { // Helper declaration const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`) }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`) }, @@ -288,13 +288,13 @@ test('Test overrides for producer and consumer functions', () => { // Helper declaration const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`), functionName: 'producer-function' }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`), functionName: 'consumer-function' @@ -305,11 +305,11 @@ test('Test overrides for producer and consumer functions', () => { // Assertion 2: test for updated runtime on producer function const template = Template.fromStack(stack); template.hasResourceProperties('AWS::Lambda::Function', { - Runtime: "nodejs16.x" + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING }); // Assertion 3: test for updated runtime on consumer function template.hasResourceProperties('AWS::Lambda::Function', { - Runtime: "nodejs16.x" + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING }); }); @@ -319,13 +319,13 @@ test('Test the public pattern props', () => { // Helper declaration const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`), functionName: 'producer-function' }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`), functionName: 'consumer-function' @@ -349,13 +349,13 @@ test('Test lambda function custom environment variable', () => { // Helper declaration const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`), functionName: 'producer-function' }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`), functionName: 'consumer-function' @@ -383,13 +383,13 @@ test('Pattern deployment w/ batch size', () => { const stack = new Stack(); const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`), functionName: 'producer-function' }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`), functionName: 'consumer-function' @@ -412,13 +412,13 @@ test("Test minimal deployment that deploys a VPC without vpcProps", () => { // Helper declaration new LambdaToSqsToLambda(stack, "lambda-to-sqs-to-lambda-stack", { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`), functionName: 'producer-function' }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`), functionName: 'consumer-function' @@ -467,13 +467,13 @@ test("Test minimal deployment that deploys a VPC w/vpcProps", () => { // Helper declaration new LambdaToSqsToLambda(stack, "lambda-to-sqs-to-lambda-stack", { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`), functionName: 'producer-function' }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`), functionName: 'consumer-function' @@ -531,13 +531,13 @@ test("Test minimal deployment with an existing VPC", () => { // Helper declaration new LambdaToSqsToLambda(stack, "lambda-to-sqs-to-lambda-stack", { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`), functionName: 'producer-function' }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`), functionName: 'consumer-function' @@ -582,13 +582,13 @@ test("Test bad call with existingVpc and deployVpc", () => { // Helper declaration new LambdaToSqsToLambda(stack, "lambda-to-sqs-to-lambda-stack", { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/producer-function`), functionName: 'producer-function' }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda/consumer-function`), functionName: 'consumer-function' @@ -608,12 +608,12 @@ test('Confirm CheckSqsProps is being called', () => { // Helper declaration const props: LambdaToSqsToLambdaProps = { producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -630,7 +630,7 @@ test('Confirm CheckSqsProps is being called', () => { test('Confirm CheckLambdaProps is being called', () => { const stack = new Stack(); const existingLambdaObj = new lambda.Function(stack, 'ExistingLambda', { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -638,12 +638,12 @@ test('Confirm CheckLambdaProps is being called', () => { const props: LambdaToSqsToLambdaProps = { existingProducerLambdaObj: existingLambdaObj, producerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, consumerLambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/lamsqs-deployFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/lamsqs-deployFunction.assets.json index 3d9192bda..d28aa8c73 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/lamsqs-deployFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/lamsqs-deployFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "cb2baa3f2f6995dae3327b71c7b56fa64cbd8a228de640b6b6d84fe70e5fc213": { + "b8a001d4afa074f1b745e2537f5a279d1a3c8ffe911ee325ce65e55d23d828eb": { "source": { "path": "lamsqs-deployFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "cb2baa3f2f6995dae3327b71c7b56fa64cbd8a228de640b6b6d84fe70e5fc213.json", + "objectKey": "b8a001d4afa074f1b745e2537f5a279d1a3c8ffe911ee325ce65e55d23d828eb.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/lamsqs-deployFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/lamsqs-deployFunction.template.json index a3c3e374a..9c8d8cf7d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/lamsqs-deployFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/lamsqs-deployFunction.template.json @@ -128,7 +128,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/manifest.json index 05653fa16..4d612e185 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/manifest.json @@ -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}/cb2baa3f2f6995dae3327b71c7b56fa64cbd8a228de640b6b6d84fe70e5fc213.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b8a001d4afa074f1b745e2537f5a279d1a3c8ffe911ee325ce65e55d23d828eb.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -135,24 +135,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testlambdasqsdeadLetterQueueC34BC0BD": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqsdeadLetterQueueC34BC0BD", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "testlambdasqsdeadLetterQueuePolicy270F1626": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqsdeadLetterQueuePolicy270F1626", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "lamsqs-deployFunction" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/tree.json index 68f9a91b9..57f50478e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamsqs-deployFunction/test-lambda-sqs/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -134,19 +134,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -162,7 +162,7 @@ "path": "lamsqs-deployFunction/test-lambda-sqs/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -170,13 +170,13 @@ "path": "lamsqs-deployFunction/test-lambda-sqs/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -206,7 +206,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -214,13 +214,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "queue-dlq": { @@ -238,7 +238,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -321,19 +321,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "queue": { @@ -360,7 +360,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -443,25 +443,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs.LambdaToSqs", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -489,7 +489,7 @@ "path": "lamsqs-deployFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -497,25 +497,25 @@ "path": "lamsqs-deployFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -523,7 +523,7 @@ "path": "lamsqs-deployFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -531,13 +531,13 @@ "path": "lamsqs-deployFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -551,7 +551,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.ts index 3c187d18d..16bd57653 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunction.ts @@ -17,6 +17,7 @@ import { LambdaToSqs, LambdaToSqsProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-sqs'; // Definitions const props: LambdaToSqsProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/lamsqs-deployFunctionWithVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/lamsqs-deployFunctionWithVpc.assets.json index 5bf4cb2f9..019613356 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/lamsqs-deployFunctionWithVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/lamsqs-deployFunctionWithVpc.assets.json @@ -27,7 +27,7 @@ } } }, - "c1e341649482374813c3f7100ee90143d45039fc12308ff53717a3ffdf0822af": { + "c816279812dd808a13ce71bd6d875d82304f2d67fa08b865dea2f45879cb0feb": { "source": { "path": "lamsqs-deployFunctionWithVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c1e341649482374813c3f7100ee90143d45039fc12308ff53717a3ffdf0822af.json", + "objectKey": "c816279812dd808a13ce71bd6d875d82304f2d67fa08b865dea2f45879cb0feb.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/lamsqs-deployFunctionWithVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/lamsqs-deployFunctionWithVpc.template.json index 249a8bc8b..0a2593162 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/lamsqs-deployFunctionWithVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/lamsqs-deployFunctionWithVpc.template.json @@ -163,7 +163,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -767,7 +767,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -851,6 +859,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/manifest.json index 1de95fd37..de7228f16 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/manifest.json @@ -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}/c1e341649482374813c3f7100ee90143d45039fc12308ff53717a3ffdf0822af.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c816279812dd808a13ce71bd6d875d82304f2d67fa08b865dea2f45879cb0feb.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -208,6 +208,12 @@ "data": "VpcSQSDF166A88" } ], + "/lamsqs-deployFunctionWithVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamsqs-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -237,24 +243,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testlambdasqsdeadLetterQueueC34BC0BD": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqsdeadLetterQueueC34BC0BD", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "testlambdasqsdeadLetterQueuePolicy270F1626": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqsdeadLetterQueuePolicy270F1626", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "lamsqs-deployFunctionWithVpc" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/tree.json index 149f5f776..17603d262 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamsqs-deployFunctionWithVpc/test-lambda-sqs/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -139,19 +139,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -179,13 +179,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -201,7 +201,7 @@ "path": "lamsqs-deployFunctionWithVpc/test-lambda-sqs/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -209,13 +209,13 @@ "path": "lamsqs-deployFunctionWithVpc/test-lambda-sqs/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -245,7 +245,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -271,13 +271,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "queue-dlq": { @@ -295,7 +295,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -378,19 +378,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } }, "queue": { @@ -417,7 +417,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -500,25 +500,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs.LambdaToSqs", - "version": "2.58.1" + "version": "2.60.0" } }, "Vpc": { @@ -545,7 +545,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -589,7 +589,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -597,7 +597,7 @@ "path": "lamsqs-deployFunctionWithVpc/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -619,7 +619,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -638,13 +638,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -688,7 +688,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -696,7 +696,7 @@ "path": "lamsqs-deployFunctionWithVpc/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -718,7 +718,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -737,13 +737,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -755,13 +755,13 @@ "path": "lamsqs-deployFunctionWithVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -777,7 +777,7 @@ "path": "lamsqs-deployFunctionWithVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -808,7 +808,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -860,19 +860,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -896,13 +896,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -936,13 +936,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "SQS": { @@ -992,19 +992,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamsqs-deployFunctionWithVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1016,7 +1024,7 @@ "path": "lamsqs-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1024,7 +1032,7 @@ "path": "lamsqs-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1032,13 +1040,13 @@ "path": "lamsqs-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "lamsqs-deployFunctionWithVpc-SQS-security-group": { @@ -1094,13 +1102,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1128,7 +1136,7 @@ "path": "lamsqs-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1136,25 +1144,25 @@ "path": "lamsqs-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1162,7 +1170,7 @@ "path": "lamsqs-deployFunctionWithVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1170,13 +1178,13 @@ "path": "lamsqs-deployFunctionWithVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1190,7 +1198,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.ts index 36d193ada..d1094d9de 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-deployFunctionWithVpc.ts @@ -17,6 +17,7 @@ import { LambdaToSqs, LambdaToSqsProps } from "../lib"; import * as lambda from "aws-cdk-lib/aws-lambda"; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = "Integration Test for aws-lambda-sqs"; // Definitions const props: LambdaToSqsProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/lamsqs-existingFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/lamsqs-existingFunction.assets.json index 362bd6d5d..3aacb626a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/lamsqs-existingFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/lamsqs-existingFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "c7071c16a950c0484e903b83cfa1cf03a07685b3dee30d9ced2e5352991494cc": { + "8e47ead31e53fbdfa06d71c28b4b277523de0052735426873cdcd6e7b07158ff": { "source": { "path": "lamsqs-existingFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c7071c16a950c0484e903b83cfa1cf03a07685b3dee30d9ced2e5352991494cc.json", + "objectKey": "8e47ead31e53fbdfa06d71c28b4b277523de0052735426873cdcd6e7b07158ff.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/lamsqs-existingFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/lamsqs-existingFunction.template.json index 0fcc4b9b6..2305819a7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/lamsqs-existingFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/lamsqs-existingFunction.template.json @@ -128,7 +128,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/manifest.json index 510eb1736..9e89b8ccd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/manifest.json @@ -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}/c7071c16a950c0484e903b83cfa1cf03a07685b3dee30d9ced2e5352991494cc.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8e47ead31e53fbdfa06d71c28b4b277523de0052735426873cdcd6e7b07158ff.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -135,24 +135,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testlambdasqsdeadLetterQueueC34BC0BD": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqsdeadLetterQueueC34BC0BD", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "testlambdasqsdeadLetterQueuePolicy270F1626": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqsdeadLetterQueuePolicy270F1626", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "lamsqs-existingFunction" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/tree.json index 8a9f5623e..7729855f7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamsqs-existingFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -130,19 +130,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -158,7 +158,7 @@ "path": "lamsqs-existingFunction/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -166,13 +166,13 @@ "path": "lamsqs-existingFunction/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -202,7 +202,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -210,13 +210,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "test-lambda-sqs": { @@ -238,7 +238,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -321,19 +321,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "queue": { @@ -360,7 +360,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -443,25 +443,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs.LambdaToSqs", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -489,7 +489,7 @@ "path": "lamsqs-existingFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -497,25 +497,25 @@ "path": "lamsqs-existingFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -523,7 +523,7 @@ "path": "lamsqs-existingFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -531,13 +531,13 @@ "path": "lamsqs-existingFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -551,7 +551,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.ts index 9c20290f2..bd5f85a1e 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-existingFunction.ts @@ -26,7 +26,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-sqs'; // Definitions const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.assets.json index 0b82e3bd4..4eda75b97 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.assets.json @@ -14,7 +14,7 @@ } } }, - "e6e863c11311a938692123125f7cbd2791d77b90923704e3ca40b6365164a13d": { + "5a436add39e43396d8350c247b44c8229d77875ccdec1737eea7f8df341178a9": { "source": { "path": "lamsqs-useCmk.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e6e863c11311a938692123125f7cbd2791d77b90923704e3ca40b6365164a13d.json", + "objectKey": "5a436add39e43396d8350c247b44c8229d77875ccdec1737eea7f8df341178a9.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.template.json index 162107673..7fa02965f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/lamsqs-useCmk.template.json @@ -143,7 +143,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/manifest.json index a705336fc..8a2a53b0f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/manifest.json @@ -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}/e6e863c11311a938692123125f7cbd2791d77b90923704e3ca40b6365164a13d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5a436add39e43396d8350c247b44c8229d77875ccdec1737eea7f8df341178a9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -147,24 +147,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testlambdasqsdeadLetterQueueC34BC0BD": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqsdeadLetterQueueC34BC0BD", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "testlambdasqsdeadLetterQueuePolicy270F1626": [ - { - "type": "aws:cdk:logicalId", - "data": "testlambdasqsdeadLetterQueuePolicy270F1626", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "lamsqs-useCmk" diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/tree.json index c8e2d4852..087105f53 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamsqs-useCmk/test-lambda-sqs/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -149,19 +149,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -177,7 +177,7 @@ "path": "lamsqs-useCmk/test-lambda-sqs/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -185,13 +185,13 @@ "path": "lamsqs-useCmk/test-lambda-sqs/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -221,7 +221,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -229,13 +229,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "queue-dlq": { @@ -253,7 +253,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -336,19 +336,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "'queueKey'": { @@ -394,13 +394,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.145.0" } }, "queue": { @@ -432,7 +432,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -515,25 +515,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-sqs.LambdaToSqs", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -561,7 +561,7 @@ "path": "lamsqs-useCmk/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -569,25 +569,25 @@ "path": "lamsqs-useCmk/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -595,7 +595,7 @@ "path": "lamsqs-useCmk/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -603,13 +603,13 @@ "path": "lamsqs-useCmk/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.ts index 8b6daeb27..a6ba2dc22 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/integ.lamsqs-useCmk.ts @@ -17,6 +17,7 @@ import { LambdaToSqs, LambdaToSqsProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-sqs'; // Definitions const props: LambdaToSqsProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/lambda-sqs.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/lambda-sqs.test.ts index 4f5e4177a..61dbb2251 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/lambda-sqs.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-sqs/test/lambda-sqs.test.ts @@ -19,6 +19,7 @@ import * as lambda from "aws-cdk-lib/aws-lambda"; import * as ec2 from "aws-cdk-lib/aws-ec2"; import { LambdaToSqs, LambdaToSqsProps } from '../lib'; import { Template } from 'aws-cdk-lib/assertions'; +import * as defaults from '@aws-solutions-constructs/core'; test('Test the properties', () => { // Stack @@ -26,7 +27,7 @@ test('Test the properties', () => { // Helper declaration const pattern = new LambdaToSqs(stack, 'lambda-to-sqs-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -48,7 +49,7 @@ test("Test minimal deployment that deploys a VPC without vpcProps", () => { // Helper declaration new LambdaToSqs(stack, "lambda-to-sqs-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -96,7 +97,7 @@ test("Test minimal deployment that deploys a VPC w/vpcProps", () => { // Helper declaration new LambdaToSqs(stack, "lambda-to-sqs-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -153,7 +154,7 @@ test("Test minimal deployment with an existing VPC", () => { // Helper declaration new LambdaToSqs(stack, "lambda-to-sqs-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -192,7 +193,7 @@ test("Test minimal deployment with an existing VPC and existing Lambda function const stack = new Stack(); const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -223,7 +224,7 @@ test("Confirm CheckVpcProps is called", () => { // Helper declaration new LambdaToSqs(stack, "lambda-to-sqs-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -242,7 +243,7 @@ test('Test lambda function custom environment variable', () => { // Helper declaration new LambdaToSqs(stack, 'lambda-to-sqs-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -253,7 +254,7 @@ test('Test lambda function custom environment variable', () => { const template = Template.fromStack(stack); template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', @@ -271,7 +272,7 @@ test('Queue is encrypted with imported CMK when set on encryptionKey prop', () = const cmk = new kms.Key(stack, 'cmk'); new LambdaToSqs(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -298,7 +299,7 @@ test('Queue is encrypted with imported CMK when set on queueProps.encryptionMast const cmk = new kms.Key(stack, 'cmk'); new LambdaToSqs(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -326,7 +327,7 @@ test('Queue is encrypted with provided encryptionKeyProps', () => { new LambdaToSqs(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -364,7 +365,7 @@ test('Queue is encrypted by default with SQS-managed KMS key when no other encry new LambdaToSqs(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -384,7 +385,7 @@ test('Queue is encrypted with customer managed KMS Key when enable encryption fl new LambdaToSqs(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -410,7 +411,7 @@ test('Queue purging flag grants correct permissions', () => { new LambdaToSqs(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -495,7 +496,7 @@ test('Confirm CheckSqsProps is being called', () => { // Helper declaration const props = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -515,14 +516,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: LambdaToSqsProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/lamssm-deployFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/lamssm-deployFunction.assets.json index db1443a95..790d48059 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/lamssm-deployFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/lamssm-deployFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "bcdafffec173598a34a028b4cb218738d6366932c5cf8acfef068a8b2c6b1f54": { + "26d67f4334663999380c74d8466de28a2b8cee370bdad421eaf1588e05ae7307": { "source": { "path": "lamssm-deployFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "bcdafffec173598a34a028b4cb218738d6366932c5cf8acfef068a8b2c6b1f54.json", + "objectKey": "26d67f4334663999380c74d8466de28a2b8cee370bdad421eaf1588e05ae7307.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/lamssm-deployFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/lamssm-deployFunction.template.json index 79fee087c..8498c12e7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/lamssm-deployFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/lamssm-deployFunction.template.json @@ -146,7 +146,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/manifest.json index f6bd147b2..9dffee9ff 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/manifest.json @@ -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}/bcdafffec173598a34a028b4cb218738d6366932c5cf8acfef068a8b2c6b1f54.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/26d67f4334663999380c74d8466de28a2b8cee370bdad421eaf1588e05ae7307.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/tree.json index 59f2819cf..6cbb46c9d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamssm-deployFunction/test-lambda-ssmstringparameter/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -152,19 +152,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -180,7 +180,7 @@ "path": "lamssm-deployFunction/test-lambda-ssmstringparameter/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -188,13 +188,13 @@ "path": "lamssm-deployFunction/test-lambda-ssmstringparameter/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -224,7 +224,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -232,13 +232,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "stringParameter": { @@ -257,19 +257,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.StringParameter", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-ssmstringparameter.LambdaToSsmstringparameter", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -285,7 +285,7 @@ "path": "lamssm-deployFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -297,7 +297,7 @@ "path": "lamssm-deployFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -305,25 +305,25 @@ "path": "lamssm-deployFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -331,7 +331,7 @@ "path": "lamssm-deployFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -339,13 +339,13 @@ "path": "lamssm-deployFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -353,13 +353,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.ts index 0cd3d8d98..253e0bc1a 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunction.ts @@ -17,6 +17,7 @@ import {LambdaToSsmstringparameter, LambdaToSsmstringparameterProps} from '../li import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-ssmstringpa // Definitions const props: LambdaToSsmstringparameterProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/lamssm-deployFunctionWithExistingVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/lamssm-deployFunctionWithExistingVpc.assets.json index 4982ff57f..5217b9817 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/lamssm-deployFunctionWithExistingVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/lamssm-deployFunctionWithExistingVpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "ee53aa6c8994586b03015d1864a56c9ada82619e3103136681e2c95f971cf62b": { + "8aadb752484ff000570223c77ecd14c061a3177f483fdb72e01483a907f87f29": { "source": { "path": "lamssm-deployFunctionWithExistingVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ee53aa6c8994586b03015d1864a56c9ada82619e3103136681e2c95f971cf62b.json", + "objectKey": "8aadb752484ff000570223c77ecd14c061a3177f483fdb72e01483a907f87f29.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/lamssm-deployFunctionWithExistingVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/lamssm-deployFunctionWithExistingVpc.template.json index 5f8092300..dd8232091 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/lamssm-deployFunctionWithExistingVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/lamssm-deployFunctionWithExistingVpc.template.json @@ -661,7 +661,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -672,7 +672,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -877,7 +885,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -993,6 +1001,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/manifest.json index d7c893b40..33df806a2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/manifest.json @@ -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}/ee53aa6c8994586b03015d1864a56c9ada82619e3103136681e2c95f971cf62b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8aadb752484ff000570223c77ecd14c061a3177f483fdb72e01483a907f87f29.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -256,6 +256,12 @@ "data": "VpcSSM173B3B5B" } ], + "/lamssm-deployFunctionWithExistingVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamssm-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/tree.json index 7b3251481..bb5178d51 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "lamssm-deployFunctionWithExistingVpc/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "lamssm-deployFunctionWithExistingVpc/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "lamssm-deployFunctionWithExistingVpc/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "lamssm-deployFunctionWithExistingVpc/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "lamssm-deployFunctionWithExistingVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "lamssm-deployFunctionWithExistingVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,13 +835,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "SSM": { @@ -891,19 +891,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamssm-deployFunctionWithExistingVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -915,7 +923,7 @@ "path": "lamssm-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -923,7 +931,7 @@ "path": "lamssm-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -931,13 +939,13 @@ "path": "lamssm-deployFunctionWithExistingVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "test-lambda-ssmstringparameter": { @@ -953,7 +961,7 @@ "path": "lamssm-deployFunctionWithExistingVpc/test-lambda-ssmstringparameter/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1016,7 +1024,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1089,19 +1097,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -1129,13 +1137,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -1151,7 +1159,7 @@ "path": "lamssm-deployFunctionWithExistingVpc/test-lambda-ssmstringparameter/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -1159,13 +1167,13 @@ "path": "lamssm-deployFunctionWithExistingVpc/test-lambda-ssmstringparameter/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1195,7 +1203,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -1221,13 +1229,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "stringParameter": { @@ -1246,19 +1254,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.StringParameter", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-ssmstringparameter.LambdaToSsmstringparameter", - "version": "2.51.0" + "version": "2.60.0" } }, "lamssm-deployFunctionWithExistingVpc-SSM-security-group": { @@ -1314,13 +1322,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1348,7 +1356,7 @@ "path": "lamssm-deployFunctionWithExistingVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1356,25 +1364,25 @@ "path": "lamssm-deployFunctionWithExistingVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1382,7 +1390,7 @@ "path": "lamssm-deployFunctionWithExistingVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1390,13 +1398,13 @@ "path": "lamssm-deployFunctionWithExistingVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1410,7 +1418,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.ts index f31d3d337..b1b036685 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithExistingVpc.ts @@ -36,7 +36,7 @@ const vpc = defaults.buildVpc(stack, { // Definitions const props: LambdaToSsmstringparameterProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/lamssm-deployFunctionWithVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/lamssm-deployFunctionWithVpc.assets.json index 5b4fa9c51..4e9a862b9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/lamssm-deployFunctionWithVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/lamssm-deployFunctionWithVpc.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "a73a41053df8817c74e773c2567cfe38e6722fe37d93766c3ec65a4976b4c632": { + "954425c6848ac457ec430114d2d4e3395fb7ff6d5a6b76273abd0c4f65ccc20c": { "source": { "path": "lamssm-deployFunctionWithVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a73a41053df8817c74e773c2567cfe38e6722fe37d93766c3ec65a4976b4c632.json", + "objectKey": "954425c6848ac457ec430114d2d4e3395fb7ff6d5a6b76273abd0c4f65ccc20c.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/lamssm-deployFunctionWithVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/lamssm-deployFunctionWithVpc.template.json index 620bba65f..879380ffb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/lamssm-deployFunctionWithVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/lamssm-deployFunctionWithVpc.template.json @@ -181,7 +181,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" }, @@ -614,7 +614,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -625,7 +625,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -709,6 +717,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/manifest.json index 5b247e68e..4768505cc 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/manifest.json @@ -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}/a73a41053df8817c74e773c2567cfe38e6722fe37d93766c3ec65a4976b4c632.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/954425c6848ac457ec430114d2d4e3395fb7ff6d5a6b76273abd0c4f65ccc20c.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -190,6 +190,12 @@ "data": "VpcSSM173B3B5B" } ], + "/lamssm-deployFunctionWithVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamssm-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/tree.json index 54880d55a..f1ffe5295 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamssm-deployFunctionWithVpc/test-lambda-ssmstringparameter/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -157,19 +157,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -197,13 +197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -219,7 +219,7 @@ "path": "lamssm-deployFunctionWithVpc/test-lambda-ssmstringparameter/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -227,13 +227,13 @@ "path": "lamssm-deployFunctionWithVpc/test-lambda-ssmstringparameter/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -263,7 +263,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" }, @@ -289,13 +289,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.147.3" } }, "stringParameter": { @@ -314,19 +314,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.StringParameter", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-ssmstringparameter.LambdaToSsmstringparameter", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -353,7 +353,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -397,7 +397,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -405,7 +405,7 @@ "path": "lamssm-deployFunctionWithVpc/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -427,7 +427,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -446,13 +446,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -496,7 +496,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -504,7 +504,7 @@ "path": "lamssm-deployFunctionWithVpc/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -526,7 +526,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -545,13 +545,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -563,13 +563,13 @@ "path": "lamssm-deployFunctionWithVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -585,7 +585,7 @@ "path": "lamssm-deployFunctionWithVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -616,7 +616,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -668,19 +668,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -704,13 +704,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -744,13 +744,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } }, "SSM": { @@ -800,19 +800,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamssm-deployFunctionWithVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -824,7 +832,7 @@ "path": "lamssm-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -832,7 +840,7 @@ "path": "lamssm-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -840,13 +848,13 @@ "path": "lamssm-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "lamssm-deployFunctionWithVpc-SSM-security-group": { @@ -902,13 +910,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -936,7 +944,7 @@ "path": "lamssm-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -944,25 +952,25 @@ "path": "lamssm-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -970,7 +978,7 @@ "path": "lamssm-deployFunctionWithVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -978,13 +986,13 @@ "path": "lamssm-deployFunctionWithVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -998,7 +1006,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.ts index 1ce276ff7..91e36ac6f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-deployFunctionWithVpc.ts @@ -17,6 +17,7 @@ import {LambdaToSsmstringparameter, LambdaToSsmstringparameterProps} from '../li import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName, suppressCustomHandlerCfnNagWarnings } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = "Integration Test for aws-lambda-ssmstringpa // Definitions const props: LambdaToSsmstringparameterProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/lamssm-existingFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/lamssm-existingFunction.assets.json index db5f01b8e..64ad7bdb3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/lamssm-existingFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/lamssm-existingFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "613d185465a9400767af8955a1e6827ba2f79a2249259d68714d1d336e3cc2c1": { + "b76f87bd4ca64aaa1beb37cb092d3c97c216794a8dd4cae43d5e7bba518a4b94": { "source": { "path": "lamssm-existingFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "613d185465a9400767af8955a1e6827ba2f79a2249259d68714d1d336e3cc2c1.json", + "objectKey": "b76f87bd4ca64aaa1beb37cb092d3c97c216794a8dd4cae43d5e7bba518a4b94.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/lamssm-existingFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/lamssm-existingFunction.template.json index e568fe514..a27131558 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/lamssm-existingFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/lamssm-existingFunction.template.json @@ -146,7 +146,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/manifest.json index 1f841f8da..623e22e08 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/manifest.json @@ -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}/613d185465a9400767af8955a1e6827ba2f79a2249259d68714d1d336e3cc2c1.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b76f87bd4ca64aaa1beb37cb092d3c97c216794a8dd4cae43d5e7bba518a4b94.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/tree.json index 546b5582a..8fe9e826d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamssm-existingFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -148,19 +148,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -176,7 +176,7 @@ "path": "lamssm-existingFunction/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -184,13 +184,13 @@ "path": "lamssm-existingFunction/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -220,7 +220,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -228,13 +228,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "test-lambda-ssmstringparameter": { @@ -257,19 +257,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.StringParameter", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-ssmstringparameter.LambdaToSsmstringparameter", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -285,7 +285,7 @@ "path": "lamssm-existingFunction/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -297,7 +297,7 @@ "path": "lamssm-existingFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -305,25 +305,25 @@ "path": "lamssm-existingFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -331,7 +331,7 @@ "path": "lamssm-existingFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -339,13 +339,13 @@ "path": "lamssm-existingFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -353,13 +353,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.ts index 12b8b4235..ac70f3106 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingFunction.ts @@ -26,7 +26,7 @@ stack.templateOptions.description = 'Integration Test for aws-lambda-ssmstringpa // Definitions const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/lamssm-existingStringParameter.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/lamssm-existingStringParameter.assets.json index 099f2d30d..af7b4185b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/lamssm-existingStringParameter.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/lamssm-existingStringParameter.assets.json @@ -14,7 +14,7 @@ } } }, - "dcce9523e137f6ea8315af3d2e14ef8c202f473a91bfa0c21f095844965d4f6e": { + "a07fa0497929c0de0535d4d9919e9b8a7100f13d724edfd1b454b8fc9341a487": { "source": { "path": "lamssm-existingStringParameter.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dcce9523e137f6ea8315af3d2e14ef8c202f473a91bfa0c21f095844965d4f6e.json", + "objectKey": "a07fa0497929c0de0535d4d9919e9b8a7100f13d724edfd1b454b8fc9341a487.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/lamssm-existingStringParameter.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/lamssm-existingStringParameter.template.json index 4f8e7be58..46dcaf6f9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/lamssm-existingStringParameter.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/lamssm-existingStringParameter.template.json @@ -153,7 +153,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/manifest.json index 1adcf3732..029cb65a9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/manifest.json @@ -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}/dcce9523e137f6ea8315af3d2e14ef8c202f473a91bfa0c21f095844965d4f6e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a07fa0497929c0de0535d4d9919e9b8a7100f13d724edfd1b454b8fc9341a487.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/tree.json index 79ced6551..76e582e35 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.js.snapshot/tree.json @@ -24,13 +24,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ssm.StringParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "test-lambda-ssmstringparameter": { @@ -46,7 +46,7 @@ "path": "lamssm-existingStringParameter/test-lambda-ssmstringparameter/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -109,7 +109,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -177,19 +177,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -205,7 +205,7 @@ "path": "lamssm-existingStringParameter/test-lambda-ssmstringparameter/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -213,13 +213,13 @@ "path": "lamssm-existingStringParameter/test-lambda-ssmstringparameter/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -249,7 +249,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -257,19 +257,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-ssmstringparameter.LambdaToSsmstringparameter", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -285,7 +285,7 @@ "path": "lamssm-existingStringParameter/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -297,7 +297,7 @@ "path": "lamssm-existingStringParameter/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -305,25 +305,25 @@ "path": "lamssm-existingStringParameter/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -331,7 +331,7 @@ "path": "lamssm-existingStringParameter/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -339,13 +339,13 @@ "path": "lamssm-existingStringParameter/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -353,13 +353,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.ts index 0d5bbb7e1..8703dffee 100755 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/integ.lamssm-existingStringParameter.ts @@ -18,6 +18,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import { StringParameter } from "aws-cdk-lib/aws-ssm"; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -28,7 +29,7 @@ const existingStringParam = new StringParameter(stack, 'myNewStringParameter', { // Definitions const props: LambdaToSsmstringparameterProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/lambda-ssmstringparameter.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/lambda-ssmstringparameter.test.ts index 33609ffaf..c40221309 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/lambda-ssmstringparameter.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-ssmstringparameter/test/lambda-ssmstringparameter.test.ts @@ -27,7 +27,7 @@ test('Test lambda function custom environment variable', () => { // Helper declaration new LambdaToSsmstringparameter(stack, 'lambda-to-ssm-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -42,7 +42,7 @@ test('Test lambda function custom environment variable', () => { const template = Template.fromStack(stack); template.hasResourceProperties('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', @@ -60,7 +60,7 @@ test('Test the properties', () => { // Helper declaration const pattern = new LambdaToSsmstringparameter(stack, 'lambda-to-ssm-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -81,7 +81,7 @@ test('Test deployment w/ existing String Parameter', () => { const existingStringParam = new StringParameter(stack, 'myNewStringParameter', {stringValue: "test-string-value" }); const pattern = new LambdaToSsmstringparameter(stack, 'lambda-to-ssm-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -103,7 +103,7 @@ test('Test deployment w/ existing function', () => { const stack = new Stack(); // Helper declaration const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; @@ -129,7 +129,7 @@ test('Test minimal deployment write access to String Parameter ', () => { // Helper declaration new LambdaToSsmstringparameter(stack, 'lambda-to-ssm-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -151,7 +151,7 @@ test("Test minimal deployment that deploys a VPC without vpcProps", () => { // Helper declaration new LambdaToSsmstringparameter(stack, 'lambda-to-ssm-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -200,7 +200,7 @@ test("Test minimal deployment that deploys a VPC w/vpcProps", () => { // Helper declaration new LambdaToSsmstringparameter(stack, 'lambda-to-ssm-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -258,7 +258,7 @@ test("Test minimal deployment with an existing VPC", () => { // Helper declaration new LambdaToSsmstringparameter(stack, 'lambda-to-ssm-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -298,7 +298,7 @@ test("Test minimal deployment with an existing VPC and existing Lambda function const stack = new Stack(); const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -331,7 +331,7 @@ test("Confirm that CheckVpcProps is called", () => { // Helper declaration new LambdaToSsmstringparameter(stack, "lambda-to-ssm-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -352,7 +352,7 @@ test("Test bad call with invalid string parameter permission", () => { // Helper declaration new LambdaToSsmstringparameter(stack, "lambda-to-ssm-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -369,7 +369,7 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -377,7 +377,7 @@ test('Confirm call to CheckLambdaProps', () => { const props: LambdaToSsmstringparameterProps = { stringParameterProps: { stringValue: "test-string-value" }, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/lamstp-deploy-lambda.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/lamstp-deploy-lambda.assets.json index 3606e26ed..387df5dc7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/lamstp-deploy-lambda.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/lamstp-deploy-lambda.assets.json @@ -27,7 +27,7 @@ } } }, - "dc5caf4e3a2ae274c1677a76602bff1e02bb2b3dad7599d4e02b7e0d0daf7af7": { + "b97c8b9db1889665a8d57ad3af74f167df3760205d6661102658a8e51c9c93d9": { "source": { "path": "lamstp-deploy-lambda.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dc5caf4e3a2ae274c1677a76602bff1e02bb2b3dad7599d4e02b7e0d0daf7af7.json", + "objectKey": "b97c8b9db1889665a8d57ad3af74f167df3760205d6661102658a8e51c9c93d9.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/lamstp-deploy-lambda.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/lamstp-deploy-lambda.template.json index f125aa844..1af7974d1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/lamstp-deploy-lambda.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/lamstp-deploy-lambda.template.json @@ -100,7 +100,8 @@ }, "Environment": { "Variables": { - "LAMBDA_NAME": "existing-function" + "LAMBDA_NAME": "existing-function", + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" } }, "Handler": "index.handler", @@ -421,6 +422,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "STATE_MACHINE_ARN": { "Ref": "testlambdastepfunctionsconstructStateMachineE1526513" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/manifest.json index 7706a71f6..57524755e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/manifest.json @@ -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}/dc5caf4e3a2ae274c1677a76602bff1e02bb2b3dad7599d4e02b7e0d0daf7af7.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b97c8b9db1889665a8d57ad3af74f167df3760205d6661102658a8e51c9c93d9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/tree.json index 41368140c..62146efef 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamstp-deploy-lambda/taskFunctionServiceRole/ImporttaskFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -116,19 +116,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "taskFunction": { @@ -144,7 +144,7 @@ "path": "lamstp-deploy-lambda/taskFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.127.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -152,13 +152,13 @@ "path": "lamstp-deploy-lambda/taskFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -175,7 +175,8 @@ }, "environment": { "variables": { - "LAMBDA_NAME": "existing-function" + "LAMBDA_NAME": "existing-function", + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" } }, "handler": "index.handler", @@ -193,13 +194,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.127.0" + "version": "2.145.0" } }, "permission-test": { @@ -207,7 +208,7 @@ "path": "lamstp-deploy-lambda/permission-test", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.127.0" + "version": "2.145.0" } }, "test-lambda-stepfunctions-construct": { @@ -249,13 +250,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.127.0" + "version": "2.145.0" } }, "StateMachine": { @@ -271,7 +272,7 @@ "path": "lamstp-deploy-lambda/test-lambda-stepfunctions-construct/StateMachine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -296,7 +297,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -364,19 +365,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -429,13 +430,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", - "version": "2.127.0" + "version": "2.145.0" } }, "LambdaFunctionServiceRole": { @@ -447,7 +448,7 @@ "path": "lamstp-deploy-lambda/test-lambda-stepfunctions-construct/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -510,7 +511,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -553,19 +554,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -581,7 +582,7 @@ "path": "lamstp-deploy-lambda/test-lambda-stepfunctions-construct/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.127.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -589,13 +590,13 @@ "path": "lamstp-deploy-lambda/test-lambda-stepfunctions-construct/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -612,6 +613,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "STATE_MACHINE_ARN": { "Ref": "testlambdastepfunctionsconstructStateMachineE1526513" } @@ -632,13 +634,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionFailedAlarm": { @@ -671,13 +673,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionThrottledAlarm": { @@ -710,13 +712,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionAbortedAlarm": { @@ -749,19 +751,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-stepfunctions.LambdaToStepfunctions", - "version": "2.53.0" + "version": "2.60.0" } }, "Integ": { @@ -789,7 +791,7 @@ "path": "lamstp-deploy-lambda/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.127.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -797,25 +799,25 @@ "path": "lamstp-deploy-lambda/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.127.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.127.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -823,7 +825,7 @@ "path": "lamstp-deploy-lambda/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.127.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -831,13 +833,13 @@ "path": "lamstp-deploy-lambda/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.127.0" + "version": "2.145.0" } }, "Tree": { @@ -851,7 +853,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.127.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.ts index c714c5f12..f74aab5ec 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deploy-lambda.ts @@ -19,13 +19,14 @@ import * as sftasks from 'aws-cdk-lib/aws-stepfunctions-tasks'; import { generateIntegStackName, deployLambdaFunction } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import * as sfn from 'aws-cdk-lib/aws-stepfunctions'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup the app and stack const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); const taskFunction = deployLambdaFunction(stack, { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda-task`), environment: { @@ -41,7 +42,7 @@ const startState = new sftasks.LambdaInvoke(stack, 'permission-test', { // Setup the pattern props const props: LambdaToStepfunctionsProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/lamstp-deployFunctionWithVpc.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/lamstp-deployFunctionWithVpc.assets.json index 6a93670ad..920da2b18 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/lamstp-deployFunctionWithVpc.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/lamstp-deployFunctionWithVpc.assets.json @@ -27,7 +27,7 @@ } } }, - "9650c1674fff5a8038d93bcc24723dca47b0e377a12fb0d0b8411369cbdf5422": { + "27dbf6b2645825e0d87524789093e0f010da798b5e2d3584358ca98844fe828e": { "source": { "path": "lamstp-deployFunctionWithVpc.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9650c1674fff5a8038d93bcc24723dca47b0e377a12fb0d0b8411369cbdf5422.json", + "objectKey": "27dbf6b2645825e0d87524789093e0f010da798b5e2d3584358ca98844fe828e.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/lamstp-deployFunctionWithVpc.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/lamstp-deployFunctionWithVpc.template.json index 63a51d26c..1a5b4f276 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/lamstp-deployFunctionWithVpc.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/lamstp-deployFunctionWithVpc.template.json @@ -387,6 +387,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "STATE_MACHINE_ARN": { "Ref": "testlambdastepfunctionsStateMachine807F0A77" } @@ -911,7 +912,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1007,6 +1016,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/manifest.json index 4945ea7d6..a678fbc6f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/manifest.json @@ -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}/9650c1674fff5a8038d93bcc24723dca47b0e377a12fb0d0b8411369cbdf5422.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/27dbf6b2645825e0d87524789093e0f010da798b5e2d3584358ca98844fe828e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -238,6 +238,12 @@ "data": "VpcSTEPFUNCTIONS550F8CB6" } ], + "/lamstp-deployFunctionWithVpc/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/lamstp-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/tree.json index e3a0a58b9..b04fb359f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "lamstp-deployFunctionWithVpc/lambdalamstp-test/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -60,13 +60,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -90,13 +90,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "tasklamstp-test": { @@ -104,7 +104,7 @@ "path": "lamstp-deployFunctionWithVpc/tasklamstp-test", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.143.0" + "version": "2.147.3" } }, "test-lambda-stepfunctions": { @@ -146,13 +146,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "StateMachine": { @@ -168,7 +168,7 @@ "path": "lamstp-deployFunctionWithVpc/test-lambda-stepfunctions/StateMachine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -193,7 +193,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -261,19 +261,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -326,13 +326,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -344,7 +344,7 @@ "path": "lamstp-deployFunctionWithVpc/test-lambda-stepfunctions/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -407,7 +407,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -455,19 +455,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "ReplaceDefaultSecurityGroup-security-group": { @@ -495,13 +495,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -517,7 +517,7 @@ "path": "lamstp-deployFunctionWithVpc/test-lambda-stepfunctions/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -525,13 +525,13 @@ "path": "lamstp-deployFunctionWithVpc/test-lambda-stepfunctions/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -548,6 +548,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "STATE_MACHINE_ARN": { "Ref": "testlambdastepfunctionsStateMachine807F0A77" } @@ -586,13 +587,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionFailedAlarm": { @@ -625,13 +626,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionThrottledAlarm": { @@ -664,13 +665,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionAbortedAlarm": { @@ -703,19 +704,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-stepfunctions.LambdaToStepfunctions", - "version": "2.58.1" + "version": "2.60.0" } }, "Vpc": { @@ -742,7 +743,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.143.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -786,7 +787,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -794,7 +795,7 @@ "path": "lamstp-deployFunctionWithVpc/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -816,7 +817,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -835,13 +836,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -885,7 +886,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "Acl": { @@ -893,7 +894,7 @@ "path": "lamstp-deployFunctionWithVpc/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTable": { @@ -915,7 +916,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.143.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -934,13 +935,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.143.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -952,13 +953,13 @@ "path": "lamstp-deployFunctionWithVpc/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -974,7 +975,7 @@ "path": "lamstp-deployFunctionWithVpc/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1005,7 +1006,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1057,19 +1058,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1093,13 +1094,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1133,13 +1134,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.143.0" + "version": "2.147.3" } }, "STEP_FUNCTIONS": { @@ -1189,19 +1190,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "lamstp-deployFunctionWithVpc/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1213,7 +1222,7 @@ "path": "lamstp-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1221,7 +1230,7 @@ "path": "lamstp-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1229,13 +1238,13 @@ "path": "lamstp-deployFunctionWithVpc/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "lamstp-deployFunctionWithVpc-STEP_FUNCTIONS-security-group": { @@ -1291,13 +1300,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "Integ": { @@ -1325,7 +1334,7 @@ "path": "lamstp-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1333,25 +1342,25 @@ "path": "lamstp-deployFunctionWithVpc/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1359,7 +1368,7 @@ "path": "lamstp-deployFunctionWithVpc/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1367,13 +1376,13 @@ "path": "lamstp-deployFunctionWithVpc/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1387,7 +1396,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.ts index 6a094af7f..f2b5485f7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-deployFunctionWithVpc.ts @@ -27,7 +27,7 @@ stack.templateOptions.description = "Integration Test for aws-lambda-stepfunctio // Definitions const props: LambdaToStepfunctionsProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/lamstp-existing-function.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/lamstp-existing-function.assets.json index 1dc912358..aa58fccb9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/lamstp-existing-function.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/lamstp-existing-function.assets.json @@ -14,7 +14,7 @@ } } }, - "4aa96d7649dd73ce17f34160ac8b5e42e75c06cf16f8c083f0b9b7f675b834df": { + "500eec6174528d25bb257397ef6f14e6dc0fdc8c8fd853dea0ab5d06c2cd5104": { "source": { "path": "lamstp-existing-function.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4aa96d7649dd73ce17f34160ac8b5e42e75c06cf16f8c083f0b9b7f675b834df.json", + "objectKey": "500eec6174528d25bb257397ef6f14e6dc0fdc8c8fd853dea0ab5d06c2cd5104.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/lamstp-existing-function.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/lamstp-existing-function.template.json index 0ff3b740c..ea76cae9c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/lamstp-existing-function.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/lamstp-existing-function.template.json @@ -107,6 +107,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "STATE_MACHINE_ARN": { "Ref": "testlambdastepfunctionsconstructStateMachineE1526513" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/manifest.json index c31f58adf..4e505452b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/manifest.json @@ -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}/4aa96d7649dd73ce17f34160ac8b5e42e75c06cf16f8c083f0b9b7f675b834df.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/500eec6174528d25bb257397ef6f14e6dc0fdc8c8fd853dea0ab5d06c2cd5104.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/tree.json index d49272d92..618868aae 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamstp-existing-function/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -123,19 +123,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -151,7 +151,7 @@ "path": "lamstp-existing-function/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -159,13 +159,13 @@ "path": "lamstp-existing-function/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -182,6 +182,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "STATE_MACHINE_ARN": { "Ref": "testlambdastepfunctionsconstructStateMachineE1526513" } @@ -202,13 +203,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "lambdalamstp-test": { @@ -224,7 +225,7 @@ "path": "lamstp-existing-function/lambdalamstp-test/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -263,13 +264,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -293,13 +294,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "tasklamstp-test": { @@ -307,7 +308,7 @@ "path": "lamstp-existing-function/tasklamstp-test", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.143.0" + "version": "2.145.0" } }, "test-lambda-stepfunctions-construct": { @@ -349,13 +350,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.145.0" } }, "StateMachine": { @@ -371,7 +372,7 @@ "path": "lamstp-existing-function/test-lambda-stepfunctions-construct/StateMachine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -396,7 +397,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -464,19 +465,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -529,13 +530,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", - "version": "2.143.0" + "version": "2.145.0" } }, "ExecutionFailedAlarm": { @@ -568,13 +569,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } }, "ExecutionThrottledAlarm": { @@ -607,13 +608,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } }, "ExecutionAbortedAlarm": { @@ -646,19 +647,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-stepfunctions.LambdaToStepfunctions", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -686,7 +687,7 @@ "path": "lamstp-existing-function/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -694,25 +695,25 @@ "path": "lamstp-existing-function/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -720,7 +721,7 @@ "path": "lamstp-existing-function/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -728,13 +729,13 @@ "path": "lamstp-existing-function/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -748,7 +749,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.ts index 220277806..71405f348 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-existing-function.ts @@ -25,7 +25,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); // Setup the "existing" Lambda function props const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/lamstp-state-machine-defintion.assets.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/lamstp-state-machine-defintion.assets.json index 9018bebb7..250dc1eb8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/lamstp-state-machine-defintion.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/lamstp-state-machine-defintion.assets.json @@ -14,7 +14,7 @@ } } }, - "9abc1a527d46abb263a904b246bdc8af0f2efd8615dd28fd6ec36c084ae75019": { + "541a29c716b80904c6805d7f94087fa165176463ad45c0fc019e4d01e9b398b7": { "source": { "path": "lamstp-state-machine-defintion.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9abc1a527d46abb263a904b246bdc8af0f2efd8615dd28fd6ec36c084ae75019.json", + "objectKey": "541a29c716b80904c6805d7f94087fa165176463ad45c0fc019e4d01e9b398b7.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/lamstp-state-machine-defintion.template.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/lamstp-state-machine-defintion.template.json index b9d9bd287..2c85d7307 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/lamstp-state-machine-defintion.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/lamstp-state-machine-defintion.template.json @@ -95,6 +95,11 @@ "Code": { "ZipFile": "exports.handler = async (event) => { console.log(\"First Function\");}" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "Role": { "Fn::GetAtt": [ @@ -225,6 +230,11 @@ "Code": { "ZipFile": "exports.handler = async (event) => { console.log(\"Second Function\");}" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "Role": { "Fn::GetAtt": [ @@ -574,6 +584,7 @@ }, "Environment": { "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "STATE_MACHINE_ARN": { "Ref": "testlambdastepfunctionsconstructStateMachineE1526513" } diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/manifest.json index cddfd7311..06f16f1d6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/manifest.json @@ -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}/9abc1a527d46abb263a904b246bdc8af0f2efd8615dd28fd6ec36c084ae75019.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/541a29c716b80904c6805d7f94087fa165176463ad45c0fc019e4d01e9b398b7.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/tree.json index a85fe21c7..7ade09076 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "lamstp-state-machine-defintion/first-functionServiceRole/Importfirst-functionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -116,19 +116,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "first-function": { @@ -144,6 +144,11 @@ "code": { "zipFile": "exports.handler = async (event) => { console.log(\"First Function\");}" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "role": { "Fn::GetAtt": [ @@ -159,13 +164,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.127.0" + "version": "2.145.0" } }, "task-one": { @@ -173,7 +178,7 @@ "path": "lamstp-state-machine-defintion/task-one", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.127.0" + "version": "2.145.0" } }, "second-functionServiceRole": { @@ -185,7 +190,7 @@ "path": "lamstp-state-machine-defintion/second-functionServiceRole/Importsecond-functionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -248,7 +253,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -284,19 +289,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "second-function": { @@ -312,6 +317,11 @@ "code": { "zipFile": "exports.handler = async (event) => { console.log(\"Second Function\");}" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "role": { "Fn::GetAtt": [ @@ -327,13 +337,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.127.0" + "version": "2.145.0" } }, "task-two": { @@ -341,7 +351,7 @@ "path": "lamstp-state-machine-defintion/task-two", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.127.0" + "version": "2.145.0" } }, "test-lambda-stepfunctions-construct": { @@ -383,13 +393,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.127.0" + "version": "2.145.0" } }, "StateMachine": { @@ -405,7 +415,7 @@ "path": "lamstp-state-machine-defintion/test-lambda-stepfunctions-construct/StateMachine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -430,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -518,19 +528,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -594,13 +604,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", - "version": "2.127.0" + "version": "2.145.0" } }, "LambdaFunctionServiceRole": { @@ -612,7 +622,7 @@ "path": "lamstp-state-machine-defintion/test-lambda-stepfunctions-construct/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -675,7 +685,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.127.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -718,19 +728,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.127.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -746,7 +756,7 @@ "path": "lamstp-state-machine-defintion/test-lambda-stepfunctions-construct/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.127.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -754,13 +764,13 @@ "path": "lamstp-state-machine-defintion/test-lambda-stepfunctions-construct/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.127.0" + "version": "2.145.0" } }, "Resource": { @@ -777,6 +787,7 @@ }, "environment": { "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", "STATE_MACHINE_ARN": { "Ref": "testlambdastepfunctionsconstructStateMachineE1526513" } @@ -797,13 +808,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionFailedAlarm": { @@ -836,13 +847,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionThrottledAlarm": { @@ -875,13 +886,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } }, "ExecutionAbortedAlarm": { @@ -914,19 +925,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-lambda-stepfunctions.LambdaToStepfunctions", - "version": "2.53.0" + "version": "2.60.0" } }, "Integ": { @@ -954,7 +965,7 @@ "path": "lamstp-state-machine-defintion/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.127.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -962,25 +973,25 @@ "path": "lamstp-state-machine-defintion/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.127.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.127.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -988,7 +999,7 @@ "path": "lamstp-state-machine-defintion/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.127.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -996,13 +1007,13 @@ "path": "lamstp-state-machine-defintion/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.127.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.127.0" + "version": "2.145.0" } }, "Tree": { @@ -1016,7 +1027,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.127.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.ts index 5bce46018..3e4593e36 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/integ.lamstp-state-machine-defintion.ts @@ -19,13 +19,14 @@ import * as sftasks from 'aws-cdk-lib/aws-stepfunctions-tasks'; import * as sfn from 'aws-cdk-lib/aws-stepfunctions'; import { generateIntegStackName, deployLambdaFunction } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup the app and stack const app = new App(); const stack = new Stack(app, generateIntegStackName(__filename)); const functionOne = deployLambdaFunction(stack, { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromInline(`exports.handler = async (event) => { console.log("First Function");}`) }, @@ -36,7 +37,7 @@ const taskOne = new sftasks.LambdaInvoke(stack, 'task-one', { }); const functionTwo = deployLambdaFunction(stack, { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromInline(`exports.handler = async (event) => { console.log("Second Function");}`) }, @@ -52,7 +53,7 @@ const startState = sfn.DefinitionBody.fromChainable(taskOne.next(taskTwo)); // Setup the pattern props const props: LambdaToStepfunctionsProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/lambda-stepfunctions.test.ts b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/lambda-stepfunctions.test.ts index 40c2975f8..9dd9bf11a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/lambda-stepfunctions.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-lambda-stepfunctions/test/lambda-stepfunctions.test.ts @@ -27,7 +27,7 @@ test('Test deployment with new Lambda function', () => { // Helper declaration new LambdaToStepfunctions(stack, 'lambda-to-step-function-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -57,7 +57,7 @@ test('Test deployment with existing Lambda function', () => { const stack = new Stack(); // Helper declaration const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -88,7 +88,7 @@ test('Test invocation permissions', () => { const stack = new Stack(); // Helper declaration const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -135,7 +135,7 @@ test('Test the properties', () => { // Helper declaration const pattern = new LambdaToStepfunctions(stack, 'lambda-to-step-function-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -164,7 +164,7 @@ test('Test the properties with no CW Alarms', () => { // Helper declaration const pattern = new LambdaToStepfunctions(stack, 'lambda-to-step-function-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -192,7 +192,7 @@ test('Test lambda function custom environment variable', () => { // Helper declaration new LambdaToStepfunctions(stack, 'lambda-to-step-function-stack', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -223,7 +223,7 @@ test("Test minimal deployment that deploys a VPC without vpcProps", () => { // Helper declaration new LambdaToStepfunctions(stack, "lambda-to-stepfunctions-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -274,7 +274,7 @@ test("Test minimal deployment that deploys a VPC w/vpcProps", () => { // Helper declaration new LambdaToStepfunctions(stack, "lambda-to-stepfunctions-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -333,7 +333,7 @@ test("Test minimal deployment with an existing VPC", () => { // Helper declaration new LambdaToStepfunctions(stack, "lambda-to-stepfunctions-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -375,7 +375,7 @@ test("Test minimal deployment with an existing VPC and existing Lambda function const stack = new Stack(); const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -409,7 +409,7 @@ test("Confirm CheckVpcProps is called", () => { // Helper declaration new LambdaToStepfunctions(stack, "lambda-to-stepfunctions-stack", { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -428,7 +428,7 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -438,7 +438,7 @@ test('Confirm call to CheckLambdaProps', () => { definitionBody: defaults.CreateTestStateMachineDefinitionBody(stack, 'lamstp-test') }, lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -456,7 +456,7 @@ test('Test deployment a state machine that needs priveleges for tasks', () => { const stack = new Stack(); const clientFunction = defaults.deployLambdaFunction(stack, { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -465,7 +465,7 @@ test('Test deployment a state machine that needs priveleges for tasks', () => { }); const taskFunction = defaults.deployLambdaFunction(stack, { - runtime: lambda.Runtime.NODEJS_20_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda-task`), environment: { diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/lib/index.ts b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/lib/index.ts index 06a7c4a40..a7e48b934 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/lib/index.ts +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/lib/index.ts @@ -86,7 +86,7 @@ export interface OpenApiGatewayToLambdaProps { * { * id: 'MessagesHandler', * lambdaFunctionProps: { - * runtime: lambda.Runtime.NODEJS_16_X, + * runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, * handler: 'index.handler', * code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), * } @@ -94,7 +94,7 @@ export interface OpenApiGatewayToLambdaProps { * { * id: 'PhotosHandler', * existingLambdaObj: new lambda.Function(this, 'PhotosLambda', { - * runtime: lambda.Runtime.NODEJS_16_X, + * runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, * handler: 'index.handler', * code: lambda.Code.fromAsset(`${__dirname}/photos-lambda`), * }) diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/manifest.json index 52a744623..e37e079e3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/manifest.json @@ -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}/c0d1d3c0b8f3d3e5fdee225636d63bc58562fce625918a73b6e491b45b51b348.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cc472bbc9b3f388de29e5834aa43374fb2caf4fa98fdf07936cb76dc9f9697f2.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -226,34 +226,22 @@ "data": "OpenApiGatewayToLambdaLambdaRestApiAccount71EC7DA6" } ], - "/opilam-apiFromAssetExistingLambdaFunctions/BootstrapVersion": [ - { - "type": "aws:cdk:logicalId", - "data": "BootstrapVersion" - } - ], - "/opilam-apiFromAssetExistingLambdaFunctions/CheckBootstrapVersion": [ + "/opilam-apiFromAssetExistingLambdaFunctions/LatestNodeRuntimeMap": [ { "type": "aws:cdk:logicalId", - "data": "CheckBootstrapVersion" + "data": "LatestNodeRuntimeMap" } ], - "OpenApiGatewayToLambdaApiTemplateWriterLambdaRoleCBDA4014": [ + "/opilam-apiFromAssetExistingLambdaFunctions/BootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "OpenApiGatewayToLambdaApiTemplateWriterLambdaRoleCBDA4014", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "BootstrapVersion" } ], - "OpenApiGatewayToLambdaApiTemplateWriterLambdaRoleDefaultPolicy5136571F": [ + "/opilam-apiFromAssetExistingLambdaFunctions/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "OpenApiGatewayToLambdaApiTemplateWriterLambdaRoleDefaultPolicy5136571F", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "CheckBootstrapVersion" } ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/opilam-apiFromAssetExistingLambdaFunctions.assets.json b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/opilam-apiFromAssetExistingLambdaFunctions.assets.json index dc3b6d7a9..5287339fd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/opilam-apiFromAssetExistingLambdaFunctions.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/opilam-apiFromAssetExistingLambdaFunctions.assets.json @@ -79,7 +79,7 @@ } } }, - "c0d1d3c0b8f3d3e5fdee225636d63bc58562fce625918a73b6e491b45b51b348": { + "cc472bbc9b3f388de29e5834aa43374fb2caf4fa98fdf07936cb76dc9f9697f2": { "source": { "path": "opilam-apiFromAssetExistingLambdaFunctions.template.json", "packaging": "file" @@ -87,7 +87,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c0d1d3c0b8f3d3e5fdee225636d63bc58562fce625918a73b6e491b45b51b348.json", + "objectKey": "cc472bbc9b3f388de29e5834aa43374fb2caf4fa98fdf07936cb76dc9f9697f2.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/opilam-apiFromAssetExistingLambdaFunctions.template.json b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/opilam-apiFromAssetExistingLambdaFunctions.template.json index d26cb3f2b..7f6e3008b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/opilam-apiFromAssetExistingLambdaFunctions.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/opilam-apiFromAssetExistingLambdaFunctions.template.json @@ -99,6 +99,11 @@ }, "S3Key": "8ce85d10dcd7b8e6d43ffd909827afc76802ad40fcd7908886ff825cbe8e15df.zip" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "Role": { "Fn::GetAtt": [ @@ -106,7 +111,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -269,6 +274,11 @@ }, "S3Key": "654d49d4ea47a6be417d57b94dc0310933d0e971a3e48a3080c3e48487af3e50.zip" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "FunctionName": "PhotosLambdaTestFromAsset", "Handler": "index.handler", "Role": { @@ -277,7 +287,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -440,6 +450,11 @@ }, "S3Key": "b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7.zip" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "MemorySize": 1024, "Role": { @@ -448,7 +463,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Timeout": 60, "TracingConfig": { "Mode": "Active" @@ -633,7 +648,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Timeout": 900 }, "DependsOn": [ @@ -940,6 +963,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/tree.json index 462da7649..c408047f9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/ApiDefinitionAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -25,13 +25,13 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/ApiDefinitionAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -43,7 +43,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -142,19 +142,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -170,7 +170,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -178,13 +178,13 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -199,6 +199,11 @@ }, "s3Key": "8ce85d10dcd7b8e6d43ffd909827afc76802ad40fcd7908886ff825cbe8e15df.zip" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "role": { "Fn::GetAtt": [ @@ -206,7 +211,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -214,7 +219,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } }, "PermitAPIGInvocation": { @@ -259,13 +264,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } }, "PhotosLambdaTestFromAssetServiceRole": { @@ -277,7 +282,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/PhotosLambdaTestFromAssetServiceRole/ImportPhotosLambdaTestFromAssetServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -340,7 +345,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -376,19 +381,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "PhotosLambdaTestFromAsset": { @@ -404,7 +409,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/PhotosLambdaTestFromAsset/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -412,13 +417,13 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/PhotosLambdaTestFromAsset/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -433,6 +438,11 @@ }, "s3Key": "654d49d4ea47a6be417d57b94dc0310933d0e971a3e48a3080c3e48487af3e50.zip" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "functionName": "PhotosLambdaTestFromAsset", "handler": "index.handler", "role": { @@ -441,7 +451,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -449,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } }, "PermitAPIGInvocation": { @@ -494,13 +504,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } }, "OpenApiGatewayToLambda": { @@ -516,7 +526,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/OpenApiGatewayToLambda/ApiOutputAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -524,13 +534,13 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/OpenApiGatewayToLambda/ApiOutputAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -542,7 +552,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/OpenApiGatewayToLambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -605,7 +615,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -641,19 +651,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -669,7 +679,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/OpenApiGatewayToLambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -677,13 +687,13 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/OpenApiGatewayToLambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -698,6 +708,11 @@ }, "s3Key": "b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7.zip" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "memorySize": 1024, "role": { @@ -706,7 +721,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "timeout": 60, "tracingConfig": { "mode": "Active" @@ -715,13 +730,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiTemplateWriterPolicy": { @@ -789,13 +804,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiTemplateWriterProvider": { @@ -815,7 +830,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/OpenApiGatewayToLambda/ApiTemplateWriterProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -854,7 +869,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -908,19 +923,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "Code": { @@ -932,7 +947,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/OpenApiGatewayToLambda/ApiTemplateWriterProvider/framework-onEvent/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -940,13 +955,13 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/OpenApiGatewayToLambda/ApiTemplateWriterProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -979,25 +994,33 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "timeout": 900 } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.custom_resources.Provider", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiTemplateWriterCustomResource": { @@ -1009,13 +1032,13 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/OpenApiGatewayToLambda/ApiTemplateWriterCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiAccessLogGroup": { @@ -1031,13 +1054,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.138.0" + "version": "2.147.3" } }, "SpecRestApi": { @@ -1086,7 +1109,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.138.0" + "version": "2.147.3" } }, "Default": { @@ -1094,7 +1117,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/OpenApiGatewayToLambda/SpecRestApi/Default", "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.138.0" + "version": "2.147.3" } }, "Deployment": { @@ -1115,13 +1138,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.138.0" + "version": "2.147.3" } }, "DeploymentStage.prod": { @@ -1163,13 +1186,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.138.0" + "version": "2.147.3" } }, "Endpoint": { @@ -1177,7 +1200,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/OpenApiGatewayToLambda/SpecRestApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.138.0" + "version": "2.147.3" } }, "UsagePlan": { @@ -1205,19 +1228,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnUsagePlan", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.UsagePlan", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.SpecRestApi", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaRestApiCloudWatchRole": { @@ -1229,7 +1252,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/OpenApiGatewayToLambda/LambdaRestApiCloudWatchRole/ImportLambdaRestApiCloudWatchRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -1296,13 +1319,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaRestApiAccount": { @@ -1321,13 +1344,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAccount", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-openapigateway-lambda.OpenApiGatewayToLambda", - "version": "2.56.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "opilam-apiFromAssetExistingLambdaFunctions/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Integ": { @@ -1355,7 +1386,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.138.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1363,25 +1394,25 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.138.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.138.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1389,7 +1420,7 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.138.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1397,13 +1428,13 @@ "path": "opilam-apiFromAssetExistingLambdaFunctions/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.138.0" + "version": "2.147.3" } }, "Tree": { @@ -1417,7 +1448,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.138.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.ts b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.ts index 8026df8dc..cb9a1b5ca 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.ts +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetExistingLambdaFunctions.ts @@ -29,7 +29,7 @@ const apiDefinitionAsset = new Asset(stack, 'ApiDefinitionAsset', { const messagesLambda = defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), } @@ -38,7 +38,7 @@ const messagesLambda = defaults.buildLambdaFunction(stack, { const photosLambda = defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { functionName: 'PhotosLambdaTestFromAsset', - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/photos-lambda`), } diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/manifest.json index 96433f620..4f9b0e83f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/manifest.json @@ -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}/446711b828666a3bba5f7b61f0d600c522647885762402ff4023fc948e83833c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b2c940c9e01aafc78df6b0ddb8102def3ff0a14f316d80e3d76921915a8a6b12.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -226,34 +226,22 @@ "data": "OpenApiGatewayToLambdaLambdaRestApiAccount71EC7DA6" } ], - "/opilam-apiFromAssetNewLambdaFunctions/BootstrapVersion": [ - { - "type": "aws:cdk:logicalId", - "data": "BootstrapVersion" - } - ], - "/opilam-apiFromAssetNewLambdaFunctions/CheckBootstrapVersion": [ + "/opilam-apiFromAssetNewLambdaFunctions/LatestNodeRuntimeMap": [ { "type": "aws:cdk:logicalId", - "data": "CheckBootstrapVersion" + "data": "LatestNodeRuntimeMap" } ], - "OpenApiGatewayToLambdaApiTemplateWriterLambdaRoleCBDA4014": [ + "/opilam-apiFromAssetNewLambdaFunctions/BootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "OpenApiGatewayToLambdaApiTemplateWriterLambdaRoleCBDA4014", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "BootstrapVersion" } ], - "OpenApiGatewayToLambdaApiTemplateWriterLambdaRoleDefaultPolicy5136571F": [ + "/opilam-apiFromAssetNewLambdaFunctions/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "OpenApiGatewayToLambdaApiTemplateWriterLambdaRoleDefaultPolicy5136571F", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "CheckBootstrapVersion" } ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/opilam-apiFromAssetNewLambdaFunctions.assets.json b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/opilam-apiFromAssetNewLambdaFunctions.assets.json index ef056c80c..ad21ccee9 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/opilam-apiFromAssetNewLambdaFunctions.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/opilam-apiFromAssetNewLambdaFunctions.assets.json @@ -79,7 +79,7 @@ } } }, - "446711b828666a3bba5f7b61f0d600c522647885762402ff4023fc948e83833c": { + "b2c940c9e01aafc78df6b0ddb8102def3ff0a14f316d80e3d76921915a8a6b12": { "source": { "path": "opilam-apiFromAssetNewLambdaFunctions.template.json", "packaging": "file" @@ -87,7 +87,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "446711b828666a3bba5f7b61f0d600c522647885762402ff4023fc948e83833c.json", + "objectKey": "b2c940c9e01aafc78df6b0ddb8102def3ff0a14f316d80e3d76921915a8a6b12.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/opilam-apiFromAssetNewLambdaFunctions.template.json b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/opilam-apiFromAssetNewLambdaFunctions.template.json index fec4da0c2..e0a3f5407 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/opilam-apiFromAssetNewLambdaFunctions.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/opilam-apiFromAssetNewLambdaFunctions.template.json @@ -99,6 +99,11 @@ }, "S3Key": "8ce85d10dcd7b8e6d43ffd909827afc76802ad40fcd7908886ff825cbe8e15df.zip" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "Role": { "Fn::GetAtt": [ @@ -106,7 +111,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -269,6 +274,11 @@ }, "S3Key": "654d49d4ea47a6be417d57b94dc0310933d0e971a3e48a3080c3e48487af3e50.zip" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "Role": { "Fn::GetAtt": [ @@ -276,7 +286,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -439,6 +449,11 @@ }, "S3Key": "b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7.zip" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "MemorySize": 1024, "Role": { @@ -447,7 +462,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Timeout": 60, "TracingConfig": { "Mode": "Active" @@ -632,7 +647,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Timeout": 900 }, "DependsOn": [ @@ -939,6 +962,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/tree.json index 1af193c11..cfc02d7bb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/ApiDefinitionAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -25,13 +25,13 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/ApiDefinitionAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "OpenApiGatewayToLambda": { @@ -47,7 +47,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/MessagesHandlerApiFunction0ServiceRole/ImportMessagesHandlerApiFunction0ServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -110,7 +110,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -146,19 +146,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "MessagesHandlerApiFunction0": { @@ -174,7 +174,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/MessagesHandlerApiFunction0/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -182,13 +182,13 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/MessagesHandlerApiFunction0/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -203,6 +203,11 @@ }, "s3Key": "8ce85d10dcd7b8e6d43ffd909827afc76802ad40fcd7908886ff825cbe8e15df.zip" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "role": { "Fn::GetAtt": [ @@ -210,7 +215,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -218,7 +223,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } }, "PermitAPIGInvocation": { @@ -263,13 +268,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } }, "PhotosHandlerApiFunction1ServiceRole": { @@ -281,7 +286,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/PhotosHandlerApiFunction1ServiceRole/ImportPhotosHandlerApiFunction1ServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -344,7 +349,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -380,19 +385,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "PhotosHandlerApiFunction1": { @@ -408,7 +413,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/PhotosHandlerApiFunction1/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -416,13 +421,13 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/PhotosHandlerApiFunction1/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -437,6 +442,11 @@ }, "s3Key": "654d49d4ea47a6be417d57b94dc0310933d0e971a3e48a3080c3e48487af3e50.zip" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "role": { "Fn::GetAtt": [ @@ -444,7 +454,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -452,7 +462,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } }, "PermitAPIGInvocation": { @@ -497,13 +507,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiOutputAsset": { @@ -515,7 +525,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/ApiOutputAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -523,13 +533,13 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/ApiOutputAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -541,7 +551,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -604,7 +614,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -640,19 +650,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -668,7 +678,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -676,13 +686,13 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -697,6 +707,11 @@ }, "s3Key": "b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7.zip" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "memorySize": 1024, "role": { @@ -705,7 +720,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "timeout": 60, "tracingConfig": { "mode": "Active" @@ -714,13 +729,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiTemplateWriterPolicy": { @@ -788,13 +803,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiTemplateWriterProvider": { @@ -814,7 +829,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/ApiTemplateWriterProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -853,7 +868,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -907,19 +922,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "Code": { @@ -931,7 +946,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/ApiTemplateWriterProvider/framework-onEvent/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -939,13 +954,13 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/ApiTemplateWriterProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -978,25 +993,33 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "timeout": 900 } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.custom_resources.Provider", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiTemplateWriterCustomResource": { @@ -1008,13 +1031,13 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/ApiTemplateWriterCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiAccessLogGroup": { @@ -1030,13 +1053,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.138.0" + "version": "2.147.3" } }, "SpecRestApi": { @@ -1085,7 +1108,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.138.0" + "version": "2.147.3" } }, "Default": { @@ -1093,7 +1116,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/SpecRestApi/Default", "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.138.0" + "version": "2.147.3" } }, "Deployment": { @@ -1114,13 +1137,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.138.0" + "version": "2.147.3" } }, "DeploymentStage.prod": { @@ -1162,13 +1185,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.138.0" + "version": "2.147.3" } }, "Endpoint": { @@ -1176,7 +1199,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/SpecRestApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.138.0" + "version": "2.147.3" } }, "UsagePlan": { @@ -1204,19 +1227,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnUsagePlan", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.UsagePlan", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.SpecRestApi", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaRestApiCloudWatchRole": { @@ -1228,7 +1251,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/OpenApiGatewayToLambda/LambdaRestApiCloudWatchRole/ImportLambdaRestApiCloudWatchRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -1295,13 +1318,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaRestApiAccount": { @@ -1320,13 +1343,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAccount", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-openapigateway-lambda.OpenApiGatewayToLambda", - "version": "2.56.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "opilam-apiFromAssetNewLambdaFunctions/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Integ": { @@ -1354,7 +1385,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.138.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1362,25 +1393,25 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.138.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.138.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1388,7 +1419,7 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.138.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1396,13 +1427,13 @@ "path": "opilam-apiFromAssetNewLambdaFunctions/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.138.0" + "version": "2.147.3" } }, "Tree": { @@ -1416,7 +1447,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.138.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.ts b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.ts index 9efadf7b8..2e55091b5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.ts +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetNewLambdaFunctions.ts @@ -33,7 +33,7 @@ new OpenApiGatewayToLambda(stack, 'OpenApiGatewayToLambda', { { id: 'MessagesHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), } @@ -41,7 +41,7 @@ new OpenApiGatewayToLambda(stack, 'OpenApiGatewayToLambda', { { id: 'PhotosHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/photos-lambda`), } diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/manifest.json index f4cd22b85..66eafb312 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/manifest.json @@ -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}/502a5977676cce02e8641f8e8803c6407be000d04a9fd8256d43993f3e073035.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/853470d1f0bc850f4dc49b30dde72ad23ca69dfaf079be46d6cf4c36d29094f1.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -226,34 +226,22 @@ "data": "OpenApiGatewayToLambdaLambdaRestApiAccount71EC7DA6" } ], - "/opilam-apiFromAssetWithCognitoAuth/BootstrapVersion": [ - { - "type": "aws:cdk:logicalId", - "data": "BootstrapVersion" - } - ], - "/opilam-apiFromAssetWithCognitoAuth/CheckBootstrapVersion": [ + "/opilam-apiFromAssetWithCognitoAuth/LatestNodeRuntimeMap": [ { "type": "aws:cdk:logicalId", - "data": "CheckBootstrapVersion" + "data": "LatestNodeRuntimeMap" } ], - "OpenApiGatewayToLambdaApiTemplateWriterLambdaRoleCBDA4014": [ + "/opilam-apiFromAssetWithCognitoAuth/BootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "OpenApiGatewayToLambdaApiTemplateWriterLambdaRoleCBDA4014", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "BootstrapVersion" } ], - "OpenApiGatewayToLambdaApiTemplateWriterLambdaRoleDefaultPolicy5136571F": [ + "/opilam-apiFromAssetWithCognitoAuth/CheckBootstrapVersion": [ { "type": "aws:cdk:logicalId", - "data": "OpenApiGatewayToLambdaApiTemplateWriterLambdaRoleDefaultPolicy5136571F", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "CheckBootstrapVersion" } ] }, diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/opilam-apiFromAssetWithCognitoAuth.assets.json b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/opilam-apiFromAssetWithCognitoAuth.assets.json index 27c69b4aa..7d113db3f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/opilam-apiFromAssetWithCognitoAuth.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/opilam-apiFromAssetWithCognitoAuth.assets.json @@ -79,7 +79,7 @@ } } }, - "502a5977676cce02e8641f8e8803c6407be000d04a9fd8256d43993f3e073035": { + "853470d1f0bc850f4dc49b30dde72ad23ca69dfaf079be46d6cf4c36d29094f1": { "source": { "path": "opilam-apiFromAssetWithCognitoAuth.template.json", "packaging": "file" @@ -87,7 +87,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "502a5977676cce02e8641f8e8803c6407be000d04a9fd8256d43993f3e073035.json", + "objectKey": "853470d1f0bc850f4dc49b30dde72ad23ca69dfaf079be46d6cf4c36d29094f1.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/opilam-apiFromAssetWithCognitoAuth.template.json b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/opilam-apiFromAssetWithCognitoAuth.template.json index 70ada7287..1bdab4fc8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/opilam-apiFromAssetWithCognitoAuth.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/opilam-apiFromAssetWithCognitoAuth.template.json @@ -99,6 +99,11 @@ }, "S3Key": "8ce85d10dcd7b8e6d43ffd909827afc76802ad40fcd7908886ff825cbe8e15df.zip" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "Role": { "Fn::GetAtt": [ @@ -106,7 +111,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -269,6 +274,11 @@ }, "S3Key": "654d49d4ea47a6be417d57b94dc0310933d0e971a3e48a3080c3e48487af3e50.zip" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "Role": { "Fn::GetAtt": [ @@ -276,7 +286,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -439,6 +449,11 @@ }, "S3Key": "b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7.zip" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "MemorySize": 1024, "Role": { @@ -447,7 +462,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Timeout": 60, "TracingConfig": { "Mode": "Active" @@ -632,7 +647,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Timeout": 900 }, "DependsOn": [ @@ -939,6 +962,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/tree.json index 6b53f03c6..931491cd6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/ApiDefinitionAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -25,13 +25,13 @@ "path": "opilam-apiFromAssetWithCognitoAuth/ApiDefinitionAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "OpenApiGatewayToLambda": { @@ -47,7 +47,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/MessagesHandlerApiFunction0ServiceRole/ImportMessagesHandlerApiFunction0ServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -110,7 +110,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -146,19 +146,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "MessagesHandlerApiFunction0": { @@ -174,7 +174,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/MessagesHandlerApiFunction0/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -182,13 +182,13 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/MessagesHandlerApiFunction0/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -203,6 +203,11 @@ }, "s3Key": "8ce85d10dcd7b8e6d43ffd909827afc76802ad40fcd7908886ff825cbe8e15df.zip" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "role": { "Fn::GetAtt": [ @@ -210,7 +215,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -218,7 +223,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } }, "PermitAPIGInvocation": { @@ -263,13 +268,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } }, "PhotosHandlerApiFunction1ServiceRole": { @@ -281,7 +286,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/PhotosHandlerApiFunction1ServiceRole/ImportPhotosHandlerApiFunction1ServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -344,7 +349,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -380,19 +385,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "PhotosHandlerApiFunction1": { @@ -408,7 +413,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/PhotosHandlerApiFunction1/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -416,13 +421,13 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/PhotosHandlerApiFunction1/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -437,6 +442,11 @@ }, "s3Key": "654d49d4ea47a6be417d57b94dc0310933d0e971a3e48a3080c3e48487af3e50.zip" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "role": { "Fn::GetAtt": [ @@ -444,7 +454,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -452,7 +462,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } }, "PermitAPIGInvocation": { @@ -497,13 +507,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiOutputAsset": { @@ -515,7 +525,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/ApiOutputAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -523,13 +533,13 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/ApiOutputAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -541,7 +551,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -604,7 +614,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -640,19 +650,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -668,7 +678,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -676,13 +686,13 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -697,6 +707,11 @@ }, "s3Key": "b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7.zip" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "memorySize": 1024, "role": { @@ -705,7 +720,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "timeout": 60, "tracingConfig": { "mode": "Active" @@ -714,13 +729,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiTemplateWriterPolicy": { @@ -788,13 +803,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiTemplateWriterProvider": { @@ -814,7 +829,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/ApiTemplateWriterProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -853,7 +868,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -907,19 +922,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "Code": { @@ -931,7 +946,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/ApiTemplateWriterProvider/framework-onEvent/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -939,13 +954,13 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/ApiTemplateWriterProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -978,25 +993,33 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "timeout": 900 } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.custom_resources.Provider", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiTemplateWriterCustomResource": { @@ -1008,13 +1031,13 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/ApiTemplateWriterCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.138.0" + "version": "2.147.3" } }, "ApiAccessLogGroup": { @@ -1030,13 +1053,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.138.0" + "version": "2.147.3" } }, "SpecRestApi": { @@ -1085,7 +1108,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.138.0" + "version": "2.147.3" } }, "Default": { @@ -1093,7 +1116,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/SpecRestApi/Default", "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.138.0" + "version": "2.147.3" } }, "Deployment": { @@ -1114,13 +1137,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.138.0" + "version": "2.147.3" } }, "DeploymentStage.prod": { @@ -1162,13 +1185,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.138.0" + "version": "2.147.3" } }, "Endpoint": { @@ -1176,7 +1199,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/SpecRestApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.138.0" + "version": "2.147.3" } }, "UsagePlan": { @@ -1204,19 +1227,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnUsagePlan", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.UsagePlan", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.SpecRestApi", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaRestApiCloudWatchRole": { @@ -1228,7 +1251,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/OpenApiGatewayToLambda/LambdaRestApiCloudWatchRole/ImportLambdaRestApiCloudWatchRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -1295,13 +1318,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaRestApiAccount": { @@ -1320,13 +1343,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAccount", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-openapigateway-lambda.OpenApiGatewayToLambda", - "version": "2.56.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "opilam-apiFromAssetWithCognitoAuth/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Integ": { @@ -1354,7 +1385,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.138.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1362,25 +1393,25 @@ "path": "opilam-apiFromAssetWithCognitoAuth/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.138.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.138.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1388,7 +1419,7 @@ "path": "opilam-apiFromAssetWithCognitoAuth/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.138.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1396,13 +1427,13 @@ "path": "opilam-apiFromAssetWithCognitoAuth/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.138.0" + "version": "2.147.3" } }, "Tree": { @@ -1416,7 +1447,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.138.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.ts b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.ts index 2807149f8..27b2d39a0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.ts +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/integ.opilam-apiFromAssetWithCognitoAuth.ts @@ -33,7 +33,7 @@ new OpenApiGatewayToLambda(stack, 'OpenApiGatewayToLambda', { { id: 'MessagesHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), } @@ -41,7 +41,7 @@ new OpenApiGatewayToLambda(stack, 'OpenApiGatewayToLambda', { { id: 'PhotosHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/photos-lambda`), } diff --git a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/test.openapigateway-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/test.openapigateway-lambda.test.ts index 91b3f3f9a..4c146de15 100644 --- a/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/test.openapigateway-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test/test.openapigateway-lambda.test.ts @@ -20,6 +20,7 @@ import { Asset } from "aws-cdk-lib/aws-s3-assets"; import * as path from 'path'; import { Template } from "aws-cdk-lib/assertions"; import { CreateScrapBucket } from "@aws-solutions-constructs/core"; +import * as defaults from '@aws-solutions-constructs/core'; test('Simple deployment works', () => { const stack = new Stack(); @@ -34,7 +35,7 @@ test('Simple deployment works', () => { { id: 'MessagesHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), } @@ -63,7 +64,7 @@ test('API Definition can be specified from Asset', () => { { id: 'MessagesHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), } @@ -88,7 +89,7 @@ test('API Definition can be specified from S3 Bucket and Key', () => { { id: 'MessagesHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), } @@ -116,7 +117,7 @@ test('Throws error when both api definition asset and s3 object are specified', { id: 'MessagesHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), } @@ -140,14 +141,14 @@ test('Multiple Lambda Functions can be specified', () => { { id: 'MessagesHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), } }, { id: 'PhotosHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/photos-lambda`), } @@ -167,7 +168,7 @@ test('Existing lambda function can be specified', () => { }); const existingLambdaObj = new lambda.Function(stack, 'ExistingLambda', { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', functionName: 'ExistingLambdaFunction', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), @@ -182,7 +183,7 @@ test('Existing lambda function can be specified', () => { }, { id: 'PhotosHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', functionName: 'NewLambdaFunction', code: lambda.Code.fromAsset(`${__dirname}/photos-lambda`), @@ -232,7 +233,7 @@ test('Throws error when no api definition is specified', () => { { id: 'MessagesHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), } @@ -333,7 +334,7 @@ test('Two Constructs create APIs with different names', () => { { id: 'MessagesHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), } @@ -351,7 +352,7 @@ test('Two Constructs create APIs with different names', () => { { id: 'MessagesHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), } @@ -423,7 +424,7 @@ test('Confirm API definition uri is added to function name', () => { { id: 'MessagesHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), } @@ -442,7 +443,7 @@ test('Confirm API definition uri is added to function name', () => { test('Confirm that providing both lambdaFunction and functionProps is an error', () => { const stack = new Stack(); const existingLambdaObj = new lambda.Function(stack, 'ExistingLambda', { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', functionName: 'ExistingLambdaFunction', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), @@ -458,7 +459,7 @@ test('Confirm that providing both lambdaFunction and functionProps is an error' { id: 'MessagesHandler', lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/manifest.json index f673bab5e..2a2b2b588 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/85f1438ea42207b33b2d0153bfe57c4ae31cbf4cc2a5299fd378bdac9b511fc5.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/4ac87926f003d01c8b4db8faff5ba066632afdc11b9db89a1cc01097cd651745.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/r53alb-deployPrivateApi.assets.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/r53alb-deployPrivateApi.assets.json index d1faa7422..cc28c7c44 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/r53alb-deployPrivateApi.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/r53alb-deployPrivateApi.assets.json @@ -1,35 +1,35 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "85f1438ea42207b33b2d0153bfe57c4ae31cbf4cc2a5299fd378bdac9b511fc5": { + "4ac87926f003d01c8b4db8faff5ba066632afdc11b9db89a1cc01097cd651745": { "source": { "path": "r53alb-deployPrivateApi.template.json", "packaging": "file" @@ -37,7 +37,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "85f1438ea42207b33b2d0153bfe57c4ae31cbf4cc2a5299fd378bdac9b511fc5.json", + "objectKey": "4ac87926f003d01c8b4db8faff5ba066632afdc11b9db89a1cc01097cd651745.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/r53alb-deployPrivateApi.template.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/r53alb-deployPrivateApi.template.json index 45357f71c..947b59b90 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/r53alb-deployPrivateApi.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/r53alb-deployPrivateApi.template.json @@ -667,7 +667,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -678,7 +678,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -732,7 +732,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -743,7 +743,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/tree.json index 1b5a25d78..022a78c6e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApi.js.snapshot/tree.json @@ -35,13 +35,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.CfnHostedZone", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.PrivateHostedZone", - "version": "2.118.0" + "version": "2.147.3" } }, "private-api-stack-alb": { @@ -96,7 +96,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -126,19 +126,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "private-api-stack": { @@ -179,7 +179,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -345,13 +345,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -363,19 +363,19 @@ "path": "r53alb-deployPrivateApi/private-api-stack/private-api-stack/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "private-api-stack-alias": { @@ -419,19 +419,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.ARecord", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-route53-alb.Route53ToAlb", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -458,7 +458,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -502,7 +502,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -510,7 +510,7 @@ "path": "r53alb-deployPrivateApi/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -532,7 +532,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -551,13 +551,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -601,7 +601,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -609,7 +609,7 @@ "path": "r53alb-deployPrivateApi/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -631,7 +631,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -650,13 +650,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -668,13 +668,13 @@ "path": "r53alb-deployPrivateApi/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -690,7 +690,7 @@ "path": "r53alb-deployPrivateApi/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -721,7 +721,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -773,19 +773,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -809,13 +809,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -849,19 +849,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -873,7 +873,7 @@ "path": "r53alb-deployPrivateApi/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -881,7 +881,7 @@ "path": "r53alb-deployPrivateApi/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -889,13 +889,13 @@ "path": "r53alb-deployPrivateApi/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -907,7 +907,7 @@ "path": "r53alb-deployPrivateApi/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -915,7 +915,7 @@ "path": "r53alb-deployPrivateApi/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -923,13 +923,13 @@ "path": "r53alb-deployPrivateApi/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -957,7 +957,7 @@ "path": "r53alb-deployPrivateApi/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -965,25 +965,25 @@ "path": "r53alb-deployPrivateApi/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -991,7 +991,7 @@ "path": "r53alb-deployPrivateApi/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -999,13 +999,13 @@ "path": "r53alb-deployPrivateApi/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1019,7 +1019,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/manifest.json index 513b58efe..e2d5a840a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/32273cda09611f0413712e17e3ba58b3e96efbdf5da5d5835d9e3d2b22cec759.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/03df0525fb14f8056ca13fb2d0f5ba091c7a2bc037318cfe01afe16490546104.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/r53alb-deployPrivateApiExistingZone.assets.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/r53alb-deployPrivateApiExistingZone.assets.json index 244f1ec70..101bc213b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/r53alb-deployPrivateApiExistingZone.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/r53alb-deployPrivateApiExistingZone.assets.json @@ -1,35 +1,35 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "32273cda09611f0413712e17e3ba58b3e96efbdf5da5d5835d9e3d2b22cec759": { + "03df0525fb14f8056ca13fb2d0f5ba091c7a2bc037318cfe01afe16490546104": { "source": { "path": "r53alb-deployPrivateApiExistingZone.template.json", "packaging": "file" @@ -37,7 +37,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "32273cda09611f0413712e17e3ba58b3e96efbdf5da5d5835d9e3d2b22cec759.json", + "objectKey": "03df0525fb14f8056ca13fb2d0f5ba091c7a2bc037318cfe01afe16490546104.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/r53alb-deployPrivateApiExistingZone.template.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/r53alb-deployPrivateApiExistingZone.template.json index cd16e4261..116fd5418 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/r53alb-deployPrivateApiExistingZone.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/r53alb-deployPrivateApiExistingZone.template.json @@ -615,7 +615,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -626,7 +626,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1014,7 +1014,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1025,7 +1025,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/tree.json index 257edc38b..a60d7ae87 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPrivateApiExistingZone.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "r53alb-deployPrivateApiExistingZone/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "r53alb-deployPrivateApiExistingZone/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "r53alb-deployPrivateApiExistingZone/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "r53alb-deployPrivateApiExistingZone/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "r53alb-deployPrivateApiExistingZone/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "r53alb-deployPrivateApiExistingZone/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,19 +835,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -859,7 +859,7 @@ "path": "r53alb-deployPrivateApiExistingZone/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -867,7 +867,7 @@ "path": "r53alb-deployPrivateApiExistingZone/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -875,13 +875,13 @@ "path": "r53alb-deployPrivateApiExistingZone/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "new-zone": { @@ -907,13 +907,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.CfnHostedZone", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.PrivateHostedZone", - "version": "2.118.0" + "version": "2.147.3" } }, "existing-zone-stack": { @@ -972,7 +972,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -1002,19 +1002,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "existing-zone-stack": { @@ -1055,7 +1055,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -1221,13 +1221,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -1239,19 +1239,19 @@ "path": "r53alb-deployPrivateApiExistingZone/existing-zone-stack/existing-zone-stack/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "existing-zone-stack-alias": { @@ -1295,19 +1295,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.ARecord", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-route53-alb.Route53ToAlb", - "version": "2.51.0" + "version": "2.60.0" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1319,7 +1319,7 @@ "path": "r53alb-deployPrivateApiExistingZone/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1327,7 +1327,7 @@ "path": "r53alb-deployPrivateApiExistingZone/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1335,13 +1335,13 @@ "path": "r53alb-deployPrivateApiExistingZone/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1369,7 +1369,7 @@ "path": "r53alb-deployPrivateApiExistingZone/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1377,25 +1377,25 @@ "path": "r53alb-deployPrivateApiExistingZone/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1403,7 +1403,7 @@ "path": "r53alb-deployPrivateApiExistingZone/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1411,13 +1411,13 @@ "path": "r53alb-deployPrivateApiExistingZone/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1431,7 +1431,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/manifest.json index 3d1c49230..22f6f46a8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/39b4af25be5b535e399bce52612896f8ded5872ee506e7d4961256613a4bc823.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/770b34d9255dfe9ccff3a88e403e5cbe738a94424457eceb24e69c291139a51c.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/r53alb-deployPublicApiExistingAlb.assets.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/r53alb-deployPublicApiExistingAlb.assets.json index e32965d55..960d6bb22 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/r53alb-deployPublicApiExistingAlb.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/r53alb-deployPublicApiExistingAlb.assets.json @@ -1,21 +1,21 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "39b4af25be5b535e399bce52612896f8ded5872ee506e7d4961256613a4bc823": { + "770b34d9255dfe9ccff3a88e403e5cbe738a94424457eceb24e69c291139a51c": { "source": { "path": "r53alb-deployPublicApiExistingAlb.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "39b4af25be5b535e399bce52612896f8ded5872ee506e7d4961256613a4bc823.json", + "objectKey": "770b34d9255dfe9ccff3a88e403e5cbe738a94424457eceb24e69c291139a51c.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/r53alb-deployPublicApiExistingAlb.template.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/r53alb-deployPublicApiExistingAlb.template.json index d51b8558a..29440648a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/r53alb-deployPublicApiExistingAlb.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/r53alb-deployPublicApiExistingAlb.template.json @@ -615,7 +615,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -626,7 +626,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/tree.json index 8f8dba48e..7a640cc55 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiExistingAlb.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "r53alb-deployPublicApiExistingAlb/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "r53alb-deployPublicApiExistingAlb/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "r53alb-deployPublicApiExistingAlb/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "r53alb-deployPublicApiExistingAlb/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "r53alb-deployPublicApiExistingAlb/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "r53alb-deployPublicApiExistingAlb/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,19 +835,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -859,7 +859,7 @@ "path": "r53alb-deployPublicApiExistingAlb/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -867,7 +867,7 @@ "path": "r53alb-deployPublicApiExistingAlb/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -875,13 +875,13 @@ "path": "r53alb-deployPublicApiExistingAlb/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "new-zone": { @@ -899,13 +899,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.CfnHostedZone", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.PublicHostedZone", - "version": "2.118.0" + "version": "2.147.3" } }, "test-alb": { @@ -946,7 +946,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -976,19 +976,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "public-api-stack": { @@ -1036,19 +1036,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.ARecord", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-route53-alb.Route53ToAlb", - "version": "2.51.0" + "version": "2.60.0" } }, "Integ": { @@ -1076,7 +1076,7 @@ "path": "r53alb-deployPublicApiExistingAlb/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1084,25 +1084,25 @@ "path": "r53alb-deployPublicApiExistingAlb/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1110,7 +1110,7 @@ "path": "r53alb-deployPublicApiExistingAlb/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1118,13 +1118,13 @@ "path": "r53alb-deployPublicApiExistingAlb/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1138,7 +1138,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js deleted file mode 100644 index ac2119e05..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e),U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_}),module.exports=k(U);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/manifest.json index 25a580bd5..d9ca1b0b3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/631f2c0aa7db16035d342ebd71a20599e6782de3a53ca6641415f61c2f70294b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/32b75495baad63eab9e3738e2e7745659e17afbb4b166f547195e592eb6559be.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/r53alb-deployPublicApiNewAlb.assets.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/r53alb-deployPublicApiNewAlb.assets.json index 24f92e0c5..3384e0732 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/r53alb-deployPublicApiNewAlb.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/r53alb-deployPublicApiNewAlb.assets.json @@ -1,35 +1,35 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "631f2c0aa7db16035d342ebd71a20599e6782de3a53ca6641415f61c2f70294b": { + "32b75495baad63eab9e3738e2e7745659e17afbb4b166f547195e592eb6559be": { "source": { "path": "r53alb-deployPublicApiNewAlb.template.json", "packaging": "file" @@ -37,7 +37,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "631f2c0aa7db16035d342ebd71a20599e6782de3a53ca6641415f61c2f70294b.json", + "objectKey": "32b75495baad63eab9e3738e2e7745659e17afbb4b166f547195e592eb6559be.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/r53alb-deployPublicApiNewAlb.template.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/r53alb-deployPublicApiNewAlb.template.json index bde4b6ba2..a9c6d9947 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/r53alb-deployPublicApiNewAlb.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/r53alb-deployPublicApiNewAlb.template.json @@ -945,7 +945,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -956,7 +956,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -1010,7 +1010,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "b7f33614a69548d6bafe224d751a7ef238cde19097415e553fe8b63a4c8fd8a6.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -1021,7 +1021,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": { "Fn::Join": [ "", diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/tree.json index 58a9dde4e..df74d9b9b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/tree.json @@ -23,13 +23,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.CfnHostedZone", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.PublicHostedZone", - "version": "2.118.0" + "version": "2.147.3" } }, "new-alb-stack": { @@ -88,7 +88,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -118,19 +118,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "new-alb-stack": { @@ -171,7 +171,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.118.0" + "version": "2.147.3" } }, "Policy": { @@ -337,13 +337,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.118.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -355,19 +355,19 @@ "path": "r53alb-deployPublicApiNewAlb/new-alb-stack/new-alb-stack/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.118.0" + "version": "2.147.3" } }, "new-alb-stack-alias": { @@ -411,19 +411,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.ARecord", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-route53-alb.Route53ToAlb", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -450,7 +450,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -494,7 +494,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -502,7 +502,7 @@ "path": "r53alb-deployPublicApiNewAlb/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -524,7 +524,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -543,7 +543,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -563,7 +563,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -583,7 +583,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -611,13 +611,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -661,7 +661,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -669,7 +669,7 @@ "path": "r53alb-deployPublicApiNewAlb/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -691,7 +691,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -710,7 +710,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -730,7 +730,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -750,7 +750,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -778,13 +778,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -828,7 +828,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -836,7 +836,7 @@ "path": "r53alb-deployPublicApiNewAlb/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -858,7 +858,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -877,7 +877,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -897,13 +897,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -947,7 +947,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -955,7 +955,7 @@ "path": "r53alb-deployPublicApiNewAlb/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -977,7 +977,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -996,7 +996,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -1016,13 +1016,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -1041,7 +1041,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -1060,7 +1060,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -1072,13 +1072,13 @@ "path": "r53alb-deployPublicApiNewAlb/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1094,7 +1094,7 @@ "path": "r53alb-deployPublicApiNewAlb/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -1125,7 +1125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1177,19 +1177,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -1213,13 +1213,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -1253,19 +1253,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -1277,7 +1277,7 @@ "path": "r53alb-deployPublicApiNewAlb/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1285,7 +1285,7 @@ "path": "r53alb-deployPublicApiNewAlb/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1293,13 +1293,13 @@ "path": "r53alb-deployPublicApiNewAlb/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1311,7 +1311,7 @@ "path": "r53alb-deployPublicApiNewAlb/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -1319,7 +1319,7 @@ "path": "r53alb-deployPublicApiNewAlb/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -1327,13 +1327,13 @@ "path": "r53alb-deployPublicApiNewAlb/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1361,7 +1361,7 @@ "path": "r53alb-deployPublicApiNewAlb/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1369,25 +1369,25 @@ "path": "r53alb-deployPublicApiNewAlb/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1395,7 +1395,7 @@ "path": "r53alb-deployPublicApiNewAlb/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1403,13 +1403,13 @@ "path": "r53alb-deployPublicApiNewAlb/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1423,7 +1423,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/manifest.json index 29b073e5b..cce4c22f2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/manifest.json @@ -66,7 +66,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-us-east-1", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/ab7ca7df76ed140d47b3e422042169e95d14ea936c89f3b8cf98fe48695c3dac.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1/66ffe0a03d01d82e15fe7755e27cc2ee47446b40e9dc06750665f174239fafa1.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/r53alb-deployWithoutLogging.assets.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/r53alb-deployWithoutLogging.assets.json index b3e358041..a6ab6b44e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/r53alb-deployWithoutLogging.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/r53alb-deployWithoutLogging.assets.json @@ -1,21 +1,21 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } } }, - "ab7ca7df76ed140d47b3e422042169e95d14ea936c89f3b8cf98fe48695c3dac": { + "66ffe0a03d01d82e15fe7755e27cc2ee47446b40e9dc06750665f174239fafa1": { "source": { "path": "r53alb-deployWithoutLogging.template.json", "packaging": "file" @@ -23,7 +23,7 @@ "destinations": { "current_account-us-east-1": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1", - "objectKey": "ab7ca7df76ed140d47b3e422042169e95d14ea936c89f3b8cf98fe48695c3dac.json", + "objectKey": "66ffe0a03d01d82e15fe7755e27cc2ee47446b40e9dc06750665f174239fafa1.json", "region": "us-east-1", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-us-east-1" } diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/r53alb-deployWithoutLogging.template.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/r53alb-deployWithoutLogging.template.json index 79421dfb5..6f844d1b6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/r53alb-deployWithoutLogging.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/r53alb-deployWithoutLogging.template.json @@ -446,7 +446,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-us-east-1" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -457,7 +457,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/tree.json index 921e65aff..ff7341712 100644 --- a/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployWithoutLogging.js.snapshot/tree.json @@ -35,13 +35,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.CfnHostedZone", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.PrivateHostedZone", - "version": "2.118.0" + "version": "2.147.3" } }, "no-logging-stack-alb": { @@ -82,7 +82,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -112,19 +112,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "no-logging-stack-alias": { @@ -168,19 +168,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.CfnRecordSet", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_route53.ARecord", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-route53-alb.Route53ToAlb", - "version": "2.51.0" + "version": "2.60.0" } }, "Vpc": { @@ -207,7 +207,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet1": { @@ -251,7 +251,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -259,7 +259,7 @@ "path": "r53alb-deployWithoutLogging/Vpc/isolatedSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -281,7 +281,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -300,13 +300,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "isolatedSubnet2": { @@ -350,7 +350,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -358,7 +358,7 @@ "path": "r53alb-deployWithoutLogging/Vpc/isolatedSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -380,7 +380,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -399,13 +399,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -417,13 +417,13 @@ "path": "r53alb-deployWithoutLogging/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -439,7 +439,7 @@ "path": "r53alb-deployWithoutLogging/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -470,7 +470,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -522,19 +522,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -558,13 +558,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -598,19 +598,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -622,7 +622,7 @@ "path": "r53alb-deployWithoutLogging/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -630,7 +630,7 @@ "path": "r53alb-deployWithoutLogging/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -638,13 +638,13 @@ "path": "r53alb-deployWithoutLogging/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -672,7 +672,7 @@ "path": "r53alb-deployWithoutLogging/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -680,25 +680,25 @@ "path": "r53alb-deployWithoutLogging/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -706,7 +706,7 @@ "path": "r53alb-deployWithoutLogging/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -714,13 +714,13 @@ "path": "r53alb-deployWithoutLogging/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -734,7 +734,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/manifest.json index 473e90015..ea93f5a32 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/manifest.json @@ -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}/fb7675e02d6cfb23a1daf446a04078d8502605bd4ad5fd7fbabed9a3a1ae6ae6.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a804c92551249dff383c09d01f1276c6ad949158309f32089e045173fa74d4d0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/s3lam-existing-s3-bucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3lam-existing-s3-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/s3lam-existing-s3-bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/s3lam-existing-s3-bucket.assets.json index 0b0aeee8a..d8e3c7ef5 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/s3lam-existing-s3-bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/s3lam-existing-s3-bucket.assets.json @@ -1,15 +1,15 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } @@ -27,7 +27,7 @@ } } }, - "fb7675e02d6cfb23a1daf446a04078d8502605bd4ad5fd7fbabed9a3a1ae6ae6": { + "a804c92551249dff383c09d01f1276c6ad949158309f32089e045173fa74d4d0": { "source": { "path": "s3lam-existing-s3-bucket.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "fb7675e02d6cfb23a1daf446a04078d8502605bd4ad5fd7fbabed9a3a1ae6ae6.json", + "objectKey": "a804c92551249dff383c09d01f1276c6ad949158309f32089e045173fa74d4d0.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/s3lam-existing-s3-bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/s3lam-existing-s3-bucket.template.json index 25957f84d..5270d5bc1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/s3lam-existing-s3-bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/s3lam-existing-s3-bucket.template.json @@ -205,7 +205,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -216,7 +216,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -553,7 +561,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -684,6 +692,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/tree.json index f9fa261d1..966445601 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "s3lam-existing-s3-bucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3lam-existing-s3-bucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "s3lam-existing-s3-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "s3lam-existing-s3-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "s3lam-existing-s3-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -376,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -394,13 +402,13 @@ "path": "s3lam-existing-s3-bucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -412,7 +420,7 @@ "path": "s3lam-existing-s3-bucket/scrapBucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -448,13 +456,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-lambda": { @@ -470,7 +478,7 @@ "path": "s3lam-existing-s3-bucket/test-s3-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -533,7 +541,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -569,19 +577,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -597,7 +605,7 @@ "path": "s3lam-existing-s3-bucket/test-s3-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -605,13 +613,13 @@ "path": "s3lam-existing-s3-bucket/test-s3-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -638,7 +646,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -646,19 +654,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-lambda.S3ToLambda", - "version": "2.57.0" + "version": "2.60.0" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -674,7 +682,7 @@ "path": "s3lam-existing-s3-bucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -713,7 +721,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -746,19 +754,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -766,7 +774,7 @@ "path": "s3lam-existing-s3-bucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -800,7 +808,7 @@ "path": "s3lam-existing-s3-bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -808,25 +816,25 @@ "path": "s3lam-existing-s3-bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -834,7 +842,7 @@ "path": "s3lam-existing-s3-bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -842,13 +850,13 @@ "path": "s3lam-existing-s3-bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -862,7 +870,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.ts b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.ts index 9ce465cc4..57d831cde 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.ts +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-existing-s3-bucket.ts @@ -18,6 +18,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import { CreateScrapBucket, suppressCustomHandlerCfnNagWarnings } from "@aws-solutions-constructs/core"; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; const app = new App(); @@ -30,7 +31,7 @@ const myBucket = CreateScrapBucket(stack, "scrapBucket"); const props: S3ToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingBucketObj: myBucket diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/manifest.json index e381d14e8..eda392dba 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/manifest.json @@ -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}/6ea38471497d748800b07354a1318430d5775d890770b2f394bb3cfcf5f43493.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7aa78e38ed85084baa19e4598a5b43fae63fb34dc48938fb1e5b51170cfbafb0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -142,6 +142,12 @@ "data": "tests3lambdaS3BucketAllowBucketNotificationsTos3lamnoargumentstests3lambdaLambdaFunction7F4DB5A1D2077883" } ], + "/s3lam-no-arguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3lam-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/s3lam-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/s3lam-no-arguments.assets.json index 8a3201efb..a9fa2fb65 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/s3lam-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/s3lam-no-arguments.assets.json @@ -14,20 +14,20 @@ } } }, - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "6ea38471497d748800b07354a1318430d5775d890770b2f394bb3cfcf5f43493": { + "7aa78e38ed85084baa19e4598a5b43fae63fb34dc48938fb1e5b51170cfbafb0": { "source": { "path": "s3lam-no-arguments.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6ea38471497d748800b07354a1318430d5775d890770b2f394bb3cfcf5f43493.json", + "objectKey": "7aa78e38ed85084baa19e4598a5b43fae63fb34dc48938fb1e5b51170cfbafb0.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/s3lam-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/s3lam-no-arguments.template.json index 051e07827..ae569f41c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/s3lam-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/s3lam-no-arguments.template.json @@ -110,7 +110,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -505,7 +505,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -516,7 +516,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -655,6 +663,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/tree.json index a5bbd2df6..38472e089 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "s3lam-no-arguments/test-s3-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -120,19 +120,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -148,7 +148,7 @@ "path": "s3lam-no-arguments/test-s3-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -156,13 +156,13 @@ "path": "s3lam-no-arguments/test-s3-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -189,7 +189,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -197,13 +197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "S3LoggingBucket": { @@ -244,7 +244,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -378,13 +378,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -396,19 +396,19 @@ "path": "s3lam-no-arguments/test-s3-lambda/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -461,7 +461,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -520,13 +520,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -538,7 +538,7 @@ "path": "s3lam-no-arguments/test-s3-lambda/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -574,19 +574,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-lambda.S3ToLambda", - "version": "2.57.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3lam-no-arguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -598,7 +606,7 @@ "path": "s3lam-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -606,7 +614,7 @@ "path": "s3lam-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -614,13 +622,13 @@ "path": "s3lam-no-arguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -636,7 +644,7 @@ "path": "s3lam-no-arguments/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -675,7 +683,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -708,19 +716,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -728,7 +736,7 @@ "path": "s3lam-no-arguments/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -762,7 +770,7 @@ "path": "s3lam-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -770,25 +778,25 @@ "path": "s3lam-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -796,7 +804,7 @@ "path": "s3lam-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -804,13 +812,13 @@ "path": "s3lam-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -824,7 +832,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.ts index 588295266..565303813 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/integ.s3lam-no-arguments.ts @@ -28,7 +28,7 @@ const stack = new Stack(app, generateIntegStackName(__filename)); const props: S3ToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, bucketProps: { diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/s3-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/s3-lambda.test.ts index 0bb0da9fe..8aa01647f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/s3-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-s3-lambda/test/s3-lambda.test.ts @@ -17,12 +17,13 @@ import * as s3 from 'aws-cdk-lib/aws-s3'; import * as cdk from "aws-cdk-lib"; import { Template } from 'aws-cdk-lib/assertions'; import { CreateScrapBucket } from '@aws-solutions-constructs/core'; +import * as defaults from '@aws-solutions-constructs/core'; function deployNewFunc(stack: cdk.Stack) { const props: S3ToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, bucketProps: { @@ -54,7 +55,7 @@ test("Confirm CheckS3Props is being called", () => { new S3ToLambda(stack, "bad-s3-args", { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingBucketObj: testBucket, @@ -73,7 +74,7 @@ test('s3 bucket with bucket, loggingBucket, and auto delete objects', () => { new S3ToLambda(stack, 's3-lambda', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, bucketProps: { @@ -107,7 +108,7 @@ test('s3 bucket with one content bucket and no logging bucket', () => { new S3ToLambda(stack, 's3-lambda', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, bucketProps: { @@ -126,7 +127,7 @@ test('check properties with existing S3 bucket', () => { const construct = new S3ToLambda(stack, 's3-lambda', { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingBucketObj: existingBucket @@ -141,14 +142,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new cdk.Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: S3ToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/manifest.json index 601e2fca6..85189edbb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/manifest.json @@ -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}/3de2c57463c349bcad7471690524393415c7be463b983ea3ab75863967a304c5.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/714d0d35404a6ead132617e5c7c9b7f72a6a69baf18367560bacc9c91e217a1d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -136,6 +136,12 @@ "data": "tests3snsSnsTopicPolicyBB44DF16" } ], + "/s3sns-customLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sns-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.assets.json index fdb49020e..46a1485cb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "3de2c57463c349bcad7471690524393415c7be463b983ea3ab75863967a304c5": { + "714d0d35404a6ead132617e5c7c9b7f72a6a69baf18367560bacc9c91e217a1d": { "source": { "path": "s3sns-customLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3de2c57463c349bcad7471690524393415c7be463b983ea3ab75863967a304c5.json", + "objectKey": "714d0d35404a6ead132617e5c7c9b7f72a6a69baf18367560bacc9c91e217a1d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.template.json index 85d5cb8e8..45b865591 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/s3sns-customLoggingBucket.template.json @@ -509,7 +509,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -520,7 +520,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -659,6 +667,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/tree.json index e756ac020..1f754ed2c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-customLoggingBucket.js.snapshot/tree.json @@ -63,7 +63,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -197,13 +197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -215,19 +215,19 @@ "path": "s3sns-customLoggingBucket/test-s3-sns/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -280,7 +280,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -339,13 +339,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -357,7 +357,7 @@ "path": "s3sns-customLoggingBucket/test-s3-sns/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -369,7 +369,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "'test-s3-snsKey'": { @@ -426,13 +426,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "SnsTopic": { @@ -455,7 +455,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -572,25 +572,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sns.S3ToSns", - "version": "2.57.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sns-customLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -602,7 +610,7 @@ "path": "s3sns-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -610,7 +618,7 @@ "path": "s3sns-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -618,13 +626,13 @@ "path": "s3sns-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -640,7 +648,7 @@ "path": "s3sns-customLoggingBucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -679,7 +687,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -712,19 +720,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -732,7 +740,7 @@ "path": "s3sns-customLoggingBucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -766,7 +774,7 @@ "path": "s3sns-customLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -774,25 +782,25 @@ "path": "s3sns-customLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -800,7 +808,7 @@ "path": "s3sns-customLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -808,13 +816,13 @@ "path": "s3sns-customLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -828,7 +836,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/manifest.json index 3875caa00..a03f065a1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/manifest.json @@ -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}/04973688cddb1abae620596650f3d1ea110416836c47f043628b32bc0f74f274.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9ae33e4254096967d35592f6b6725f3f7f81db19b06caf71f499ecf8ffe968b3.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/s3sns-existingS3Bucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sns-existingS3Bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.assets.json index df9e133a9..dedb7895f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "04973688cddb1abae620596650f3d1ea110416836c47f043628b32bc0f74f274": { + "9ae33e4254096967d35592f6b6725f3f7f81db19b06caf71f499ecf8ffe968b3": { "source": { "path": "s3sns-existingS3Bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "04973688cddb1abae620596650f3d1ea110416836c47f043628b32bc0f74f274.json", + "objectKey": "9ae33e4254096967d35592f6b6725f3f7f81db19b06caf71f499ecf8ffe968b3.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.template.json index 943d1dcb3..1962cb3fd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/s3sns-existingS3Bucket.template.json @@ -205,7 +205,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -216,7 +216,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -685,6 +693,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/tree.json index 548304a4b..c23ef3fd1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingS3Bucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "s3sns-existingS3Bucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sns-existingS3Bucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "s3sns-existingS3Bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "s3sns-existingS3Bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "s3sns-existingS3Bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -376,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -394,13 +402,13 @@ "path": "s3sns-existingS3Bucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -412,7 +420,7 @@ "path": "s3sns-existingS3Bucket/scrapBucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -424,7 +432,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-sns": { @@ -485,13 +493,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "SnsTopic": { @@ -514,7 +522,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -631,25 +639,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sns.S3ToSns", - "version": "2.57.0" + "version": "2.60.0" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -665,7 +673,7 @@ "path": "s3sns-existingS3Bucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -704,7 +712,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -737,19 +745,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -757,7 +765,7 @@ "path": "s3sns-existingS3Bucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -791,7 +799,7 @@ "path": "s3sns-existingS3Bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -799,25 +807,25 @@ "path": "s3sns-existingS3Bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -825,7 +833,7 @@ "path": "s3sns-existingS3Bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -833,13 +841,13 @@ "path": "s3sns-existingS3Bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -853,7 +861,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/manifest.json index fe898e02c..7befdd372 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/manifest.json @@ -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}/f017d29fb47ea4609cb4b0831e1eb0e1c28f23789d5a34dbfb360318b8494d7b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4d8de5883c5136091018aca8f78c6fe8f206fe4ecf0e4bd9eee29a762b7ee99d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -142,6 +142,12 @@ "data": "tests3snsS3BucketNotificationsFCF8E340" } ], + "/s3sns-existingSnsTopic/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sns-existingSnsTopic/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.assets.json index 86de389fc..427f315bd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "f017d29fb47ea4609cb4b0831e1eb0e1c28f23789d5a34dbfb360318b8494d7b": { + "4d8de5883c5136091018aca8f78c6fe8f206fe4ecf0e4bd9eee29a762b7ee99d": { "source": { "path": "s3sns-existingSnsTopic.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f017d29fb47ea4609cb4b0831e1eb0e1c28f23789d5a34dbfb360318b8494d7b.json", + "objectKey": "4d8de5883c5136091018aca8f78c6fe8f206fe4ecf0e4bd9eee29a762b7ee99d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.template.json index 2c5b669d3..78a73d0bd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/s3sns-existingSnsTopic.template.json @@ -560,7 +560,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -571,7 +571,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -722,6 +730,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/tree.json index d124f6d3b..2df2429ba 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingSnsTopic.js.snapshot/tree.json @@ -62,13 +62,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "SnsTopic": { @@ -91,7 +91,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -208,19 +208,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-sns": { @@ -265,7 +265,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -399,13 +399,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -417,19 +417,19 @@ "path": "s3sns-existingSnsTopic/test-s3-sns/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -488,7 +488,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -586,13 +586,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -604,13 +604,13 @@ "path": "s3sns-existingSnsTopic/test-s3-sns/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -622,7 +622,7 @@ "path": "s3sns-existingSnsTopic/test-s3-sns/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -634,13 +634,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sns.S3ToSns", - "version": "2.57.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sns-existingSnsTopic/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -652,7 +660,7 @@ "path": "s3sns-existingSnsTopic/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -660,7 +668,7 @@ "path": "s3sns-existingSnsTopic/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -668,13 +676,13 @@ "path": "s3sns-existingSnsTopic/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -690,7 +698,7 @@ "path": "s3sns-existingSnsTopic/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -729,7 +737,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -762,19 +770,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -782,7 +790,7 @@ "path": "s3sns-existingSnsTopic/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -816,7 +824,7 @@ "path": "s3sns-existingSnsTopic/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -824,25 +832,25 @@ "path": "s3sns-existingSnsTopic/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -850,7 +858,7 @@ "path": "s3sns-existingSnsTopic/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -858,13 +866,13 @@ "path": "s3sns-existingSnsTopic/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -878,7 +886,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/manifest.json index bb7850e25..083b83def 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/manifest.json @@ -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}/a67247a088c5582c97e2122b81311b483311799afdf6b9fbb771f07a902bf15c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b98bc3e664dd86b02a59b1f0408c6d5a56c395130a36284ccd092c86b4d22f37.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -136,6 +136,12 @@ "data": "tests3snsS3BucketNotificationsFCF8E340" } ], + "/s3sns-existingUnencryptedSnsTopic/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sns-existingUnencryptedSnsTopic/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/s3sns-existingUnencryptedSnsTopic.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/s3sns-existingUnencryptedSnsTopic.assets.json index afe245131..f70aec233 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/s3sns-existingUnencryptedSnsTopic.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/s3sns-existingUnencryptedSnsTopic.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "a67247a088c5582c97e2122b81311b483311799afdf6b9fbb771f07a902bf15c": { + "b98bc3e664dd86b02a59b1f0408c6d5a56c395130a36284ccd092c86b4d22f37": { "source": { "path": "s3sns-existingUnencryptedSnsTopic.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a67247a088c5582c97e2122b81311b483311799afdf6b9fbb771f07a902bf15c.json", + "objectKey": "b98bc3e664dd86b02a59b1f0408c6d5a56c395130a36284ccd092c86b4d22f37.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/s3sns-existingUnencryptedSnsTopic.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/s3sns-existingUnencryptedSnsTopic.template.json index f773a0212..7b7688ecd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/s3sns-existingUnencryptedSnsTopic.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/s3sns-existingUnencryptedSnsTopic.template.json @@ -446,7 +446,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -457,7 +457,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -608,6 +616,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/tree.json index dc6c66613..35959cc3c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-existingUnencryptedSnsTopic.js.snapshot/tree.json @@ -21,7 +21,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -69,19 +69,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-sns": { @@ -126,7 +126,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -260,13 +260,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -278,19 +278,19 @@ "path": "s3sns-existingUnencryptedSnsTopic/test-s3-sns/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -349,7 +349,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -447,13 +447,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -465,13 +465,13 @@ "path": "s3sns-existingUnencryptedSnsTopic/test-s3-sns/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -483,7 +483,7 @@ "path": "s3sns-existingUnencryptedSnsTopic/test-s3-sns/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -495,13 +495,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sns.S3ToSns", - "version": "2.57.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sns-existingUnencryptedSnsTopic/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -513,7 +521,7 @@ "path": "s3sns-existingUnencryptedSnsTopic/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -521,7 +529,7 @@ "path": "s3sns-existingUnencryptedSnsTopic/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -529,13 +537,13 @@ "path": "s3sns-existingUnencryptedSnsTopic/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -551,7 +559,7 @@ "path": "s3sns-existingUnencryptedSnsTopic/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -590,7 +598,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -623,19 +631,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -643,7 +651,7 @@ "path": "s3sns-existingUnencryptedSnsTopic/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -677,7 +685,7 @@ "path": "s3sns-existingUnencryptedSnsTopic/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -685,25 +693,25 @@ "path": "s3sns-existingUnencryptedSnsTopic/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -711,7 +719,7 @@ "path": "s3sns-existingUnencryptedSnsTopic/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -719,13 +727,13 @@ "path": "s3sns-existingUnencryptedSnsTopic/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -739,7 +747,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/manifest.json index d35ad8cfa..9fa6f9ff1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/manifest.json @@ -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}/84984791bfbc71f51e4d5251e76f829469dbb3807231006fa73df6262c00be33.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a18b1fa0c0992a5228c791519a206e04588ced5534c4b489ba15ab50caff6027.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -142,6 +142,12 @@ "data": "tests3snsSnsTopicPolicyBB44DF16" } ], + "/s3sns-newTopicFromProps/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sns-newTopicFromProps/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.assets.json index b24cab277..0762afe6b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "84984791bfbc71f51e4d5251e76f829469dbb3807231006fa73df6262c00be33": { + "a18b1fa0c0992a5228c791519a206e04588ced5534c4b489ba15ab50caff6027": { "source": { "path": "s3sns-newTopicFromProps.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "84984791bfbc71f51e4d5251e76f829469dbb3807231006fa73df6262c00be33.json", + "objectKey": "a18b1fa0c0992a5228c791519a206e04588ced5534c4b489ba15ab50caff6027.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.template.json index 3b698d4b8..3cfe899d4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/s3sns-newTopicFromProps.template.json @@ -561,7 +561,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -572,7 +572,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -723,6 +731,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/tree.json index 3a5f530f6..5ab0ec81b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-newTopicFromProps.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "s3sns-newTopicFromProps/test-s3-sns/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,13 +389,13 @@ "path": "s3sns-newTopicFromProps/test-s3-sns/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -407,7 +407,7 @@ "path": "s3sns-newTopicFromProps/test-s3-sns/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -419,7 +419,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "'test-s3-snsKey'": { @@ -476,13 +476,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "SnsTopic": { @@ -506,7 +506,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -623,25 +623,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sns.S3ToSns", - "version": "2.57.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sns-newTopicFromProps/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -653,7 +661,7 @@ "path": "s3sns-newTopicFromProps/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -661,7 +669,7 @@ "path": "s3sns-newTopicFromProps/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -669,13 +677,13 @@ "path": "s3sns-newTopicFromProps/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -691,7 +699,7 @@ "path": "s3sns-newTopicFromProps/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -730,7 +738,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -763,19 +771,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -783,7 +791,7 @@ "path": "s3sns-newTopicFromProps/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -817,7 +825,7 @@ "path": "s3sns-newTopicFromProps/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -825,25 +833,25 @@ "path": "s3sns-newTopicFromProps/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -851,7 +859,7 @@ "path": "s3sns-newTopicFromProps/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -859,13 +867,13 @@ "path": "s3sns-newTopicFromProps/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -879,7 +887,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/manifest.json index a696d4242..e7695d48a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/manifest.json @@ -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}/f78381e3d557c1dfea67306734bc3d401824ff1b79f32a788f49a68714a8b582.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ff7db325232402cf2aab70965bbb674055fa05933ed787662b49129ff356eebe.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -142,6 +142,12 @@ "data": "tests3snsSnsTopicPolicyBB44DF16" } ], + "/s3sns-noArguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sns-noArguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.assets.json index 6be7c8419..2bcf5d030 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "f78381e3d557c1dfea67306734bc3d401824ff1b79f32a788f49a68714a8b582": { + "ff7db325232402cf2aab70965bbb674055fa05933ed787662b49129ff356eebe": { "source": { "path": "s3sns-noArguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f78381e3d557c1dfea67306734bc3d401824ff1b79f32a788f49a68714a8b582.json", + "objectKey": "ff7db325232402cf2aab70965bbb674055fa05933ed787662b49129ff356eebe.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.template.json index b12932f11..4951bf7fc 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/s3sns-noArguments.template.json @@ -560,7 +560,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -571,7 +571,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -722,6 +730,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/tree.json index 4c4a9b7ad..89480895f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-noArguments.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "s3sns-noArguments/test-s3-sns/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,13 +389,13 @@ "path": "s3sns-noArguments/test-s3-sns/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -407,7 +407,7 @@ "path": "s3sns-noArguments/test-s3-sns/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -419,7 +419,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "'test-s3-snsKey'": { @@ -476,13 +476,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "SnsTopic": { @@ -505,7 +505,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -622,25 +622,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sns.S3ToSns", - "version": "2.57.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sns-noArguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -652,7 +660,7 @@ "path": "s3sns-noArguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -660,7 +668,7 @@ "path": "s3sns-noArguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -668,13 +676,13 @@ "path": "s3sns-noArguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -690,7 +698,7 @@ "path": "s3sns-noArguments/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -729,7 +737,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -762,19 +770,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -782,7 +790,7 @@ "path": "s3sns-noArguments/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -816,7 +824,7 @@ "path": "s3sns-noArguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -824,25 +832,25 @@ "path": "s3sns-noArguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -850,7 +858,7 @@ "path": "s3sns-noArguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -858,13 +866,13 @@ "path": "s3sns-noArguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -878,7 +886,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/manifest.json index 42ff2e924..70df11216 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/manifest.json @@ -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}/65e2b98e7c4c82b21210e7f4e749985ee8433beb96566801a915427f5d45b6cf.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dc63704e2119878e6c6f9ba4b95ece8cf3dc93e5863bfb35c064e813abbe6ed8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -142,6 +142,12 @@ "data": "tests3snsSnsTopicPolicyBB44DF16" } ], + "/s3sns-s3EventTypesAndFilters/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sns-s3EventTypesAndFilters/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.assets.json index bf0e13ce3..4881f7979 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "65e2b98e7c4c82b21210e7f4e749985ee8433beb96566801a915427f5d45b6cf": { + "dc63704e2119878e6c6f9ba4b95ece8cf3dc93e5863bfb35c064e813abbe6ed8": { "source": { "path": "s3sns-s3EventTypesAndFilters.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "65e2b98e7c4c82b21210e7f4e749985ee8433beb96566801a915427f5d45b6cf.json", + "objectKey": "dc63704e2119878e6c6f9ba4b95ece8cf3dc93e5863bfb35c064e813abbe6ed8.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.template.json index a6c8e1dab..315cd0ae1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/s3sns-s3EventTypesAndFilters.template.json @@ -574,7 +574,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -585,7 +585,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -736,6 +744,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/tree.json index 6ba15b9f9..a3298f853 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-s3EventTypesAndFilters.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "s3sns-s3EventTypesAndFilters/test-s3-sns/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,13 +389,13 @@ "path": "s3sns-s3EventTypesAndFilters/test-s3-sns/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -407,7 +407,7 @@ "path": "s3sns-s3EventTypesAndFilters/test-s3-sns/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -419,7 +419,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "'test-s3-snsKey'": { @@ -476,13 +476,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "SnsTopic": { @@ -505,7 +505,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -622,25 +622,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sns.S3ToSns", - "version": "2.57.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sns-s3EventTypesAndFilters/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -652,7 +660,7 @@ "path": "s3sns-s3EventTypesAndFilters/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -660,7 +668,7 @@ "path": "s3sns-s3EventTypesAndFilters/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -668,13 +676,13 @@ "path": "s3sns-s3EventTypesAndFilters/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -690,7 +698,7 @@ "path": "s3sns-s3EventTypesAndFilters/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -729,7 +737,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -762,19 +770,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -782,7 +790,7 @@ "path": "s3sns-s3EventTypesAndFilters/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -816,7 +824,7 @@ "path": "s3sns-s3EventTypesAndFilters/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -824,25 +832,25 @@ "path": "s3sns-s3EventTypesAndFilters/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -850,7 +858,7 @@ "path": "s3sns-s3EventTypesAndFilters/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -858,13 +866,13 @@ "path": "s3sns-s3EventTypesAndFilters/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -878,7 +886,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/manifest.json index 4d5a8ba01..49e391314 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/manifest.json @@ -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}/02d8111e194b97b5a92787f1044a147604be34c3ef96f52d4888d9eadef9effa.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/ce4b948fc6ab434109c2340137876040cd5cd65aac21fe4b0915b32ae46c82df.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -136,6 +136,12 @@ "data": "tests3snsSnsTopicPolicyBB44DF16" } ], + "/s3sns-snsTopicWithAwsManagedKey/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sns-snsTopicWithAwsManagedKey/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/s3sns-snsTopicWithAwsManagedKey.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/s3sns-snsTopicWithAwsManagedKey.assets.json index d90763cbe..958968e56 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/s3sns-snsTopicWithAwsManagedKey.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/s3sns-snsTopicWithAwsManagedKey.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "02d8111e194b97b5a92787f1044a147604be34c3ef96f52d4888d9eadef9effa": { + "ce4b948fc6ab434109c2340137876040cd5cd65aac21fe4b0915b32ae46c82df": { "source": { "path": "s3sns-snsTopicWithAwsManagedKey.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "02d8111e194b97b5a92787f1044a147604be34c3ef96f52d4888d9eadef9effa.json", + "objectKey": "ce4b948fc6ab434109c2340137876040cd5cd65aac21fe4b0915b32ae46c82df.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/s3sns-snsTopicWithAwsManagedKey.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/s3sns-snsTopicWithAwsManagedKey.template.json index 0ef674314..d6f540276 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/s3sns-snsTopicWithAwsManagedKey.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/s3sns-snsTopicWithAwsManagedKey.template.json @@ -527,7 +527,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -538,7 +538,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -689,6 +697,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/tree.json index b48c2cd47..b8dfc490a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sns/test/integ.s3sns-snsTopicWithAwsManagedKey.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "s3sns-snsTopicWithAwsManagedKey/test-s3-sns/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,13 +389,13 @@ "path": "s3sns-snsTopicWithAwsManagedKey/test-s3-sns/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -407,7 +407,7 @@ "path": "s3sns-snsTopicWithAwsManagedKey/test-s3-sns/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -419,7 +419,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "aws-managed-key": { @@ -427,7 +427,7 @@ "path": "s3sns-snsTopicWithAwsManagedKey/test-s3-sns/aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "SnsTopic": { @@ -464,7 +464,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -581,25 +581,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sns.S3ToSns", - "version": "2.57.0" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sns-snsTopicWithAwsManagedKey/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -611,7 +619,7 @@ "path": "s3sns-snsTopicWithAwsManagedKey/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -619,7 +627,7 @@ "path": "s3sns-snsTopicWithAwsManagedKey/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -627,13 +635,13 @@ "path": "s3sns-snsTopicWithAwsManagedKey/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -649,7 +657,7 @@ "path": "s3sns-snsTopicWithAwsManagedKey/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -688,7 +696,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -721,19 +729,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -741,7 +749,7 @@ "path": "s3sns-snsTopicWithAwsManagedKey/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -775,7 +783,7 @@ "path": "s3sns-snsTopicWithAwsManagedKey/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -783,25 +791,25 @@ "path": "s3sns-snsTopicWithAwsManagedKey/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -809,7 +817,7 @@ "path": "s3sns-snsTopicWithAwsManagedKey/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -817,13 +825,13 @@ "path": "s3sns-snsTopicWithAwsManagedKey/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -837,7 +845,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/manifest.json index 218cc9410..290cfeb58 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/manifest.json @@ -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}/b6940f8ece4c08398760c9dbca263ff4858a04ea4fdf6bf55771a6611f013321.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b7c91ccf2449664a33b07e163959e2473b785ec364ecfcc69842b381dd736244.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -142,6 +142,12 @@ "data": "tests3sqsqueuePolicyDDC0D745" } ], + "/s3sqs-creatingNewQueue/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sqs-creatingNewQueue/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -183,24 +189,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "tests3sqsdeadLetterQueueEABBC814": [ - { - "type": "aws:cdk:logicalId", - "data": "tests3sqsdeadLetterQueueEABBC814", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "tests3sqsdeadLetterQueuePolicy35D7CFE3": [ - { - "type": "aws:cdk:logicalId", - "data": "tests3sqsdeadLetterQueuePolicy35D7CFE3", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "s3sqs-creatingNewQueue" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/s3sqs-creatingNewQueue.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/s3sqs-creatingNewQueue.assets.json index 89dff543a..6e2b16b18 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/s3sqs-creatingNewQueue.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/s3sqs-creatingNewQueue.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "b6940f8ece4c08398760c9dbca263ff4858a04ea4fdf6bf55771a6611f013321": { + "b7c91ccf2449664a33b07e163959e2473b785ec364ecfcc69842b381dd736244": { "source": { "path": "s3sqs-creatingNewQueue.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "b6940f8ece4c08398760c9dbca263ff4858a04ea4fdf6bf55771a6611f013321.json", + "objectKey": "b7c91ccf2449664a33b07e163959e2473b785ec364ecfcc69842b381dd736244.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/s3sqs-creatingNewQueue.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/s3sqs-creatingNewQueue.template.json index 9c9de7e34..06a74a787 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/s3sqs-creatingNewQueue.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/s3sqs-creatingNewQueue.template.json @@ -509,7 +509,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -520,7 +520,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -671,6 +679,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/tree.json index 05ef6e170..4090468d1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-creatingNewQueue.js.snapshot/tree.json @@ -85,13 +85,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-sqs": { @@ -149,7 +149,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -247,13 +247,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -265,13 +265,13 @@ "path": "s3sqs-creatingNewQueue/test-s3-sqs/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -283,7 +283,7 @@ "path": "s3sqs-creatingNewQueue/test-s3-sqs/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -295,7 +295,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "queue-dlq": { @@ -314,7 +314,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -397,19 +397,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } }, "queue": { @@ -442,7 +442,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -552,25 +552,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sqs.S3ToSqs", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sqs-creatingNewQueue/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -582,7 +590,7 @@ "path": "s3sqs-creatingNewQueue/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -590,7 +598,7 @@ "path": "s3sqs-creatingNewQueue/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -598,13 +606,13 @@ "path": "s3sqs-creatingNewQueue/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -620,7 +628,7 @@ "path": "s3sqs-creatingNewQueue/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -659,7 +667,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -692,19 +700,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -712,7 +720,7 @@ "path": "s3sqs-creatingNewQueue/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -746,7 +754,7 @@ "path": "s3sqs-creatingNewQueue/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -754,25 +762,25 @@ "path": "s3sqs-creatingNewQueue/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -780,7 +788,7 @@ "path": "s3sqs-creatingNewQueue/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -788,13 +796,13 @@ "path": "s3sqs-creatingNewQueue/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -808,7 +816,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/manifest.json index 55e83fb53..7c0bce9b4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/manifest.json @@ -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}/7a2ba4bd62a370ee066b1840de7e4c319c166d5321d3dd4eaa4cff7cb665a8df.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/81e1db27028c30610fc1926410968408e0419614c02db8dd463e9369786ee1f8.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -154,6 +154,12 @@ "data": "tests3sqsqueuePolicyDDC0D745" } ], + "/s3sqs-customLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sqs-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -195,24 +201,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "tests3sqsdeadLetterQueueEABBC814": [ - { - "type": "aws:cdk:logicalId", - "data": "tests3sqsdeadLetterQueueEABBC814", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "tests3sqsdeadLetterQueuePolicy35D7CFE3": [ - { - "type": "aws:cdk:logicalId", - "data": "tests3sqsdeadLetterQueuePolicy35D7CFE3", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "s3sqs-customLoggingBucket" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.assets.json index 11dd8bfa6..333073e04 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "7a2ba4bd62a370ee066b1840de7e4c319c166d5321d3dd4eaa4cff7cb665a8df": { + "81e1db27028c30610fc1926410968408e0419614c02db8dd463e9369786ee1f8": { "source": { "path": "s3sqs-customLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7a2ba4bd62a370ee066b1840de7e4c319c166d5321d3dd4eaa4cff7cb665a8df.json", + "objectKey": "81e1db27028c30610fc1926410968408e0419614c02db8dd463e9369786ee1f8.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.template.json index be98f8160..8ad3b340f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/s3sqs-customLoggingBucket.template.json @@ -618,7 +618,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -629,7 +629,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -768,6 +776,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/tree.json index 2ec709cd3..4c153d27e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-customLoggingBucket.js.snapshot/tree.json @@ -63,7 +63,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -197,13 +197,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -215,19 +215,19 @@ "path": "s3sqs-customLoggingBucket/test-s3-sqs/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -280,7 +280,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -339,13 +339,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -357,7 +357,7 @@ "path": "s3sqs-customLoggingBucket/test-s3-sqs/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -369,7 +369,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "queue-dlq": { @@ -387,7 +387,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -470,19 +470,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } }, "'queueKey'": { @@ -562,13 +562,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "queue": { @@ -600,7 +600,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -710,25 +710,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sqs.S3ToSqs", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sqs-customLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -740,7 +748,7 @@ "path": "s3sqs-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -748,7 +756,7 @@ "path": "s3sqs-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -756,13 +764,13 @@ "path": "s3sqs-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -778,7 +786,7 @@ "path": "s3sqs-customLoggingBucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -817,7 +825,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -850,19 +858,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -870,7 +878,7 @@ "path": "s3sqs-customLoggingBucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -904,7 +912,7 @@ "path": "s3sqs-customLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -912,25 +920,25 @@ "path": "s3sqs-customLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -938,7 +946,7 @@ "path": "s3sqs-customLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -946,13 +954,13 @@ "path": "s3sqs-customLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -966,7 +974,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/manifest.json index 08cc95a68..98115c4f6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/manifest.json @@ -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}/c2550388a1922fa77b760e333584db32069a418717a55bcb7605946c8dbd802b.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bb0462868a85f085e06658a9c5df362efc9397e9caa9b7cfaf4c6e61ef611817.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/s3sqs-existingLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sqs-existingLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -219,24 +225,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "tests3sqstempdeadLetterQueueDD55EEDB": [ - { - "type": "aws:cdk:logicalId", - "data": "tests3sqstempdeadLetterQueueDD55EEDB", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "tests3sqstempdeadLetterQueuePolicy56962C75": [ - { - "type": "aws:cdk:logicalId", - "data": "tests3sqstempdeadLetterQueuePolicy56962C75", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "s3sqs-existingLoggingBucket" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.assets.json index a970dec85..b00cc6ea1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "c2550388a1922fa77b760e333584db32069a418717a55bcb7605946c8dbd802b": { + "bb0462868a85f085e06658a9c5df362efc9397e9caa9b7cfaf4c6e61ef611817": { "source": { "path": "s3sqs-existingLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "c2550388a1922fa77b760e333584db32069a418717a55bcb7605946c8dbd802b.json", + "objectKey": "bb0462868a85f085e06658a9c5df362efc9397e9caa9b7cfaf4c6e61ef611817.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.template.json index 3b02f534e..ff5d148f2 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/s3sqs-existingLoggingBucket.template.json @@ -205,7 +205,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -216,7 +216,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -984,6 +992,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/tree.json index 1f47d213a..ab58f140c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingLoggingBucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "s3sqs-existingLoggingBucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sqs-existingLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "s3sqs-existingLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "s3sqs-existingLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "s3sqs-existingLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -412,13 +420,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -430,19 +438,19 @@ "path": "s3sqs-existingLoggingBucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-sqs-temp": { @@ -505,7 +513,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -603,13 +611,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -621,13 +629,13 @@ "path": "s3sqs-existingLoggingBucket/test-s3-sqs-temp/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -639,7 +647,7 @@ "path": "s3sqs-existingLoggingBucket/test-s3-sqs-temp/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -651,7 +659,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "queue-dlq": { @@ -669,7 +677,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -752,19 +760,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } }, "'queueKey'": { @@ -844,13 +852,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "queue": { @@ -882,7 +890,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -992,25 +1000,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sqs.S3ToSqs", - "version": "2.58.1" + "version": "2.60.0" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -1026,7 +1034,7 @@ "path": "s3sqs-existingLoggingBucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1065,7 +1073,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1098,19 +1106,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1118,7 +1126,7 @@ "path": "s3sqs-existingLoggingBucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -1152,7 +1160,7 @@ "path": "s3sqs-existingLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1160,25 +1168,25 @@ "path": "s3sqs-existingLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1186,7 +1194,7 @@ "path": "s3sqs-existingLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1194,13 +1202,13 @@ "path": "s3sqs-existingLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1214,7 +1222,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/manifest.json index ca934c8d6..5c253daf3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/manifest.json @@ -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}/9619756c4799ee2df2212d2fcbc7c15679c2df3d3b4a08b77e5a3be4cf699480.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4d060feb3375c5fc5a5e2a51e863191537cbbb30d3d5c353af025676d4f21508.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -142,6 +142,12 @@ "data": "tests3sqsS3BucketNotifications32539247" } ], + "/s3sqs-existingQueue/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sqs-existingQueue/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -183,24 +189,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "deadLetterQueue3F848E28": [ - { - "type": "aws:cdk:logicalId", - "data": "deadLetterQueue3F848E28", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "deadLetterQueuePolicy14A9D269": [ - { - "type": "aws:cdk:logicalId", - "data": "deadLetterQueuePolicy14A9D269", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "s3sqs-existingQueue" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.assets.json index c4ab02f97..16b2b8183 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "9619756c4799ee2df2212d2fcbc7c15679c2df3d3b4a08b77e5a3be4cf699480": { + "4d060feb3375c5fc5a5e2a51e863191537cbbb30d3d5c353af025676d4f21508": { "source": { "path": "s3sqs-existingQueue.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "9619756c4799ee2df2212d2fcbc7c15679c2df3d3b4a08b77e5a3be4cf699480.json", + "objectKey": "4d060feb3375c5fc5a5e2a51e863191537cbbb30d3d5c353af025676d4f21508.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.template.json index a96262e4f..34c88cd67 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/s3sqs-existingQueue.template.json @@ -492,7 +492,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -503,7 +503,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -654,6 +662,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/tree.json index 8dd6c9024..4b773914f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingQueue.js.snapshot/tree.json @@ -23,7 +23,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -106,19 +106,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } }, "'test-existing-queueKey'": { @@ -198,13 +198,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "test-existing-queue": { @@ -236,7 +236,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -346,19 +346,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-sqs": { @@ -416,7 +416,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -514,13 +514,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -532,13 +532,13 @@ "path": "s3sqs-existingQueue/test-s3-sqs/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -550,7 +550,7 @@ "path": "s3sqs-existingQueue/test-s3-sqs/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -562,13 +562,21 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sqs.S3ToSqs", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sqs-existingQueue/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -580,7 +588,7 @@ "path": "s3sqs-existingQueue/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -588,7 +596,7 @@ "path": "s3sqs-existingQueue/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -596,13 +604,13 @@ "path": "s3sqs-existingQueue/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -618,7 +626,7 @@ "path": "s3sqs-existingQueue/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -657,7 +665,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -690,19 +698,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -710,7 +718,7 @@ "path": "s3sqs-existingQueue/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -744,7 +752,7 @@ "path": "s3sqs-existingQueue/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -752,25 +760,25 @@ "path": "s3sqs-existingQueue/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -778,7 +786,7 @@ "path": "s3sqs-existingQueue/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -786,13 +794,13 @@ "path": "s3sqs-existingQueue/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -806,7 +814,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/manifest.json index 60f9f8617..17636f31c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/manifest.json @@ -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}/3c25bef4d8da1e8ff688157d7e1e4bf6e56bd222d07b205e532c4e4a39390d5e.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3aca71f6cdd6e6bcdbc595d627b6f79ee34e936f2fee314d8db71aa5b28cfbf1.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/s3sqs-existingS3Bucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sqs-existingS3Bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -201,24 +207,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "tests3sqsdeadLetterQueueEABBC814": [ - { - "type": "aws:cdk:logicalId", - "data": "tests3sqsdeadLetterQueueEABBC814", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "tests3sqsdeadLetterQueuePolicy35D7CFE3": [ - { - "type": "aws:cdk:logicalId", - "data": "tests3sqsdeadLetterQueuePolicy35D7CFE3", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "s3sqs-existingS3Bucket" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.assets.json index 694db71cf..1bd21f15e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "3c25bef4d8da1e8ff688157d7e1e4bf6e56bd222d07b205e532c4e4a39390d5e": { + "3aca71f6cdd6e6bcdbc595d627b6f79ee34e936f2fee314d8db71aa5b28cfbf1": { "source": { "path": "s3sqs-existingS3Bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3c25bef4d8da1e8ff688157d7e1e4bf6e56bd222d07b205e532c4e4a39390d5e.json", + "objectKey": "3aca71f6cdd6e6bcdbc595d627b6f79ee34e936f2fee314d8db71aa5b28cfbf1.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.template.json index 85b270b8c..e949013f6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/s3sqs-existingS3Bucket.template.json @@ -205,7 +205,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -216,7 +216,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -794,6 +802,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/tree.json index b14885e0d..e31cba1db 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-existingS3Bucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "s3sqs-existingS3Bucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sqs-existingS3Bucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "s3sqs-existingS3Bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "s3sqs-existingS3Bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "s3sqs-existingS3Bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -376,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -394,13 +402,13 @@ "path": "s3sqs-existingS3Bucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -412,7 +420,7 @@ "path": "s3sqs-existingS3Bucket/scrapBucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -424,7 +432,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-sqs": { @@ -446,7 +454,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -529,19 +537,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } }, "'queueKey'": { @@ -621,13 +629,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "queue": { @@ -659,7 +667,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -769,25 +777,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sqs.S3ToSqs", - "version": "2.58.1" + "version": "2.60.0" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -803,7 +811,7 @@ "path": "s3sqs-existingS3Bucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -842,7 +850,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -875,19 +883,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -895,7 +903,7 @@ "path": "s3sqs-existingS3Bucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -929,7 +937,7 @@ "path": "s3sqs-existingS3Bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -937,25 +945,25 @@ "path": "s3sqs-existingS3Bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -963,7 +971,7 @@ "path": "s3sqs-existingS3Bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -971,13 +979,13 @@ "path": "s3sqs-existingS3Bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -991,7 +999,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/manifest.json index cb1ffb3fb..24201880d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/manifest.json @@ -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}/45edf1bf93f37893d349cce9a7a60f5614384339cbee0f8c3a36e48b77557eaa.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0bb136c532e33616f95c82ad31b88e0f7cd0f5e360c50b38d6597b3fd2cc5da9.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -160,6 +160,12 @@ "data": "tests3sqsqueuePolicyDDC0D745" } ], + "/s3sqs-noArguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3sqs-noArguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", @@ -201,24 +207,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "tests3sqsdeadLetterQueueEABBC814": [ - { - "type": "aws:cdk:logicalId", - "data": "tests3sqsdeadLetterQueueEABBC814", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "tests3sqsdeadLetterQueuePolicy35D7CFE3": [ - { - "type": "aws:cdk:logicalId", - "data": "tests3sqsdeadLetterQueuePolicy35D7CFE3", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "s3sqs-noArguments" diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.assets.json index e9e4b1284..05db093ec 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "45edf1bf93f37893d349cce9a7a60f5614384339cbee0f8c3a36e48b77557eaa": { + "0bb136c532e33616f95c82ad31b88e0f7cd0f5e360c50b38d6597b3fd2cc5da9": { "source": { "path": "s3sqs-noArguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "45edf1bf93f37893d349cce9a7a60f5614384339cbee0f8c3a36e48b77557eaa.json", + "objectKey": "0bb136c532e33616f95c82ad31b88e0f7cd0f5e360c50b38d6597b3fd2cc5da9.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.template.json index 622cc3c7d..29acb0388 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/s3sqs-noArguments.template.json @@ -669,7 +669,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -680,7 +680,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -831,6 +839,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/tree.json index f48074de3..9cc78750e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-sqs/test/integ.s3sqs-noArguments.js.snapshot/tree.json @@ -50,7 +50,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -184,13 +184,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -202,19 +202,19 @@ "path": "s3sqs-noArguments/test-s3-sqs/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -371,13 +371,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -389,13 +389,13 @@ "path": "s3sqs-noArguments/test-s3-sqs/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -407,7 +407,7 @@ "path": "s3sqs-noArguments/test-s3-sqs/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -419,7 +419,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "queue-dlq": { @@ -437,7 +437,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -520,19 +520,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } }, "'queueKey'": { @@ -612,13 +612,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.143.0" + "version": "2.147.3" } }, "queue": { @@ -650,7 +650,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -760,25 +760,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-sqs.S3ToSqs", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3sqs-noArguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -790,7 +798,7 @@ "path": "s3sqs-noArguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -798,7 +806,7 @@ "path": "s3sqs-noArguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -806,13 +814,13 @@ "path": "s3sqs-noArguments/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -828,7 +836,7 @@ "path": "s3sqs-noArguments/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -867,7 +875,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -900,19 +908,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -920,7 +928,7 @@ "path": "s3sqs-noArguments/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -954,7 +962,7 @@ "path": "s3sqs-noArguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -962,25 +970,25 @@ "path": "s3sqs-noArguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -988,7 +996,7 @@ "path": "s3sqs-noArguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -996,13 +1004,13 @@ "path": "s3sqs-noArguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1016,7 +1024,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/manifest.json index 6f9ed4e38..0b79509b4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/manifest.json @@ -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}/7f8d46c39d6c2fdc22b930a88a2c1eed45979459ebc617f3cd5fa5be1c33df18.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7c79f4fdb7a82a61810659c7cb88df5e7c3f170887dea58e667245fe481f5305.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -196,6 +196,12 @@ "data": "tests3stepfunctionstests3stepfunctionseventrulestepfunctionconstructExecutionAbortedAlarm1689CFA6" } ], + "/s3stp-customLoggingBucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3stp-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/s3stp-customLoggingBucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/s3stp-customLoggingBucket.assets.json index d68e74110..9e0deb62d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/s3stp-customLoggingBucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/s3stp-customLoggingBucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "7f8d46c39d6c2fdc22b930a88a2c1eed45979459ebc617f3cd5fa5be1c33df18": { + "7c79f4fdb7a82a61810659c7cb88df5e7c3f170887dea58e667245fe481f5305": { "source": { "path": "s3stp-customLoggingBucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7f8d46c39d6c2fdc22b930a88a2c1eed45979459ebc617f3cd5fa5be1c33df18.json", + "objectKey": "7c79f4fdb7a82a61810659c7cb88df5e7c3f170887dea58e667245fe481f5305.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/s3stp-customLoggingBucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/s3stp-customLoggingBucket.template.json index d9e201e05..9f73906d1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/s3stp-customLoggingBucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/s3stp-customLoggingBucket.template.json @@ -783,7 +783,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -794,7 +794,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -957,6 +965,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/tree.json index a1349b435..fe5b071ae 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-customLoggingBucket.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "s3stp-customLoggingBucket/lambdas3stp-test/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -60,13 +60,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -90,13 +90,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "tasks3stp-test": { @@ -104,7 +104,7 @@ "path": "s3stp-customLoggingBucket/tasks3stp-test", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-stepfunctions": { @@ -162,7 +162,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -296,13 +296,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -314,19 +314,19 @@ "path": "s3stp-customLoggingBucket/test-s3-stepfunctions/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -385,7 +385,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -483,13 +483,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -501,13 +501,13 @@ "path": "s3stp-customLoggingBucket/test-s3-stepfunctions/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -519,7 +519,7 @@ "path": "s3stp-customLoggingBucket/test-s3-stepfunctions/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -531,7 +531,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-stepfunctions-event-rule-step-function-construct": { @@ -573,13 +573,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "StateMachine": { @@ -595,7 +595,7 @@ "path": "s3stp-customLoggingBucket/test-s3-stepfunctions/test-s3-stepfunctions-event-rule-step-function-construct/StateMachine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -620,7 +620,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -688,19 +688,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -753,13 +753,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", - "version": "2.143.0" + "version": "2.147.3" } }, "EventsRuleRole": { @@ -771,7 +771,7 @@ "path": "s3stp-customLoggingBucket/test-s3-stepfunctions/test-s3-stepfunctions-event-rule-step-function-construct/EventsRuleRole/ImportEventsRuleRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -796,7 +796,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -831,19 +831,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "EventsRule": { @@ -892,13 +892,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionFailedAlarm": { @@ -931,13 +931,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionThrottledAlarm": { @@ -970,13 +970,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionAbortedAlarm": { @@ -1009,25 +1009,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-stepfunctions.EventbridgeToStepfunctions", - "version": "2.58.1" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-stepfunctions.S3ToStepfunctions", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3stp-customLoggingBucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1039,7 +1047,7 @@ "path": "s3stp-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1047,7 +1055,7 @@ "path": "s3stp-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1055,13 +1063,13 @@ "path": "s3stp-customLoggingBucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -1077,7 +1085,7 @@ "path": "s3stp-customLoggingBucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1116,7 +1124,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1149,19 +1157,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1169,7 +1177,7 @@ "path": "s3stp-customLoggingBucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -1203,7 +1211,7 @@ "path": "s3stp-customLoggingBucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1211,25 +1219,25 @@ "path": "s3stp-customLoggingBucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1237,7 +1245,7 @@ "path": "s3stp-customLoggingBucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1245,13 +1253,13 @@ "path": "s3stp-customLoggingBucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1265,7 +1273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/manifest.json index 9a8b14561..7a4e20f9c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/manifest.json @@ -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}/321222085c8c7f002041b0eced81b5535cff8223a5e65d8f90ee85f3c10fa864.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0d0198a097c38ad4a27f7ead67c551b926c3b9e4cbe1a1050e807432cb580a9d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -100,6 +100,12 @@ "data": "scrapBucketLogAutoDeleteObjectsCustomResource307F3D47" } ], + "/s3stp-pre-existing-bucket/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3stp-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/s3stp-pre-existing-bucket.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/s3stp-pre-existing-bucket.assets.json index 815021cf1..f1aac7956 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/s3stp-pre-existing-bucket.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/s3stp-pre-existing-bucket.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "321222085c8c7f002041b0eced81b5535cff8223a5e65d8f90ee85f3c10fa864": { + "0d0198a097c38ad4a27f7ead67c551b926c3b9e4cbe1a1050e807432cb580a9d": { "source": { "path": "s3stp-pre-existing-bucket.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "321222085c8c7f002041b0eced81b5535cff8223a5e65d8f90ee85f3c10fa864.json", + "objectKey": "0d0198a097c38ad4a27f7ead67c551b926c3b9e4cbe1a1050e807432cb580a9d.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/s3stp-pre-existing-bucket.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/s3stp-pre-existing-bucket.template.json index a665a81fe..960b5c20b 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/s3stp-pre-existing-bucket.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/s3stp-pre-existing-bucket.template.json @@ -205,7 +205,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -216,7 +216,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -919,6 +927,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/tree.json index 6f7659b39..9c5c21334 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-pre-existing-bucket.js.snapshot/tree.json @@ -40,7 +40,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -192,19 +192,27 @@ "path": "s3stp-pre-existing-bucket/scrapBucketLog/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3stp-pre-existing-bucket/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -216,7 +224,7 @@ "path": "s3stp-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -224,7 +232,7 @@ "path": "s3stp-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -232,13 +240,13 @@ "path": "s3stp-pre-existing-bucket/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "scrapBucket": { @@ -278,7 +286,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -376,13 +384,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -394,13 +402,13 @@ "path": "s3stp-pre-existing-bucket/scrapBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -412,7 +420,7 @@ "path": "s3stp-pre-existing-bucket/scrapBucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -424,7 +432,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -440,7 +448,7 @@ "path": "s3stp-pre-existing-bucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -479,7 +487,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -512,19 +520,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -532,7 +540,7 @@ "path": "s3stp-pre-existing-bucket/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -554,7 +562,7 @@ "path": "s3stp-pre-existing-bucket/lambdas3stp-test/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -593,13 +601,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -623,13 +631,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "tasks3stp-test": { @@ -637,7 +645,7 @@ "path": "s3stp-pre-existing-bucket/tasks3stp-test", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-stepfunctions-pre-existing-bucket-construct": { @@ -683,13 +691,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "StateMachine": { @@ -705,7 +713,7 @@ "path": "s3stp-pre-existing-bucket/test-s3-stepfunctions-pre-existing-bucket-construct/test-s3-stepfunctions-pre-existing-bucket-construct-event-rule-step-function-construct/StateMachine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -730,7 +738,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -798,19 +806,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -863,13 +871,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", - "version": "2.143.0" + "version": "2.147.3" } }, "EventsRuleRole": { @@ -881,7 +889,7 @@ "path": "s3stp-pre-existing-bucket/test-s3-stepfunctions-pre-existing-bucket-construct/test-s3-stepfunctions-pre-existing-bucket-construct-event-rule-step-function-construct/EventsRuleRole/ImportEventsRuleRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -906,7 +914,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -941,19 +949,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "EventsRule": { @@ -1002,13 +1010,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionFailedAlarm": { @@ -1041,13 +1049,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionThrottledAlarm": { @@ -1080,13 +1088,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionAbortedAlarm": { @@ -1119,25 +1127,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-stepfunctions.EventbridgeToStepfunctions", - "version": "2.58.1" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-stepfunctions.S3ToStepfunctions", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -1165,7 +1173,7 @@ "path": "s3stp-pre-existing-bucket/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1173,25 +1181,25 @@ "path": "s3stp-pre-existing-bucket/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1199,7 +1207,7 @@ "path": "s3stp-pre-existing-bucket/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1207,13 +1215,13 @@ "path": "s3stp-pre-existing-bucket/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1227,7 +1235,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js deleted file mode 100644 index 91d1f644d..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var I=Object.create,i=Object.defineProperty,C=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty,B=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=C(t,s))||r.enumerable});return e},l=(e,t,o)=>(o=e!=null?I(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>d(i({},"__esModule",{value:!0}),e),q={};B(q,{autoDeleteHandler:()=>S,handler:()=>F}),module.exports=L(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",k="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||k,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},r=m.parse(t.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),f={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await b({attempts:5,sleep:1e3},a.sendHttpRequest)(f,n)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function O(e,...t){console.log(e,...t)}function b(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),F=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await _(e)).PhysicalResourceId};case"Delete":return W(e.ResourceProperties?.BucketName)}}async function _(e){let t=e,o=t.OldResourceProperties?.BucketName;return{PhysicalResourceId:t.ResourceProperties?.BucketName??o}}async function U(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function W(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await N(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await U(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function N(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js new file mode 100644 index 000000000..2f92d06c1 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js @@ -0,0 +1 @@ +"use strict";var f=Object.create,i=Object.defineProperty,I=Object.getOwnPropertyDescriptor,C=Object.getOwnPropertyNames,w=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty,A=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of C(e))!P.call(t,s)&&s!==o&&i(t,s,{get:()=>e[s],enumerable:!(r=I(e,s))||r.enumerable});return t},l=(t,e,o)=>(o=t!=null?f(w(t)):{},d(e||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),B=t=>d(i({},"__esModule",{value:!0}),t),q={};A(q,{autoDeleteHandler:()=>S,handler:()=>H}),module.exports=B(q);var h=require("@aws-sdk/client-s3"),y=l(require("https")),m=l(require("url")),a={sendHttpRequest:D,log:T,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",L="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(t){return async(e,o)=>{let r={...e,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),e.RequestType==="Delete"&&e.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",e);return}try{let s=await t(r,o),n=k(e,s);await u("SUCCESS",n)}catch(s){let n={...e,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(e.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(e)}`)),await u("FAILED",n)}}}function k(t,e={}){let o=e.PhysicalResourceId??t.PhysicalResourceId??t.RequestId;if(t.RequestType==="Delete"&&o!==t.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${t.PhysicalResourceId}" to "${e.PhysicalResourceId}" during deletion`);return{...t,...e,PhysicalResourceId:o}}async function u(t,e){let o={Status:t,Reason:e.Reason??t,StackId:e.StackId,RequestId:e.RequestId,PhysicalResourceId:e.PhysicalResourceId||L,LogicalResourceId:e.LogicalResourceId,NoEcho:e.NoEcho,Data:e.Data},r=m.parse(e.ResponseURL),s=`${r.protocol}//${r.hostname}/${r.pathname}?***`;a.log("submit response to cloudformation",s,o);let n=JSON.stringify(o),E={hostname:r.hostname,path:r.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(n,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(E,n)}async function D(t,e){return new Promise((o,r)=>{try{let s=y.request(t,n=>{n.resume(),!n.statusCode||n.statusCode>=400?r(new Error(`Unsuccessful HTTP response: ${n.statusCode}`)):o()});s.on("error",r),s.write(e),s.end()}catch(s){r(s)}})}function T(t,...e){console.log(t,...e)}function O(t,e){return async(...o)=>{let r=t.attempts,s=t.sleep;for(;;)try{return await e(...o)}catch(n){if(r--<=0)throw n;await b(Math.floor(Math.random()*s)),s*=2}}}async function b(t){return new Promise(e=>setTimeout(e,t))}var g="aws-cdk:auto-delete-objects",x=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),H=R(S);async function S(t){switch(t.RequestType){case"Create":return;case"Update":return{PhysicalResourceId:(await F(t)).PhysicalResourceId};case"Delete":return N(t.ResourceProperties?.BucketName)}}async function F(t){let e=t,o=e.OldResourceProperties?.BucketName;return{PhysicalResourceId:e.ResourceProperties?.BucketName??o}}async function _(t){try{let e=(await c.getBucketPolicy({Bucket:t}))?.Policy??x,o=JSON.parse(e);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${t}/*`]}),await c.putBucketPolicy({Bucket:t,Policy:JSON.stringify(o)})}catch(e){if(e.name==="NoSuchBucket")throw e;console.log(`Could not set new object deny policy on bucket '${t}' prior to deletion.`)}}async function U(t){let e;do{e=await c.listObjectVersions({Bucket:t});let o=[...e.Versions??[],...e.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:t,Delete:{Objects:r}})}while(e?.IsTruncated)}async function N(t){if(!t)throw new Error("No BucketName was provided.");try{if(!await W(t)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await _(t),await U(t)}catch(e){if(e.name==="NoSuchBucket"){console.log(`Bucket '${t}' does not exist.`);return}throw e}}async function W(t){return(await c.getBucketTagging({Bucket:t})).TagSet?.some(o=>o.Key===g&&o.Value==="true")} diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/manifest.json index cda60db9b..12ab33c60 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/manifest.json @@ -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}/250c755aa29f7be2dcfff251099330c8857c0e2dd599c4e1356600e73a858990.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4d3b9da3f8f846f5b435f0e058fa1a952477858e47ac221757c82971189d07de.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -196,6 +196,12 @@ "data": "tests3stepfunctionsconstructtests3stepfunctionsconstructeventrulestepfunctionconstructExecutionAbortedAlarm8B04A073" } ], + "/s3stp-s3-stepfunctions-no-argument/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/s3stp-s3-stepfunctions-no-argument/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/s3stp-s3-stepfunctions-no-argument.assets.json b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/s3stp-s3-stepfunctions-no-argument.assets.json index e2b8aa05d..b2f1201ba 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/s3stp-s3-stepfunctions-no-argument.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/s3stp-s3-stepfunctions-no-argument.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4": { + "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6": { "source": { - "path": "asset.2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4", + "path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip", + "objectKey": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "250c755aa29f7be2dcfff251099330c8857c0e2dd599c4e1356600e73a858990": { + "4d3b9da3f8f846f5b435f0e058fa1a952477858e47ac221757c82971189d07de": { "source": { "path": "s3stp-s3-stepfunctions-no-argument.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "250c755aa29f7be2dcfff251099330c8857c0e2dd599c4e1356600e73a858990.json", + "objectKey": "4d3b9da3f8f846f5b435f0e058fa1a952477858e47ac221757c82971189d07de.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/s3stp-s3-stepfunctions-no-argument.template.json b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/s3stp-s3-stepfunctions-no-argument.template.json index 3fa058992..177fd05f7 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/s3stp-s3-stepfunctions-no-argument.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/s3stp-s3-stepfunctions-no-argument.template.json @@ -780,7 +780,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2eb6a831b107939f63cfebf68e6316e1a40f79fc99cae0fee9b333bac8d29bc4.zip" + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" }, "Timeout": 900, "MemorySize": 128, @@ -791,7 +791,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": { "Fn::Join": [ "", @@ -954,6 +962,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/tree.json index da1573912..ff4d186d4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-s3-stepfunctions/test/integ.s3stp-s3-stepfunctions-no-argument.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "s3stp-s3-stepfunctions-no-argument/lambdas3stp-test/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -60,13 +60,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -90,13 +90,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.147.3" } }, "tasks3stp-test": { @@ -104,7 +104,7 @@ "path": "s3stp-s3-stepfunctions-no-argument/tasks3stp-test", "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions_tasks.LambdaInvoke", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-stepfunctions-construct": { @@ -149,7 +149,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -283,13 +283,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -301,19 +301,19 @@ "path": "s3stp-s3-stepfunctions-no-argument/test-s3-stepfunctions-construct/S3LoggingBucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "S3Bucket": { @@ -372,7 +372,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.143.0" + "version": "2.147.3" } }, "Policy": { @@ -470,13 +470,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.143.0" + "version": "2.147.3" } }, "AutoDeleteObjectsCustomResource": { @@ -488,13 +488,13 @@ "path": "s3stp-s3-stepfunctions-no-argument/test-s3-stepfunctions-construct/S3Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Notifications": { @@ -506,7 +506,7 @@ "path": "s3stp-s3-stepfunctions-no-argument/test-s3-stepfunctions-construct/S3Bucket/Notifications/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -518,7 +518,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.143.0" + "version": "2.147.3" } }, "test-s3-stepfunctions-construct-event-rule-step-function-construct": { @@ -560,13 +560,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.143.0" + "version": "2.147.3" } }, "StateMachine": { @@ -582,7 +582,7 @@ "path": "s3stp-s3-stepfunctions-no-argument/test-s3-stepfunctions-construct/test-s3-stepfunctions-construct-event-rule-step-function-construct/StateMachine/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -607,7 +607,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -675,19 +675,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -740,13 +740,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.CfnStateMachine", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_stepfunctions.StateMachine", - "version": "2.143.0" + "version": "2.147.3" } }, "EventsRuleRole": { @@ -758,7 +758,7 @@ "path": "s3stp-s3-stepfunctions-no-argument/test-s3-stepfunctions-construct/test-s3-stepfunctions-construct-event-rule-step-function-construct/EventsRuleRole/ImportEventsRuleRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -783,7 +783,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -818,19 +818,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "EventsRule": { @@ -879,13 +879,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_events.Rule", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionFailedAlarm": { @@ -918,13 +918,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionThrottledAlarm": { @@ -957,13 +957,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } }, "ExecutionAbortedAlarm": { @@ -996,25 +996,33 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.CfnAlarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudwatch.Alarm", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-eventbridge-stepfunctions.EventbridgeToStepfunctions", - "version": "2.58.1" + "version": "2.60.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-s3-stepfunctions.S3ToStepfunctions", - "version": "2.58.1" + "version": "2.60.0" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "s3stp-s3-stepfunctions-no-argument/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::S3AutoDeleteObjectsCustomResourceProvider": { @@ -1026,7 +1034,7 @@ "path": "s3stp-s3-stepfunctions-no-argument/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.147.3" } }, "Role": { @@ -1034,7 +1042,7 @@ "path": "s3stp-s3-stepfunctions-no-argument/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } }, "Handler": { @@ -1042,13 +1050,13 @@ "path": "s3stp-s3-stepfunctions-no-argument/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.143.0" + "version": "2.147.3" } }, "BucketNotificationsHandler050a0587b7544547bf325f094a3db834": { @@ -1064,7 +1072,7 @@ "path": "s3stp-s3-stepfunctions-no-argument/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1103,7 +1111,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -1136,19 +1144,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.147.3" } }, "Resource": { @@ -1156,7 +1164,7 @@ "path": "s3stp-s3-stepfunctions-no-argument/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.143.0" + "version": "2.147.3" } } }, @@ -1190,7 +1198,7 @@ "path": "s3stp-s3-stepfunctions-no-argument/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1198,25 +1206,25 @@ "path": "s3stp-s3-stepfunctions-no-argument/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1224,7 +1232,7 @@ "path": "s3stp-s3-stepfunctions-no-argument/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1232,13 +1240,13 @@ "path": "s3stp-s3-stepfunctions-no-argument/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.147.3" } }, "Tree": { @@ -1252,7 +1260,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/manifest.json index dd005b753..c0738ff77 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/manifest.json @@ -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}/f4a0d2d3bfb6ba8d5f23c41116510655d01f30dc4b0acd9511d0fb46c4c2e592.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9eb1a098763fcdaf04fb1f796080bdd450a552537bd30a1c209987e2065ebd74.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/snslam-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/snslam-no-arguments.assets.json index b978511f6..a320c5eb4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/snslam-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/snslam-no-arguments.assets.json @@ -14,7 +14,7 @@ } } }, - "f4a0d2d3bfb6ba8d5f23c41116510655d01f30dc4b0acd9511d0fb46c4c2e592": { + "9eb1a098763fcdaf04fb1f796080bdd450a552537bd30a1c209987e2065ebd74": { "source": { "path": "snslam-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f4a0d2d3bfb6ba8d5f23c41116510655d01f30dc4b0acd9511d0fb46c4c2e592.json", + "objectKey": "9eb1a098763fcdaf04fb1f796080bdd450a552537bd30a1c209987e2065ebd74.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/snslam-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/snslam-no-arguments.template.json index 177ce69c2..cbac07f0f 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/snslam-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/snslam-no-arguments.template.json @@ -111,7 +111,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/tree.json index feecf49d1..1a0b7368a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "snslam-no-arguments/test-sns-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -120,19 +120,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -148,7 +148,7 @@ "path": "snslam-no-arguments/test-sns-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -156,13 +156,13 @@ "path": "snslam-no-arguments/test-sns-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -189,7 +189,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -197,7 +197,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "AllowInvoke:snslamnoargumentstestsnslambdaSnsTopicC2A35224": { @@ -221,7 +221,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "SnsTopic": { @@ -248,19 +248,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnSubscription", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Subscription", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "aws-managed-key": { @@ -268,7 +268,7 @@ "path": "snslam-no-arguments/test-sns-lambda/aws-managed-key", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "SnsTopic": { @@ -305,7 +305,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopic", - "version": "2.118.0" + "version": "2.145.0" } }, "Policy": { @@ -401,25 +401,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.CfnTopicPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.TopicPolicy", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sns.Topic", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-sns-lambda.SnsToLambda", - "version": "2.50.0" + "version": "2.60.0" } }, "Integ": { @@ -435,7 +435,7 @@ "path": "snslam-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -447,7 +447,7 @@ "path": "snslam-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -455,25 +455,25 @@ "path": "snslam-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -481,7 +481,7 @@ "path": "snslam-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -489,13 +489,13 @@ "path": "snslam-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -503,13 +503,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.ts b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.ts index a7c0e7f00..cda9fd640 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.ts +++ b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/integ.snslam-no-arguments.ts @@ -17,6 +17,7 @@ import { SnsToLambda, SnsToLambdaProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-sns-lambda'; // Definitions const props: SnsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) } diff --git a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/sns-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/sns-lambda.test.ts index 4a27165ec..7a31d6e14 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/sns-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-sns-lambda/test/sns-lambda.test.ts @@ -17,12 +17,13 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as sns from 'aws-cdk-lib/aws-sns'; import * as cdk from "aws-cdk-lib"; import { Template } from 'aws-cdk-lib/assertions'; +import * as defaults from '@aws-solutions-constructs/core'; function deployNewFunc(stack: cdk.Stack) { const props: SnsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, }; @@ -45,7 +46,7 @@ test('override topicProps', () => { const props: SnsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, topicProps: { @@ -71,7 +72,7 @@ test('provide existingTopicObj', () => { const props: SnsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingTopicObj: topic @@ -91,7 +92,7 @@ test('Topic is encrypted with imported CMK when set on encryptionKey prop', () = const props: SnsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, encryptionKey: cmk @@ -116,7 +117,7 @@ test('Topic is encrypted with imported CMK when set on topicProps.masterKey prop const props: SnsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, topicProps: { @@ -143,7 +144,7 @@ test('Topic is encrypted with provided encryptionKeyProps', () => { const props: SnsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, encryptionKeyProps: { @@ -180,7 +181,7 @@ test('Topic is encrypted by default with AWS-managed KMS key when no other encry const props: SnsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, }; @@ -218,7 +219,7 @@ test('Topic is encrypted with customer managed KMS Key when enable encryption fl const props: SnsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, enableEncryptionWithCustomerManagedKey: true @@ -247,7 +248,7 @@ test('Confirm CheckSnsProps is getting called', () => { const props: SnsToLambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }, existingTopicObj: topic, @@ -268,14 +269,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new cdk.Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: SnsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/manifest.json index 742730ec5..39a7a6cff 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/manifest.json @@ -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}/e47c20b30441b9b71ed887814b909fda83cd60f42a9103fd43d75f13ea29307c.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/35add2efd3cc64b582ce244600a20122855cae3309add055fbbbcb9c1ff23831.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -141,24 +141,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testsqslambdafifodeadLetterQueue99A41920": [ - { - "type": "aws:cdk:logicalId", - "data": "testsqslambdafifodeadLetterQueue99A41920", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "testsqslambdafifodeadLetterQueuePolicy32FA63A7": [ - { - "type": "aws:cdk:logicalId", - "data": "testsqslambdafifodeadLetterQueuePolicy32FA63A7", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "sqslam-deployFifoQueue" diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/sqslam-deployFifoQueue.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/sqslam-deployFifoQueue.assets.json index 317f19ba8..673ffbffe 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/sqslam-deployFifoQueue.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/sqslam-deployFifoQueue.assets.json @@ -14,7 +14,7 @@ } } }, - "e47c20b30441b9b71ed887814b909fda83cd60f42a9103fd43d75f13ea29307c": { + "35add2efd3cc64b582ce244600a20122855cae3309add055fbbbcb9c1ff23831": { "source": { "path": "sqslam-deployFifoQueue.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e47c20b30441b9b71ed887814b909fda83cd60f42a9103fd43d75f13ea29307c.json", + "objectKey": "35add2efd3cc64b582ce244600a20122855cae3309add055fbbbcb9c1ff23831.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/sqslam-deployFifoQueue.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/sqslam-deployFifoQueue.template.json index 341108467..9d4e52b14 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/sqslam-deployFifoQueue.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/sqslam-deployFifoQueue.template.json @@ -127,7 +127,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/tree.json index 0863eb3ac..b42927b36 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "sqslam-deployFifoQueue/test-sqs-lambda-fifo/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -136,19 +136,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -164,7 +164,7 @@ "path": "sqslam-deployFifoQueue/test-sqs-lambda-fifo/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -172,13 +172,13 @@ "path": "sqslam-deployFifoQueue/test-sqs-lambda-fifo/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -205,7 +205,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -213,7 +213,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } }, "SqsEventSource:sqslamdeployFifoQueuetestsqslambdafifoqueue471FB916": { @@ -239,19 +239,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "queue-dlq": { @@ -271,7 +271,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -354,19 +354,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "queue": { @@ -395,7 +395,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -478,25 +478,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-sqs-lambda.SqsToLambda", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -524,7 +524,7 @@ "path": "sqslam-deployFifoQueue/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -532,25 +532,25 @@ "path": "sqslam-deployFifoQueue/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -558,7 +558,7 @@ "path": "sqslam-deployFifoQueue/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -566,13 +566,13 @@ "path": "sqslam-deployFifoQueue/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -586,7 +586,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.ts index 6549ef3fa..e2b273e8a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.ts +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFifoQueue.ts @@ -17,6 +17,7 @@ import { SqsToLambda, SqsToLambdaProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-sqs-lambda with FI // Definitions const props: SqsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/manifest.json index c97993925..e0c71dcf1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/manifest.json @@ -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}/a41bc1adbd52de957b9441d9d12bcfa4eb34856f44b23f6d930bc1cf7ed26984.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4f0414c3daccad720e0ada8056f4114b0477a3f242369fe6ecd5975ad3f4077a.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -141,24 +141,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testsqslambdadeadLetterQueue85BDB0A3": [ - { - "type": "aws:cdk:logicalId", - "data": "testsqslambdadeadLetterQueue85BDB0A3", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "testsqslambdadeadLetterQueuePolicy8C08D1A5": [ - { - "type": "aws:cdk:logicalId", - "data": "testsqslambdadeadLetterQueuePolicy8C08D1A5", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "sqslam-deployFunction" diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/sqslam-deployFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/sqslam-deployFunction.assets.json index f03ce72a5..0dcc85c87 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/sqslam-deployFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/sqslam-deployFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "a41bc1adbd52de957b9441d9d12bcfa4eb34856f44b23f6d930bc1cf7ed26984": { + "4f0414c3daccad720e0ada8056f4114b0477a3f242369fe6ecd5975ad3f4077a": { "source": { "path": "sqslam-deployFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "a41bc1adbd52de957b9441d9d12bcfa4eb34856f44b23f6d930bc1cf7ed26984.json", + "objectKey": "4f0414c3daccad720e0ada8056f4114b0477a3f242369fe6ecd5975ad3f4077a.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/sqslam-deployFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/sqslam-deployFunction.template.json index cd687536c..7540201fa 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/sqslam-deployFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/sqslam-deployFunction.template.json @@ -127,7 +127,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/tree.json index 13fb511eb..94b41aa3a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "sqslam-deployFunction/test-sqs-lambda/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -84,7 +84,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -136,19 +136,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -164,7 +164,7 @@ "path": "sqslam-deployFunction/test-sqs-lambda/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -172,13 +172,13 @@ "path": "sqslam-deployFunction/test-sqs-lambda/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -205,7 +205,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -213,7 +213,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } }, "SqsEventSource:sqslamdeployFunctiontestsqslambdaqueueAA417393": { @@ -239,19 +239,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "queue-dlq": { @@ -269,7 +269,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -352,19 +352,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "queue": { @@ -391,7 +391,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -474,25 +474,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-sqs-lambda.SqsToLambda", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -520,7 +520,7 @@ "path": "sqslam-deployFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -528,25 +528,25 @@ "path": "sqslam-deployFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -554,7 +554,7 @@ "path": "sqslam-deployFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -562,13 +562,13 @@ "path": "sqslam-deployFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -582,7 +582,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.ts index 283449aad..3ca17ba3e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-deployFunction.ts @@ -17,6 +17,7 @@ import { SqsToLambda, SqsToLambdaProps } from "../lib"; import * as lambda from 'aws-cdk-lib/aws-lambda'; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as defaults from '@aws-solutions-constructs/core'; // Setup const app = new App(); @@ -26,7 +27,7 @@ stack.templateOptions.description = 'Integration Test for aws-sqs-lambda'; // Definitions const props: SqsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/manifest.json index 47de05a3d..6bd5011f6 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/manifest.json @@ -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}/77b08678205177f917362bae22e1c280f8f231c3ca2ce8a1d8ce2180f757fb0d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/2e915926446c57441ea0a3551bb3d8c1faac537920e27f5080b5dc9749849b97.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -141,24 +141,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "testsqslambdadeadLetterQueue85BDB0A3": [ - { - "type": "aws:cdk:logicalId", - "data": "testsqslambdadeadLetterQueue85BDB0A3", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "testsqslambdadeadLetterQueuePolicy8C08D1A5": [ - { - "type": "aws:cdk:logicalId", - "data": "testsqslambdadeadLetterQueuePolicy8C08D1A5", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "sqslam-existingFunction" diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/sqslam-existingFunction.assets.json b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/sqslam-existingFunction.assets.json index 060efee7b..72a937fc0 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/sqslam-existingFunction.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/sqslam-existingFunction.assets.json @@ -14,7 +14,7 @@ } } }, - "77b08678205177f917362bae22e1c280f8f231c3ca2ce8a1d8ce2180f757fb0d": { + "2e915926446c57441ea0a3551bb3d8c1faac537920e27f5080b5dc9749849b97": { "source": { "path": "sqslam-existingFunction.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "77b08678205177f917362bae22e1c280f8f231c3ca2ce8a1d8ce2180f757fb0d.json", + "objectKey": "2e915926446c57441ea0a3551bb3d8c1faac537920e27f5080b5dc9749849b97.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/sqslam-existingFunction.template.json b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/sqslam-existingFunction.template.json index 36127def5..897e1f730 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/sqslam-existingFunction.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/sqslam-existingFunction.template.json @@ -127,7 +127,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/tree.json index 677b496a7..3abdd56d3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "sqslam-existingFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -80,7 +80,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.143.0" + "version": "2.145.0" } }, "DefaultPolicy": { @@ -132,19 +132,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.143.0" + "version": "2.145.0" } }, "LambdaFunction": { @@ -160,7 +160,7 @@ "path": "sqslam-existingFunction/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.143.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -168,13 +168,13 @@ "path": "sqslam-existingFunction/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.143.0" + "version": "2.145.0" } }, "Resource": { @@ -201,7 +201,7 @@ "Arn" ] }, - "runtime": "nodejs16.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -209,7 +209,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.143.0" + "version": "2.145.0" } }, "SqsEventSource:sqslamexistingFunctiontestsqslambdaqueue16552447": { @@ -235,19 +235,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnEventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.EventSourceMapping", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.143.0" + "version": "2.145.0" } }, "test-sqs-lambda": { @@ -269,7 +269,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -352,19 +352,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } }, "queue": { @@ -391,7 +391,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueue", - "version": "2.143.0" + "version": "2.145.0" } }, "Policy": { @@ -474,25 +474,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.QueuePolicy", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_sqs.Queue", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-sqs-lambda.SqsToLambda", - "version": "2.58.1" + "version": "2.60.0" } }, "Integ": { @@ -520,7 +520,7 @@ "path": "sqslam-existingFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -528,25 +528,25 @@ "path": "sqslam-existingFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.143.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -554,7 +554,7 @@ "path": "sqslam-existingFunction/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.143.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -562,13 +562,13 @@ "path": "sqslam-existingFunction/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.143.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.143.0" + "version": "2.145.0" } }, "Tree": { @@ -582,7 +582,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.143.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.ts index 8868d5979..0652d3560 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.ts +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/integ.sqslam-existingFunction.ts @@ -26,7 +26,7 @@ stack.templateOptions.description = 'Integration Test for aws-sqs-lambda'; // Definitions const lambdaFunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/test.sqs-lambda.test.ts b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/test.sqs-lambda.test.ts index d115d5efa..57e5b3ba4 100644 --- a/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/test.sqs-lambda.test.ts +++ b/source/patterns/@aws-solutions-constructs/aws-sqs-lambda/test/test.sqs-lambda.test.ts @@ -18,13 +18,14 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as sqs from 'aws-cdk-lib/aws-sqs'; import { Template } from 'aws-cdk-lib/assertions'; import * as kms from 'aws-cdk-lib/aws-kms'; +import * as defaults from '@aws-solutions-constructs/core'; test('Pattern deployment w/ new Lambda function and overridden props', () => { // Initial Setup const stack = new Stack(); const props: SqsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -57,7 +58,7 @@ test('Test getter methods', () => { const stack = new Stack(); const props: SqsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -110,7 +111,7 @@ test('Pattern deployment w/ batch size', () => { const stack = new Stack(); const props: SqsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, @@ -132,7 +133,7 @@ test('Queue is encrypted with imported CMK when set on encryptionKey prop', () = const cmk = new kms.Key(stack, 'cmk'); new SqsToLambda(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -159,7 +160,7 @@ test('Queue is encrypted with imported CMK when set on queueProps.encryptionMast const cmk = new kms.Key(stack, 'cmk'); new SqsToLambda(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -187,7 +188,7 @@ test('Queue is encrypted with provided encryptionKeyProps', () => { new SqsToLambda(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -225,7 +226,7 @@ test('Queue is encrypted by default with SQS-managed KMS key when no other encry new SqsToLambda(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -245,7 +246,7 @@ test('Queue is encrypted with customer managed KMS Key when enable encryption fl new SqsToLambda(stack, 'test-construct', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), environment: { @@ -271,7 +272,7 @@ test('Confirm CheckSqsProps is called', () => { const stack = new Stack(); const props: SqsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }, @@ -291,14 +292,14 @@ test('Confirm call to CheckLambdaProps', () => { // Initial Setup const stack = new Stack(); const lambdaFunction = new lambda.Function(stack, 'a-function', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); const props: SqsToLambdaProps = { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }, diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js deleted file mode 100644 index 5a1714e02..000000000 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data};exports.external.log("submit response to cloudformation",json);const responseBody=JSON.stringify(json),parsedUrl=url.parse(event.ResponseURL),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,responseBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,_=>resolve());request.on("error",reject),request.write(responseBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js new file mode 100644 index 000000000..c6d62cd07 --- /dev/null +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.withRetries=exports.handler=exports.external=void 0;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}exports.handler=handler;function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)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))} diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js similarity index 100% rename from source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js rename to source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/index.js diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/manifest.json index 9cdd999d6..ec7dd1443 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/manifest.json @@ -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}/aadfc291a1090dda8cd0e9fb7077bee7f01815b5865dccc1d5d722e266a05dbd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/080bee2977522331a94a91ec76e4a29b7eea531bd84c69bd86ff7ddee0810b9e.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -250,6 +250,12 @@ "data": "VpcFlowLog8FF33A73" } ], + "/wafalb-no-arguments/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/wafalb-no-arguments/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/tree.json index 79913139f..8a05c560a 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/tree.json @@ -32,7 +32,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPC", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet1": { @@ -76,7 +76,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -84,7 +84,7 @@ "path": "wafalb-no-arguments/Vpc/PublicSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -106,7 +106,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -125,7 +125,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -145,7 +145,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -165,7 +165,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -193,13 +193,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PublicSubnet2": { @@ -243,7 +243,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -251,7 +251,7 @@ "path": "wafalb-no-arguments/Vpc/PublicSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -273,7 +273,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -292,7 +292,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -312,7 +312,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } }, "EIP": { @@ -332,7 +332,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnEIP", - "version": "2.118.0" + "version": "2.147.3" } }, "NATGateway": { @@ -360,13 +360,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnNatGateway", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet1": { @@ -410,7 +410,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -418,7 +418,7 @@ "path": "wafalb-no-arguments/Vpc/PrivateSubnet1/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -440,7 +440,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -459,7 +459,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -479,13 +479,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "PrivateSubnet2": { @@ -529,7 +529,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "Acl": { @@ -537,7 +537,7 @@ "path": "wafalb-no-arguments/Vpc/PrivateSubnet2/Acl", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTable": { @@ -559,7 +559,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable", - "version": "2.118.0" + "version": "2.147.3" } }, "RouteTableAssociation": { @@ -578,7 +578,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultRoute": { @@ -598,13 +598,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnRoute", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.PrivateSubnet", - "version": "2.118.0" + "version": "2.147.3" } }, "IGW": { @@ -623,7 +623,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway", - "version": "2.118.0" + "version": "2.147.3" } }, "VPCGW": { @@ -642,7 +642,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment", - "version": "2.118.0" + "version": "2.147.3" } }, "RestrictDefaultSecurityGroupCustomResource": { @@ -654,13 +654,13 @@ "path": "wafalb-no-arguments/Vpc/RestrictDefaultSecurityGroupCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -676,7 +676,7 @@ "path": "wafalb-no-arguments/Vpc/FlowLog/IAMRole/ImportIAMRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.147.3" } }, "Resource": { @@ -707,7 +707,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -759,19 +759,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.147.3" } }, "LogGroup": { @@ -795,13 +795,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_logs.LogGroup", - "version": "2.118.0" + "version": "2.147.3" } }, "FlowLog": { @@ -835,19 +835,27 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnFlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.FlowLog", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.Vpc", - "version": "2.118.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "wafalb-no-arguments/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "Custom::VpcRestrictDefaultSGCustomResourceProvider": { @@ -859,7 +867,7 @@ "path": "wafalb-no-arguments/Custom::VpcRestrictDefaultSGCustomResourceProvider/Staging", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.147.3" } }, "Role": { @@ -867,7 +875,7 @@ "path": "wafalb-no-arguments/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } }, "Handler": { @@ -875,13 +883,13 @@ "path": "wafalb-no-arguments/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResourceProviderBase", - "version": "2.118.0" + "version": "2.147.3" } }, "new-lb": { @@ -922,7 +930,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.CfnLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "SecurityGroup": { @@ -952,19 +960,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.CfnSecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_ec2.SecurityGroup", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationLoadBalancer", - "version": "2.118.0" + "version": "2.147.3" } }, "test-wafwebacl-alb": { @@ -1118,13 +1126,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_wafv2.CfnWebACL", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-wafwebacl-alb.WafwebaclToAlb", - "version": "2.51.0" + "version": "2.60.0" } }, "test-wafwebacl-alb-WebACLAssociation": { @@ -1146,7 +1154,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_wafv2.CfnWebACLAssociation", - "version": "2.118.0" + "version": "2.147.3" } }, "Integ": { @@ -1174,7 +1182,7 @@ "path": "wafalb-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1182,25 +1190,25 @@ "path": "wafalb-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -1208,7 +1216,7 @@ "path": "wafalb-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -1216,13 +1224,13 @@ "path": "wafalb-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.147.3" } }, "Tree": { @@ -1236,7 +1244,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/wafalb-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/wafalb-no-arguments.assets.json index a8e1cd074..ae82de5cf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/wafalb-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/wafalb-no-arguments.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e": { + "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a": { "source": { - "path": "asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e", + "path": "asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip", + "objectKey": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "aadfc291a1090dda8cd0e9fb7077bee7f01815b5865dccc1d5d722e266a05dbd": { + "080bee2977522331a94a91ec76e4a29b7eea531bd84c69bd86ff7ddee0810b9e": { "source": { "path": "wafalb-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "aadfc291a1090dda8cd0e9fb7077bee7f01815b5865dccc1d5d722e266a05dbd.json", + "objectKey": "080bee2977522331a94a91ec76e4a29b7eea531bd84c69bd86ff7ddee0810b9e.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/wafalb-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/wafalb-no-arguments.template.json index dbb208606..afbb5d751 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/wafalb-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-alb/test/integ.wafalb-no-arguments.js.snapshot/wafalb-no-arguments.template.json @@ -622,7 +622,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e.zip" + "S3Key": "ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a.zip" }, "Timeout": 900, "MemorySize": 128, @@ -633,7 +633,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group" }, "DependsOn": [ @@ -882,6 +890,115 @@ } } }, + "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/manifest.json index b96edf426..6ab82bc53 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/manifest.json @@ -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}/6fc46fa3c15c767df1e380b7179a372404c7c9e7f44aa31e3824678b1bc38cbd.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/3f84e40d9d399301af25da032883981e0799b236578b402199f331b54f5ca5dd.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/tree.json index e01fc2e68..5099e5fdf 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testOneFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -60,13 +60,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "Code": { @@ -78,7 +78,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testOneFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -86,13 +86,13 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testOneFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -114,18 +114,18 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "testOne-authorizerAuthFunction": { @@ -141,7 +141,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testOne-authorizerAuthFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -180,13 +180,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "Code": { @@ -198,7 +198,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testOne-authorizerAuthFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -206,13 +206,13 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testOne-authorizerAuthFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -234,12 +234,12 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "wafapiexistingwaftomultiplegatewaystestOneauthorizer7F4D0710:Permissions": { @@ -287,13 +287,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "testOne-authorizer": { @@ -366,13 +366,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAuthorizer", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.RequestAuthorizer", - "version": "2.118.0" + "version": "2.145.0" } }, "testOneApi": { @@ -390,7 +390,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "Deployment": { @@ -411,13 +411,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.118.0" + "version": "2.145.0" } }, "DeploymentStage.prod": { @@ -441,13 +441,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.118.0" + "version": "2.145.0" } }, "Endpoint": { @@ -455,7 +455,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testOneApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.118.0" + "version": "2.145.0" } }, "Default": { @@ -486,7 +486,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -539,7 +539,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.wafapiexistingwaftomultiplegatewaystestOneApiB9044B59.ANY..{proxy+}": { @@ -584,7 +584,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -635,19 +635,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ProxyResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -700,7 +700,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.wafapiexistingwaftomultiplegatewaystestOneApiB9044B59.ANY..": { @@ -745,7 +745,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -799,25 +799,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.LambdaRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "testTwoFunction": { @@ -833,7 +833,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testTwoFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -872,13 +872,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "Code": { @@ -890,7 +890,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testTwoFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -898,13 +898,13 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testTwoFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -926,18 +926,18 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "testTwo-authorizerAuthFunction": { @@ -953,7 +953,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testTwo-authorizerAuthFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -992,13 +992,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "Code": { @@ -1010,7 +1010,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testTwo-authorizerAuthFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -1018,13 +1018,13 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testTwo-authorizerAuthFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -1046,12 +1046,12 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "wafapiexistingwaftomultiplegatewaystestTwoauthorizer9B2C525E:Permissions": { @@ -1099,13 +1099,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "testTwo-authorizer": { @@ -1178,13 +1178,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAuthorizer", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.RequestAuthorizer", - "version": "2.118.0" + "version": "2.145.0" } }, "testTwoApi": { @@ -1202,7 +1202,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "Deployment": { @@ -1223,13 +1223,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.118.0" + "version": "2.145.0" } }, "DeploymentStage.prod": { @@ -1253,13 +1253,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.118.0" + "version": "2.145.0" } }, "Endpoint": { @@ -1267,7 +1267,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/testTwoApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.118.0" + "version": "2.145.0" } }, "Default": { @@ -1298,7 +1298,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -1351,7 +1351,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.wafapiexistingwaftomultiplegatewaystestTwoApi3F5A8986.ANY..{proxy+}": { @@ -1396,7 +1396,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -1447,19 +1447,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ProxyResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -1512,7 +1512,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.wafapiexistingwaftomultiplegatewaystestTwoApi3F5A8986.ANY..": { @@ -1557,7 +1557,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -1611,25 +1611,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.LambdaRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "first-construct": { @@ -1783,13 +1783,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_wafv2.CfnWebACL", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-wafwebacl-apigateway.WafwebaclToApiGateway", - "version": "2.50.0" + "version": "2.60.0" } }, "first-construct-WebACLAssociation": { @@ -1831,7 +1831,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_wafv2.CfnWebACLAssociation", - "version": "2.118.0" + "version": "2.145.0" } }, "second-construct": { @@ -1839,7 +1839,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/second-construct", "constructInfo": { "fqn": "@aws-solutions-constructs/aws-wafwebacl-apigateway.WafwebaclToApiGateway", - "version": "2.50.0" + "version": "2.60.0" } }, "second-construct-WebACLAssociation": { @@ -1881,7 +1881,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_wafv2.CfnWebACLAssociation", - "version": "2.118.0" + "version": "2.145.0" } }, "Integ": { @@ -1897,7 +1897,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -1909,7 +1909,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1917,25 +1917,25 @@ "path": "wafapi-existing-waf-to-multiple-gateways/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -1943,7 +1943,7 @@ "path": "wafapi-existing-waf-to-multiple-gateways/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1951,13 +1951,13 @@ "path": "wafapi-existing-waf-to-multiple-gateways/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -1965,13 +1965,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/wafapi-existing-waf-to-multiple-gateways.assets.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/wafapi-existing-waf-to-multiple-gateways.assets.json index 5f58822c8..f302c4fdb 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/wafapi-existing-waf-to-multiple-gateways.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/wafapi-existing-waf-to-multiple-gateways.assets.json @@ -14,7 +14,7 @@ } } }, - "6fc46fa3c15c767df1e380b7179a372404c7c9e7f44aa31e3824678b1bc38cbd": { + "3f84e40d9d399301af25da032883981e0799b236578b402199f331b54f5ca5dd": { "source": { "path": "wafapi-existing-waf-to-multiple-gateways.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6fc46fa3c15c767df1e380b7179a372404c7c9e7f44aa31e3824678b1bc38cbd.json", + "objectKey": "3f84e40d9d399301af25da032883981e0799b236578b402199f331b54f5ca5dd.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/wafapi-existing-waf-to-multiple-gateways.template.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/wafapi-existing-waf-to-multiple-gateways.template.json index 8b994cffd..178e27ed8 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/wafapi-existing-waf-to-multiple-gateways.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-existing-waf-to-multiple-gateways.js.snapshot/wafapi-existing-waf-to-multiple-gateways.template.json @@ -47,7 +47,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "testOneFunctionServiceRole3F9CD9E7" @@ -118,7 +118,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "testOneauthorizerAuthFunctionServiceRoleE1B4208E" @@ -627,7 +627,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "testTwoFunctionServiceRoleF678C905" @@ -698,7 +698,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "testTwoauthorizerAuthFunctionServiceRole4C3292A3" diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/manifest.json index f7505145e..7dd6ebf4e 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/manifest.json @@ -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}/0a2e4e01402e849e6312aaaef8592b9ab8cdc6bf927accfcb3a399709831b80d.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/99bfbbcd252271f1265c514b9fd7b4c7152f6d71f0f35c500f18b8287d3c3afd.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/tree.json index 2b1edc101..2876ff316 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "wafapi-no-arguments/testFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -60,13 +60,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "Code": { @@ -78,7 +78,7 @@ "path": "wafapi-no-arguments/testFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -86,13 +86,13 @@ "path": "wafapi-no-arguments/testFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -114,18 +114,18 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "test-authorizerAuthFunction": { @@ -141,7 +141,7 @@ "path": "wafapi-no-arguments/test-authorizerAuthFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -180,13 +180,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "Code": { @@ -198,7 +198,7 @@ "path": "wafapi-no-arguments/test-authorizerAuthFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -206,13 +206,13 @@ "path": "wafapi-no-arguments/test-authorizerAuthFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -234,12 +234,12 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "wafapinoargumentstestauthorizerB886165D:Permissions": { @@ -287,13 +287,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "test-authorizer": { @@ -366,13 +366,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAuthorizer", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.RequestAuthorizer", - "version": "2.118.0" + "version": "2.145.0" } }, "testApi": { @@ -390,7 +390,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "Deployment": { @@ -411,13 +411,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.118.0" + "version": "2.145.0" } }, "DeploymentStage.prod": { @@ -441,13 +441,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.118.0" + "version": "2.145.0" } }, "Endpoint": { @@ -455,7 +455,7 @@ "path": "wafapi-no-arguments/testApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.118.0" + "version": "2.145.0" } }, "Default": { @@ -486,7 +486,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -539,7 +539,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.wafapinoargumentstestApi4B407520.ANY..{proxy+}": { @@ -584,7 +584,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -635,19 +635,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ProxyResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -700,7 +700,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.wafapinoargumentstestApi4B407520.ANY..": { @@ -745,7 +745,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -799,25 +799,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.LambdaRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "test-wafwebacl-apigateway-lambda": { @@ -971,13 +971,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_wafv2.CfnWebACL", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-wafwebacl-apigateway.WafwebaclToApiGateway", - "version": "2.50.0" + "version": "2.60.0" } }, "test-wafwebacl-apigateway-lambda-WebACLAssociation": { @@ -1019,7 +1019,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_wafv2.CfnWebACLAssociation", - "version": "2.118.0" + "version": "2.145.0" } }, "Integ": { @@ -1035,7 +1035,7 @@ "path": "wafapi-no-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -1047,7 +1047,7 @@ "path": "wafapi-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1055,25 +1055,25 @@ "path": "wafapi-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -1081,7 +1081,7 @@ "path": "wafapi-no-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1089,13 +1089,13 @@ "path": "wafapi-no-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -1103,13 +1103,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/wafapi-no-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/wafapi-no-arguments.assets.json index 0bf45c43d..6398c95d3 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/wafapi-no-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/wafapi-no-arguments.assets.json @@ -14,7 +14,7 @@ } } }, - "0a2e4e01402e849e6312aaaef8592b9ab8cdc6bf927accfcb3a399709831b80d": { + "99bfbbcd252271f1265c514b9fd7b4c7152f6d71f0f35c500f18b8287d3c3afd": { "source": { "path": "wafapi-no-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "0a2e4e01402e849e6312aaaef8592b9ab8cdc6bf927accfcb3a399709831b80d.json", + "objectKey": "99bfbbcd252271f1265c514b9fd7b4c7152f6d71f0f35c500f18b8287d3c3afd.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/wafapi-no-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/wafapi-no-arguments.template.json index 5d85a7913..64c6059d1 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/wafapi-no-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-no-arguments.js.snapshot/wafapi-no-arguments.template.json @@ -47,7 +47,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "testFunctionServiceRoleFEC29B6F" @@ -118,7 +118,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "testauthorizerAuthFunctionServiceRole6F05059E" diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/manifest.json index 776220b20..d6a5565cd 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/manifest.json @@ -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}/5b9a730a2192738e3fbd40e2e86b387a648e7d59315019fbdf280fb74b61fa7f.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/110061d7686e7a934fddcff27ae0ee2106fe98169112ce8f14e8cadebf3e6533.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/tree.json index deaeb9bd8..a2e157b6d 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/tree.json @@ -21,7 +21,7 @@ "path": "wafapi-partial-arguments/testFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -60,13 +60,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "Code": { @@ -78,7 +78,7 @@ "path": "wafapi-partial-arguments/testFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -86,13 +86,13 @@ "path": "wafapi-partial-arguments/testFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -114,18 +114,18 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "test-authorizerAuthFunction": { @@ -141,7 +141,7 @@ "path": "wafapi-partial-arguments/test-authorizerAuthFunction/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -180,13 +180,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.118.0" + "version": "2.145.0" } }, "Code": { @@ -198,7 +198,7 @@ "path": "wafapi-partial-arguments/test-authorizerAuthFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.118.0" + "version": "2.145.0" } }, "AssetBucket": { @@ -206,13 +206,13 @@ "path": "wafapi-partial-arguments/test-authorizerAuthFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -234,12 +234,12 @@ "Arn" ] }, - "runtime": "nodejs16.x" + "runtime": "nodejs20.x" } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.118.0" + "version": "2.145.0" } }, "wafapipartialargumentstestauthorizerDC0C2973:Permissions": { @@ -287,13 +287,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.118.0" + "version": "2.145.0" } }, "test-authorizer": { @@ -366,13 +366,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnAuthorizer", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.RequestAuthorizer", - "version": "2.118.0" + "version": "2.145.0" } }, "testApi": { @@ -390,7 +390,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "Deployment": { @@ -411,13 +411,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnDeployment", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Deployment", - "version": "2.118.0" + "version": "2.145.0" } }, "DeploymentStage.prod": { @@ -441,13 +441,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnStage", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Stage", - "version": "2.118.0" + "version": "2.145.0" } }, "Endpoint": { @@ -455,7 +455,7 @@ "path": "wafapi-partial-arguments/testApi/Endpoint", "constructInfo": { "fqn": "aws-cdk-lib.CfnOutput", - "version": "2.118.0" + "version": "2.145.0" } }, "Default": { @@ -486,7 +486,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -539,7 +539,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.wafapipartialargumentstestApi4A48F3FB.ANY..{proxy+}": { @@ -584,7 +584,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -635,19 +635,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ProxyResource", - "version": "2.118.0" + "version": "2.145.0" } }, "ANY": { @@ -700,7 +700,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "ApiPermission.Test.wafapipartialargumentstestApi4A48F3FB.ANY..": { @@ -745,7 +745,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnPermission", - "version": "2.118.0" + "version": "2.145.0" } }, "Resource": { @@ -799,25 +799,25 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.CfnMethod", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.Method", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.ResourceBase", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_apigateway.LambdaRestApi", - "version": "2.118.0" + "version": "2.145.0" } }, "test-wafwebacl-apigateway-lambda": { @@ -972,13 +972,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_wafv2.CfnWebACL", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-solutions-constructs/aws-wafwebacl-apigateway.WafwebaclToApiGateway", - "version": "2.50.0" + "version": "2.60.0" } }, "test-wafwebacl-apigateway-lambda-WebACLAssociation": { @@ -1020,7 +1020,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_wafv2.CfnWebACLAssociation", - "version": "2.118.0" + "version": "2.145.0" } }, "Integ": { @@ -1036,7 +1036,7 @@ "path": "wafapi-partial-arguments/Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } }, "DeployAssert": { @@ -1048,7 +1048,7 @@ "path": "wafapi-partial-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1056,25 +1056,25 @@ "path": "wafapi-partial-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.118.0-alpha.0" + "version": "2.145.0-alpha.0" } }, "BootstrapVersion": { @@ -1082,7 +1082,7 @@ "path": "wafapi-partial-arguments/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.118.0" + "version": "2.145.0" } }, "CheckBootstrapVersion": { @@ -1090,13 +1090,13 @@ "path": "wafapi-partial-arguments/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.118.0" + "version": "2.145.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.118.0" + "version": "2.145.0" } }, "Tree": { @@ -1104,13 +1104,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.0" + "version": "10.3.0" } } }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.118.0" + "version": "2.145.0" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/wafapi-partial-arguments.assets.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/wafapi-partial-arguments.assets.json index b91842d2c..1d5faaf93 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/wafapi-partial-arguments.assets.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/wafapi-partial-arguments.assets.json @@ -14,7 +14,7 @@ } } }, - "5b9a730a2192738e3fbd40e2e86b387a648e7d59315019fbdf280fb74b61fa7f": { + "110061d7686e7a934fddcff27ae0ee2106fe98169112ce8f14e8cadebf3e6533": { "source": { "path": "wafapi-partial-arguments.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "5b9a730a2192738e3fbd40e2e86b387a648e7d59315019fbdf280fb74b61fa7f.json", + "objectKey": "110061d7686e7a934fddcff27ae0ee2106fe98169112ce8f14e8cadebf3e6533.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/wafapi-partial-arguments.template.json b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/wafapi-partial-arguments.template.json index b9cd6d779..838d0599c 100644 --- a/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/wafapi-partial-arguments.template.json +++ b/source/patterns/@aws-solutions-constructs/aws-wafwebacl-apigateway/test/integ.wafapi-partial-arguments.js.snapshot/wafapi-partial-arguments.template.json @@ -47,7 +47,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "testFunctionServiceRoleFEC29B6F" @@ -118,7 +118,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x" + "Runtime": "nodejs20.x" }, "DependsOn": [ "testauthorizerAuthFunctionServiceRole6F05059E" diff --git a/source/patterns/@aws-solutions-constructs/core/lib/lambda-helper.ts b/source/patterns/@aws-solutions-constructs/core/lib/lambda-helper.ts index 4ddf77338..fc4fe355e 100644 --- a/source/patterns/@aws-solutions-constructs/core/lib/lambda-helper.ts +++ b/source/patterns/@aws-solutions-constructs/core/lib/lambda-helper.ts @@ -25,7 +25,7 @@ import { overrideProps, addCfnSuppressRules } from './utils'; import { buildSecurityGroup } from "./security-group-helper"; // Note: To ensure CDKv2 compatibility, keep the import statement for Construct separate import { Construct, IConstruct } from 'constructs'; - +import * as defaults from '../index'; export interface BuildLambdaFunctionProps { /** * Existing instance of Lambda Function object, Providing both this and lambdaFunctionProps will cause an error. @@ -154,7 +154,7 @@ export function deployLambdaFunction(scope: Construct, const lambdafunction = new lambda.Function(scope, functionId, finalLambdaFunctionProps); - if (lambdaFunctionProps.runtime === lambda.Runtime.NODEJS_16_X) { + if (lambdaFunctionProps.runtime === defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME) { lambdafunction.addEnvironment('AWS_NODEJS_CONNECTION_REUSE_ENABLED', '1', { removeInEdge: true }); } diff --git a/source/patterns/@aws-solutions-constructs/core/lib/utils.ts b/source/patterns/@aws-solutions-constructs/core/lib/utils.ts index 5c5ce40e5..c233bf4d8 100644 --- a/source/patterns/@aws-solutions-constructs/core/lib/utils.ts +++ b/source/patterns/@aws-solutions-constructs/core/lib/utils.ts @@ -21,8 +21,12 @@ import { flagOverriddenDefaults } from './override-warning-service'; import * as log from 'npmlog'; import * as crypto from 'crypto'; import * as cdk from 'aws-cdk-lib'; +import * as lambda from 'aws-cdk-lib/aws-lambda'; import { Construct } from "constructs"; +export const COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME = lambda.Runtime.NODEJS_20_X; +export const COMMERCIAL_REGION_LAMBDA_NODE_STRING = "nodejs20.x"; + function isObject(val: object) { return val != null && typeof val === 'object' && Object.prototype.toString.call(val) === '[object Object]'; diff --git a/source/patterns/@aws-solutions-constructs/core/test/alb-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/alb-helper.test.ts index 927969687..4ed43e6fb 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/alb-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/alb-helper.test.ts @@ -622,7 +622,7 @@ function CreateTestLoadBalancer(stack: Stack, vpc: ec2.IVpc): elb.ApplicationLoa function CreateTestFunction(stack: Stack, id: string): lambda.Function { return new lambda.Function(stack, id, { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", }); } diff --git a/source/patterns/@aws-solutions-constructs/core/test/apigateway-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/apigateway-helper.test.ts index 36ce2f317..6f3906735 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/apigateway-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/apigateway-helper.test.ts @@ -20,7 +20,7 @@ import { Template } from 'aws-cdk-lib/assertions'; function deployRegionalApiGateway(stack: Stack) { const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; @@ -90,7 +90,7 @@ test('Test override for RegionalApiGateway', () => { const stack = new Stack(); const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; @@ -121,7 +121,7 @@ test('Test override for GlobalApiGateway', () => { const stack = new Stack(); const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; @@ -150,7 +150,7 @@ test('Test override for GlobalApiGateway', () => { test('Test ApiGateway::Account resource for RegionalApiGateway', () => { const stack = new Stack(); const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; @@ -173,7 +173,7 @@ test('Test ApiGateway::Account resource for RegionalApiGateway', () => { test('Test ApiGateway::Account resource for GlobalApiGateway', () => { const stack = new Stack(); const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; @@ -386,7 +386,7 @@ test('Test for Exception while overriding restApiProps using endPointTypes', () test('Test for Exception while overriding LambdaRestApiProps using endPointTypes', () => { const stack = new Stack(); const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; @@ -643,7 +643,7 @@ test('Test for ApiKey creation using restApiProps', () => { test('Test for ApiKey creation using lambdaApiProps', () => { const stack = new Stack(); const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-api-gateway-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-api-gateway-helper.test.ts index 4a7acc86a..4a8d94138 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-api-gateway-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-api-gateway-helper.test.ts @@ -262,7 +262,7 @@ test('test override cloudfront add custom cloudfront function', () => { // APIG Lambda function const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; @@ -389,7 +389,7 @@ test('test override cloudfront replace custom lambda@edge', () => { // custom lambda@edg function const handler = new lambda.Function(stack, 'SomeHandler', { functionName: 'SomeHandler', - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -400,7 +400,7 @@ test('test override cloudfront replace custom lambda@edge', () => { // APIG Lambda function const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`) }; diff --git a/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-s3-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-s3-helper.test.ts index f2b471c1f..bfbdc1ae6 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-s3-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/cloudfront-distribution-s3-helper.test.ts @@ -345,7 +345,7 @@ test('test override cloudfront replace custom lambda@edge', () => { // custom lambda@edg function const handler = new lambda.Function(stack, 'SomeHandler', { functionName: 'SomeHandler', - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); diff --git a/source/patterns/@aws-solutions-constructs/core/test/lambda-helper.test.ts b/source/patterns/@aws-solutions-constructs/core/test/lambda-helper.test.ts index 00a521ac8..17fc7fe2d 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/lambda-helper.test.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/lambda-helper.test.ts @@ -44,7 +44,7 @@ test("test FunctionProps override timeout", () => { const inProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", timeout: Duration.seconds(5), }; @@ -56,7 +56,7 @@ test("test FunctionProps override timeout", () => { Role: { "Fn::GetAtt": ["LambdaFunctionServiceRole0C4CDE0B", "Arn"], }, - Runtime: "nodejs16.x", + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Timeout: 5, }); }); @@ -66,7 +66,7 @@ test("test FunctionProps for environment variable when runtime = NODEJS", () => const inProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", }; @@ -77,7 +77,7 @@ test("test FunctionProps for environment variable when runtime = NODEJS", () => Role: { "Fn::GetAtt": ["LambdaFunctionServiceRole0C4CDE0B", "Arn"], }, - Runtime: "nodejs16.x", + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1", @@ -117,7 +117,7 @@ test("test buildLambdaFunction with deploy = true", () => { const inProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda-test`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", }; @@ -130,7 +130,7 @@ test("test buildLambdaFunction with deploy = true", () => { Role: { "Fn::GetAtt": ["LambdaFunctionServiceRole0C4CDE0B", "Arn"], }, - Runtime: "nodejs16.x", + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, }); }); @@ -139,7 +139,7 @@ test("test buildLambdaFunction with existing Lambda function (no VPC)", () => { const inProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda-test`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", }; @@ -210,7 +210,7 @@ test("test buildLambdaFunction when Lambda properties includes a VPC", () => { const fakeVpc = new ec2.Vpc(stack, "vpc", {}); const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), vpc: fakeVpc, @@ -249,7 +249,7 @@ test("Test for error if VPC in arguments AND in Lambda Function properties", () const fakeVpc = new ec2.Vpc(stack, "vpc", {}); const lambdaFunctionProps: lambda.FunctionProps = { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), vpc: fakeVpc, @@ -267,7 +267,7 @@ test("Test minimal deployment with an existing VPC and existing Lambda function const stack = new Stack(); const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -294,7 +294,7 @@ test("Test minimal deployment with an existing VPC and existing Lambda function const testVpc = new ec2.Vpc(stack, "test-vpc", {}); const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), vpc: testVpc, @@ -316,7 +316,7 @@ test("Test generating synthesized permission IDs", () => { const coreName = "TestInvokePermission"; const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -345,7 +345,7 @@ test("Test invalid synthesized permission names", () => { const coreName = "TestInvokePermission"; const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), }); @@ -366,13 +366,13 @@ test("Test invalid synthesized permission names", () => { expect(app).toThrowError(); }); -test('Test environment variable for NodeJS 16.x', () => { +test('Test environment variable for correct node version', () => { // Stack const stack = new Stack(); const inProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; @@ -384,7 +384,7 @@ test('Test environment variable for NodeJS 16.x', () => { Role: { 'Fn::GetAtt': ['LambdaFunctionServiceRole0C4CDE0B', 'Arn'] }, - Runtime: 'nodejs16.x', + Runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_STRING, Environment: { Variables: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1' @@ -398,7 +398,7 @@ test('Test minimum deployment with an existing VPC as a vpc parameter in deployL const stack = new Stack(); const inProps: lambda.FunctionProps = { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler' }; const fakeVpc: ec2.Vpc = new ec2.Vpc(stack, 'vpc', {}); @@ -436,7 +436,7 @@ test("Test retrieving lambda vpc security group ids", () => { const securityGroup2 = new ec2.SecurityGroup(stack, 'SecurityGroup2', { vpc }); const testLambdaFunction = new lambda.Function(stack, 'test-lamba', { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", code: lambda.Code.fromAsset(`${__dirname}/lambda`), securityGroups: [securityGroup1, securityGroup2], @@ -454,7 +454,7 @@ test('test buildLambdaFunction with lambdaFunctionProps default id', () => { defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), } @@ -473,7 +473,7 @@ test('test buildLambdaFunction with lambdaFunctionProps custom id', () => { defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { functionName: 'MyTestFunction', - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), } @@ -491,7 +491,7 @@ test('buildLambdaFunction uses constructId when specified', () => { defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), } @@ -511,7 +511,7 @@ test('buildLambdaFunction uses constructId when both constructId and functionNam defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', functionName: 'MyTestFunction', code: lambda.Code.fromAsset(`${__dirname}/lambda`), @@ -530,7 +530,7 @@ test('buildLambdaFunction uses functionName when constructId is not specified', defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', functionName: 'MyTestFunction', code: lambda.Code.fromAsset(`${__dirname}/lambda`), @@ -549,7 +549,7 @@ test('buildLambdaFunction uses default name when neither constructId or function defaults.buildLambdaFunction(stack, { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/lambda`), } @@ -571,12 +571,12 @@ test("Test fail Lambda function check", () => { const props: defaults.LambdaProps = { lambdaFunctionProps: { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", }, existingLambdaObj: new lambda.Function(stack, "placeholder", { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: "index.handler", }), }; diff --git a/source/patterns/@aws-solutions-constructs/core/test/test-helper.ts b/source/patterns/@aws-solutions-constructs/core/test/test-helper.ts index 7ea84d4c2..cc4f0f6e8 100644 --- a/source/patterns/@aws-solutions-constructs/core/test/test-helper.ts +++ b/source/patterns/@aws-solutions-constructs/core/test/test-helper.ts @@ -18,6 +18,7 @@ import { CfnResource, RemovalPolicy, Stack, Aspects, IAspect, Aws, Fn } from "aw import { buildVpc } from '../lib/vpc-helper'; import { DefaultPublicPrivateVpcProps, DefaultIsolatedVpcProps } from '../lib/vpc-defaults'; import { overrideProps, addCfnSuppressRules } from "../lib/utils"; +import * as defaults from '../index'; import { createCacheSubnetGroup } from "../lib/elasticache-helper"; import * as path from 'path'; import * as cache from 'aws-cdk-lib/aws-elasticache'; @@ -226,7 +227,7 @@ class CfnNagLambdaAspect implements IAspect { export function CreateTestApi(stack: Stack, id: string): api.LambdaRestApi { const lambdaFunction = new lambda.Function(stack, `${id}Function`, { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }); addCfnSuppressRules(lambdaFunction, [{ id: "W58", reason: "Test Resource" }]); @@ -263,7 +264,7 @@ export function CreateTestApi(stack: Stack, id: string): api.LambdaRestApi { export function CreateApiAuthorizer(stack: Stack, id: string): api.IAuthorizer { const authFn = new lambda.Function(stack, `${id}AuthFunction`, { code: lambda.Code.fromAsset(`${__dirname}/lambda`), - runtime: lambda.Runtime.NODEJS_16_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: ".handler", }); addCfnSuppressRules(authFn, [{ id: "W58", reason: "Test Resource" }]); diff --git a/source/patterns/@aws-solutions-constructs/resources/lib/key-policy-updater.ts b/source/patterns/@aws-solutions-constructs/resources/lib/key-policy-updater.ts index f94b42129..0f5593f3d 100644 --- a/source/patterns/@aws-solutions-constructs/resources/lib/key-policy-updater.ts +++ b/source/patterns/@aws-solutions-constructs/resources/lib/key-policy-updater.ts @@ -22,6 +22,7 @@ import { Distribution } from "aws-cdk-lib/aws-cloudfront"; import { addCfnSuppressRulesForCustomResourceProvider } from "./utils"; // Note: To ensure CDKv2 compatibility, keep the import statement for Construct separate import { Construct } from 'constructs'; +import * as defaults from '@aws-solutions-constructs/core'; export interface CreateKeyPolicyUpdaterResponse { readonly lambdaFunction: lambda.Function; @@ -43,7 +44,7 @@ export function createKeyPolicyUpdaterCustomResource( const lambdaFunction = buildLambdaFunction(scope, { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', description: 'Custom resource function that updates a provided key policy to allow CloudFront access.', timeout: props.timeout, diff --git a/source/patterns/@aws-solutions-constructs/resources/lib/template-writer.ts b/source/patterns/@aws-solutions-constructs/resources/lib/template-writer.ts index f99cda056..955641727 100644 --- a/source/patterns/@aws-solutions-constructs/resources/lib/template-writer.ts +++ b/source/patterns/@aws-solutions-constructs/resources/lib/template-writer.ts @@ -23,6 +23,7 @@ import { buildLambdaFunction } from "@aws-solutions-constructs/core"; import { addCfnSuppressRulesForCustomResourceProvider } from "./utils"; // Note: To ensure CDKv2 compatibility, keep the import statement for Construct separate import { Construct } from 'constructs'; +import * as defaults from '@aws-solutions-constructs/core'; /** * The TemplateValue interface defines the id-value pair that will @@ -97,7 +98,7 @@ export function createTemplateWriterCustomResource( const templateWriterLambda = buildLambdaFunction(scope, { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_18_X, + runtime: defaults.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, handler: 'index.handler', code: lambda.Code.fromAsset(`${__dirname}/template-writer-custom-resource`), timeout: props.timeout, diff --git a/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/key-policy-updater.assets.json b/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/key-policy-updater.assets.json index 72e56b60c..4d4cdb713 100644 --- a/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/key-policy-updater.assets.json +++ b/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/key-policy-updater.assets.json @@ -27,7 +27,7 @@ } } }, - "ce2a8018385dd7565e57e724cd0780b4d6d707af2e6640a2f590f7a7ea17a3a4": { + "f7061e593c3295063ffab817a686b26c54a9c23da44f0f303d6192e93b49ebc0": { "source": { "path": "key-policy-updater.template.json", "packaging": "file" @@ -35,7 +35,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ce2a8018385dd7565e57e724cd0780b4d6d707af2e6640a2f590f7a7ea17a3a4.json", + "objectKey": "f7061e593c3295063ffab817a686b26c54a9c23da44f0f303d6192e93b49ebc0.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/key-policy-updater.template.json b/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/key-policy-updater.template.json index d06d191b8..a76389242 100644 --- a/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/key-policy-updater.template.json +++ b/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/key-policy-updater.template.json @@ -267,6 +267,11 @@ "S3Key": "4a4b024f310aca2784b69bcb790e9ccaef785e9ad5d1b73624144f88c4465b4f.zip" }, "Description": "Custom resource function that updates a provided key policy to allow CloudFront access.", + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "Role": { "Fn::GetAtt": [ @@ -274,7 +279,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -432,7 +437,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Timeout": 900 }, "DependsOn": [ @@ -481,6 +494,115 @@ "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/manifest.json index 1b733ccc4..0c83d5731 100644 --- a/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/manifest.json @@ -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}/ce2a8018385dd7565e57e724cd0780b4d6d707af2e6640a2f590f7a7ea17a3a4.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f7061e593c3295063ffab817a686b26c54a9c23da44f0f303d6192e93b49ebc0.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -154,6 +154,12 @@ "data": "KmsKeyPolicyUpdateProviderframeworkonEventEC76BE2C" } ], + "/key-policy-updater/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/key-policy-updater/KmsKeyPolicyUpdater/Default": [ { "type": "aws:cdk:logicalId", diff --git a/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/tree.json index 25819627f..3e6bf81f7 100644 --- a/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/resources/test/integ.key-policy-updater.js.snapshot/tree.json @@ -51,13 +51,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.CfnKey", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_kms.Key", - "version": "2.138.0" + "version": "2.147.3" } }, "test bucket": { @@ -83,7 +83,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucket", - "version": "2.138.0" + "version": "2.147.3" } }, "Policy": { @@ -134,19 +134,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.CfnBucketPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.Bucket", - "version": "2.138.0" + "version": "2.147.3" } }, "test dist": { @@ -174,13 +174,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnCloudFrontOriginAccessIdentity", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.OriginAccessIdentity", - "version": "2.138.0" + "version": "2.147.3" } } }, @@ -235,13 +235,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -253,7 +253,7 @@ "path": "key-policy-updater/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -316,7 +316,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -352,19 +352,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -380,7 +380,7 @@ "path": "key-policy-updater/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -388,13 +388,13 @@ "path": "key-policy-updater/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -410,6 +410,11 @@ "s3Key": "4a4b024f310aca2784b69bcb790e9ccaef785e9ad5d1b73624144f88c4465b4f.zip" }, "description": "Custom resource function that updates a provided key policy to allow CloudFront access.", + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "role": { "Fn::GetAtt": [ @@ -417,7 +422,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -425,13 +430,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } }, "TestResourceCmkPolicy": { @@ -473,13 +478,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } }, "KmsKeyPolicyUpdateProvider": { @@ -499,7 +504,7 @@ "path": "key-policy-updater/KmsKeyPolicyUpdateProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -538,7 +543,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -592,19 +597,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "Code": { @@ -616,7 +621,7 @@ "path": "key-policy-updater/KmsKeyPolicyUpdateProvider/framework-onEvent/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -624,13 +629,13 @@ "path": "key-policy-updater/KmsKeyPolicyUpdateProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -663,25 +668,41 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "timeout": 900 } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.custom_resources.Provider", - "version": "2.138.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "key-policy-updater/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "KmsKeyPolicyUpdater": { @@ -693,13 +714,13 @@ "path": "key-policy-updater/KmsKeyPolicyUpdater/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.138.0" + "version": "2.147.3" } }, "Integ": { @@ -727,7 +748,7 @@ "path": "key-policy-updater/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.138.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -735,25 +756,25 @@ "path": "key-policy-updater/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.138.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.138.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -761,7 +782,7 @@ "path": "key-policy-updater/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.138.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -769,13 +790,13 @@ "path": "key-policy-updater/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.138.0" + "version": "2.147.3" } }, "Tree": { @@ -789,7 +810,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.138.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/manifest.json index 51f83a0ff..81c1deb94 100644 --- a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/manifest.json @@ -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}/ad36c8422cae204abec0f32ee441c05137398731aabd30caa3daef2c8dbef386.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/674ff8d03f3f67ae845dfc5bdba69f5d60210f5c4bc6eda2d950a379a7b3b668.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -124,6 +124,12 @@ "data": "TestTemplateWriterProviderframeworkonEvent7FDD3553" } ], + "/template-writer-from-asset/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/template-writer-from-asset/TestTemplateWriterCustomResource/Default": [ { "type": "aws:cdk:logicalId", @@ -141,24 +147,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "TestTemplateWriterLambdaRole192FE23A": [ - { - "type": "aws:cdk:logicalId", - "data": "TestTemplateWriterLambdaRole192FE23A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "TestTemplateWriterLambdaRoleDefaultPolicyBCFD88FC": [ - { - "type": "aws:cdk:logicalId", - "data": "TestTemplateWriterLambdaRoleDefaultPolicyBCFD88FC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "template-writer-from-asset" diff --git a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.assets.json b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.assets.json index 29e5297a1..b26226f70 100644 --- a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.assets.json +++ b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.assets.json @@ -53,7 +53,7 @@ } } }, - "ad36c8422cae204abec0f32ee441c05137398731aabd30caa3daef2c8dbef386": { + "674ff8d03f3f67ae845dfc5bdba69f5d60210f5c4bc6eda2d950a379a7b3b668": { "source": { "path": "template-writer-from-asset.template.json", "packaging": "file" @@ -61,7 +61,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "ad36c8422cae204abec0f32ee441c05137398731aabd30caa3daef2c8dbef386.json", + "objectKey": "674ff8d03f3f67ae845dfc5bdba69f5d60210f5c4bc6eda2d950a379a7b3b668.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.template.json b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.template.json index 9f5b69f51..92fedf8c3 100644 --- a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.template.json +++ b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/template-writer-from-asset.template.json @@ -99,6 +99,11 @@ }, "S3Key": "b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7.zip" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "Role": { "Fn::GetAtt": [ @@ -106,7 +111,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "TracingConfig": { "Mode": "Active" } @@ -290,7 +295,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Timeout": 900 }, "DependsOn": [ @@ -338,6 +351,115 @@ "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/tree.json index b15bfabcb..14f249501 100644 --- a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-asset.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "template-writer-from-asset/TemplateAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -25,13 +25,13 @@ "path": "template-writer-from-asset/TemplateAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "TestOutputAsset": { @@ -43,7 +43,7 @@ "path": "template-writer-from-asset/TestOutputAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -51,13 +51,13 @@ "path": "template-writer-from-asset/TestOutputAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -69,7 +69,7 @@ "path": "template-writer-from-asset/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -132,7 +132,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -168,19 +168,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -196,7 +196,7 @@ "path": "template-writer-from-asset/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -204,13 +204,13 @@ "path": "template-writer-from-asset/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -225,6 +225,11 @@ }, "s3Key": "b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7.zip" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "role": { "Fn::GetAtt": [ @@ -232,7 +237,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "tracingConfig": { "mode": "Active" } @@ -240,13 +245,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } }, "TestTemplateWriterPolicy": { @@ -314,13 +319,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } }, "TestTemplateWriterProvider": { @@ -340,7 +345,7 @@ "path": "template-writer-from-asset/TestTemplateWriterProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -379,7 +384,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -433,19 +438,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "Code": { @@ -457,7 +462,7 @@ "path": "template-writer-from-asset/TestTemplateWriterProvider/framework-onEvent/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -465,13 +470,13 @@ "path": "template-writer-from-asset/TestTemplateWriterProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -504,25 +509,41 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "timeout": 900 } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.custom_resources.Provider", - "version": "2.138.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "template-writer-from-asset/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "TestTemplateWriterCustomResource": { @@ -534,13 +555,13 @@ "path": "template-writer-from-asset/TestTemplateWriterCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.138.0" + "version": "2.147.3" } }, "Integ": { @@ -568,7 +589,7 @@ "path": "template-writer-from-asset/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.138.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -576,25 +597,25 @@ "path": "template-writer-from-asset/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.138.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.138.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -602,7 +623,7 @@ "path": "template-writer-from-asset/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.138.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -610,13 +631,13 @@ "path": "template-writer-from-asset/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.138.0" + "version": "2.147.3" } }, "Tree": { @@ -630,7 +651,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.138.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/manifest.json b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/manifest.json index 6bed3b013..62d57f1d0 100644 --- a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/manifest.json +++ b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/manifest.json @@ -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}/3213fb7881b23f688306a63ce482339ecdd784c63cdc80c7cb4e432ad6804a58.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5dd2fd9947fca23c108771ba84b7f81fc023ffa9ed968daf7d893728adb871ed.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -124,6 +124,12 @@ "data": "TestTemplateWriterProviderframeworkonEvent7FDD3553" } ], + "/template-writer-from-large-asset/LatestNodeRuntimeMap": [ + { + "type": "aws:cdk:logicalId", + "data": "LatestNodeRuntimeMap" + } + ], "/template-writer-from-large-asset/TestTemplateWriterCustomResource/Default": [ { "type": "aws:cdk:logicalId", @@ -141,24 +147,6 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } - ], - "TestTemplateWriterLambdaRole192FE23A": [ - { - "type": "aws:cdk:logicalId", - "data": "TestTemplateWriterLambdaRole192FE23A", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "TestTemplateWriterLambdaRoleDefaultPolicyBCFD88FC": [ - { - "type": "aws:cdk:logicalId", - "data": "TestTemplateWriterLambdaRoleDefaultPolicyBCFD88FC", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } ] }, "displayName": "template-writer-from-large-asset" diff --git a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/template-writer-from-large-asset.assets.json b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/template-writer-from-large-asset.assets.json index 3ffcb6aeb..f96026327 100644 --- a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/template-writer-from-large-asset.assets.json +++ b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/template-writer-from-large-asset.assets.json @@ -53,7 +53,7 @@ } } }, - "3213fb7881b23f688306a63ce482339ecdd784c63cdc80c7cb4e432ad6804a58": { + "5dd2fd9947fca23c108771ba84b7f81fc023ffa9ed968daf7d893728adb871ed": { "source": { "path": "template-writer-from-large-asset.template.json", "packaging": "file" @@ -61,7 +61,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "3213fb7881b23f688306a63ce482339ecdd784c63cdc80c7cb4e432ad6804a58.json", + "objectKey": "5dd2fd9947fca23c108771ba84b7f81fc023ffa9ed968daf7d893728adb871ed.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/template-writer-from-large-asset.template.json b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/template-writer-from-large-asset.template.json index eb8e2d9b5..ee16251f3 100644 --- a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/template-writer-from-large-asset.template.json +++ b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/template-writer-from-large-asset.template.json @@ -99,6 +99,11 @@ }, "S3Key": "b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7.zip" }, + "Environment": { + "Variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "Handler": "index.handler", "MemorySize": 1024, "Role": { @@ -107,7 +112,7 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": "nodejs20.x", "Timeout": 60, "TracingConfig": { "Mode": "Active" @@ -292,7 +297,15 @@ "Arn" ] }, - "Runtime": "nodejs18.x", + "Runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "Timeout": 900 }, "DependsOn": [ @@ -340,6 +353,115 @@ "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" + }, + "ca-central-1": { + "value": "nodejs20.x" + }, + "cn-north-1": { + "value": "nodejs18.x" + }, + "cn-northwest-1": { + "value": "nodejs18.x" + }, + "eu-central-1": { + "value": "nodejs20.x" + }, + "eu-central-2": { + "value": "nodejs20.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" + }, + "sa-east-1": { + "value": "nodejs20.x" + }, + "us-east-1": { + "value": "nodejs20.x" + }, + "us-east-2": { + "value": "nodejs20.x" + }, + "us-gov-east-1": { + "value": "nodejs18.x" + }, + "us-gov-west-1": { + "value": "nodejs18.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" + } + } + }, "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", diff --git a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/tree.json b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/tree.json index 3ee8aa0c0..b3a222ac1 100644 --- a/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/tree.json +++ b/source/patterns/@aws-solutions-constructs/resources/test/integ.template-writer-from-large-asset.js.snapshot/tree.json @@ -17,7 +17,7 @@ "path": "template-writer-from-large-asset/TemplateAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -25,13 +25,13 @@ "path": "template-writer-from-large-asset/TemplateAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "TestOutputAsset": { @@ -43,7 +43,7 @@ "path": "template-writer-from-large-asset/TestOutputAsset/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -51,13 +51,13 @@ "path": "template-writer-from-large-asset/TestOutputAsset/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunctionServiceRole": { @@ -69,7 +69,7 @@ "path": "template-writer-from-large-asset/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -132,7 +132,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -168,19 +168,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "LambdaFunction": { @@ -196,7 +196,7 @@ "path": "template-writer-from-large-asset/LambdaFunction/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -204,13 +204,13 @@ "path": "template-writer-from-large-asset/LambdaFunction/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -225,6 +225,11 @@ }, "s3Key": "b1223f33e5124fdec3dc7988012c02ed49e285da9c1b8bcd2ce2d2c7c5d09ee7.zip" }, + "environment": { + "variables": { + "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1" + } + }, "handler": "index.handler", "memorySize": 1024, "role": { @@ -233,7 +238,7 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": "nodejs20.x", "timeout": 60, "tracingConfig": { "mode": "Active" @@ -242,13 +247,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } }, "TestTemplateWriterPolicy": { @@ -316,13 +321,13 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } }, "TestTemplateWriterProvider": { @@ -342,7 +347,7 @@ "path": "template-writer-from-large-asset/TestTemplateWriterProvider/framework-onEvent/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "aws-cdk-lib.Resource", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -381,7 +386,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnRole", - "version": "2.138.0" + "version": "2.147.3" } }, "DefaultPolicy": { @@ -435,19 +440,19 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Policy", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_iam.Role", - "version": "2.138.0" + "version": "2.147.3" } }, "Code": { @@ -459,7 +464,7 @@ "path": "template-writer-from-large-asset/TestTemplateWriterProvider/framework-onEvent/Code/Stage", "constructInfo": { "fqn": "aws-cdk-lib.AssetStaging", - "version": "2.138.0" + "version": "2.147.3" } }, "AssetBucket": { @@ -467,13 +472,13 @@ "path": "template-writer-from-large-asset/TestTemplateWriterProvider/framework-onEvent/Code/AssetBucket", "constructInfo": { "fqn": "aws-cdk-lib.aws_s3.BucketBase", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_s3_assets.Asset", - "version": "2.138.0" + "version": "2.147.3" } }, "Resource": { @@ -506,25 +511,41 @@ "Arn" ] }, - "runtime": "nodejs18.x", + "runtime": { + "Fn::FindInMap": [ + "LatestNodeRuntimeMap", + { + "Ref": "AWS::Region" + }, + "value" + ] + }, "timeout": 900 } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.aws_lambda.Function", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.custom_resources.Provider", - "version": "2.138.0" + "version": "2.147.3" + } + }, + "LatestNodeRuntimeMap": { + "id": "LatestNodeRuntimeMap", + "path": "template-writer-from-large-asset/LatestNodeRuntimeMap", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnMapping", + "version": "2.147.3" } }, "TestTemplateWriterCustomResource": { @@ -536,13 +557,13 @@ "path": "template-writer-from-large-asset/TestTemplateWriterCustomResource/Default", "constructInfo": { "fqn": "aws-cdk-lib.CfnResource", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.CustomResource", - "version": "2.138.0" + "version": "2.147.3" } }, "Integ": { @@ -570,7 +591,7 @@ "path": "template-writer-from-large-asset/Integ/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.138.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -578,25 +599,25 @@ "path": "template-writer-from-large-asset/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", - "version": "2.138.0-alpha.0" + "version": "2.147.3-alpha.0" } } }, "constructInfo": { "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", - "version": "2.138.0-alpha.0" + "version": "2.147.3-alpha.0" } }, "BootstrapVersion": { @@ -604,7 +625,7 @@ "path": "template-writer-from-large-asset/BootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnParameter", - "version": "2.138.0" + "version": "2.147.3" } }, "CheckBootstrapVersion": { @@ -612,13 +633,13 @@ "path": "template-writer-from-large-asset/CheckBootstrapVersion", "constructInfo": { "fqn": "aws-cdk-lib.CfnRule", - "version": "2.138.0" + "version": "2.147.3" } } }, "constructInfo": { "fqn": "aws-cdk-lib.Stack", - "version": "2.138.0" + "version": "2.147.3" } }, "Tree": { @@ -632,7 +653,7 @@ }, "constructInfo": { "fqn": "aws-cdk-lib.App", - "version": "2.138.0" + "version": "2.147.3" } } } \ No newline at end of file diff --git a/source/use_cases/aws-restaurant-management-demo/lib/config.ts b/source/use_cases/aws-restaurant-management-demo/lib/config.ts new file mode 100644 index 000000000..982eb1a87 --- /dev/null +++ b/source/use_cases/aws-restaurant-management-demo/lib/config.ts @@ -0,0 +1,17 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance + * with the License. A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES + * OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions + * and limitations under the License. + */ + +import * as lambda from 'aws-cdk-lib/aws-lambda'; + +export const COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME = lambda.Runtime.NODEJS_20_X; +export const COMMERCIAL_REGION_LAMBDA_NODE_STRING = "nodejs20.x"; diff --git a/source/use_cases/aws-restaurant-management-demo/lib/kitchen-staff-stack.ts b/source/use_cases/aws-restaurant-management-demo/lib/kitchen-staff-stack.ts index fe225ddba..67b867f06 100644 --- a/source/use_cases/aws-restaurant-management-demo/lib/kitchen-staff-stack.ts +++ b/source/use_cases/aws-restaurant-management-demo/lib/kitchen-staff-stack.ts @@ -17,6 +17,8 @@ import { Construct } from 'constructs'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as ddb from 'aws-cdk-lib/aws-dynamodb'; import * as apigateway from 'aws-cdk-lib/aws-apigateway'; +import * as cfg from './config'; + import { CognitoToApiGatewayToLambda } from '@aws-solutions-constructs/aws-cognito-apigateway-lambda'; @@ -40,7 +42,7 @@ export class KitchenStaffStack extends Stack { // Create a Lambda function that lists all open orders in the database const getOpenOrders = new LambdaToDynamoDB(this, 'get-open-orders', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: cfg.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda/kitchen-staff/get-open-orders`), handler: 'index.handler', timeout: Duration.seconds(15) @@ -51,7 +53,7 @@ export class KitchenStaffStack extends Stack { // Create a Lambda function that marks an order as completed in the database const completeOrder = new LambdaToDynamoDB(this, 'complete-order', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: cfg.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda/kitchen-staff/complete-order`), handler: 'index.handler', timeout: Duration.seconds(15) diff --git a/source/use_cases/aws-restaurant-management-demo/lib/manager-stack.ts b/source/use_cases/aws-restaurant-management-demo/lib/manager-stack.ts index bff3d948f..c9f239536 100644 --- a/source/use_cases/aws-restaurant-management-demo/lib/manager-stack.ts +++ b/source/use_cases/aws-restaurant-management-demo/lib/manager-stack.ts @@ -14,6 +14,7 @@ // Imports import { Stack, Duration } from 'aws-cdk-lib'; import { Construct } from 'constructs'; +import * as cfg from './config'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as ddb from 'aws-cdk-lib/aws-dynamodb'; import * as apigateway from 'aws-cdk-lib/aws-apigateway'; @@ -48,7 +49,7 @@ export class ManagerStack extends Stack { // Create a Lambda function that lists all orders from the database const getAllOrders = new LambdaToDynamoDB(this, 'get-all-orders', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: cfg.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda/manager/get-all-orders`), handler: 'index.handler', timeout: Duration.seconds(15), @@ -61,7 +62,7 @@ export class ManagerStack extends Stack { // Runs as part of the close-out process const createReport = new LambdaToDynamoDB(this, 'create-report', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: cfg.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda/manager/create-report`), handler: 'index.handler', timeout: Duration.seconds(15), @@ -79,7 +80,7 @@ export class ManagerStack extends Stack { // Runs as part of the close-out process const calculateTips = new LambdaToDynamoDB(this, 'calculate-tips', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: cfg.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda/manager/calculate-tips`), handler: 'index.handler', timeout: Duration.seconds(15), @@ -96,7 +97,7 @@ export class ManagerStack extends Stack { // Runs as part of the close-out process const archiveOrders = new LambdaToDynamoDB(this, 'archive-orders', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: cfg.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda/manager/archive-orders`), handler: 'index.handler', timeout: Duration.seconds(15), @@ -133,7 +134,7 @@ export class ManagerStack extends Stack { // 5. Setup the Step Functions integration with Lambda trigger const closeOutService = new LambdaToStepfunctions(this, 'close-out-service', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: cfg.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda/manager/close-out-service`), handler: 'index.handler', timeout: Duration.seconds(15) @@ -146,7 +147,7 @@ export class ManagerStack extends Stack { // Create a Lambda function that will retrieve a specific report from the bucket const getReport = new LambdaToS3(this, 'get-report', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: cfg.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda/manager/get-report`), handler: 'index.handler', timeout: Duration.seconds(15) @@ -190,7 +191,7 @@ export class ManagerStack extends Stack { // Create a Lambda function for identifying orders that have been open for too long const checkLateOrders = new LambdaToDynamoDB(this, 'check-late-orders', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: cfg.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda/manager/check-late-orders`), handler: 'index.handler', environment: { diff --git a/source/use_cases/aws-restaurant-management-demo/lib/service-staff-stack.ts b/source/use_cases/aws-restaurant-management-demo/lib/service-staff-stack.ts index 4c8ed887d..75190c04a 100644 --- a/source/use_cases/aws-restaurant-management-demo/lib/service-staff-stack.ts +++ b/source/use_cases/aws-restaurant-management-demo/lib/service-staff-stack.ts @@ -16,6 +16,7 @@ import { Stack, Duration } from 'aws-cdk-lib'; import { Construct } from 'constructs'; import * as lambda from 'aws-cdk-lib/aws-lambda'; import * as ddb from 'aws-cdk-lib/aws-dynamodb'; +import * as cfg from './config'; import * as apigateway from 'aws-cdk-lib/aws-apigateway'; import { CognitoToApiGatewayToLambda @@ -40,7 +41,7 @@ export class ServiceStaffStack extends Stack { // Create a Lambda function that adds a new order to the database const createOrder = new LambdaToDynamoDB(this, 'create-order', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: cfg.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda/service-staff/create-order`), handler: 'index.handler', timeout: Duration.seconds(15) @@ -51,7 +52,7 @@ export class ServiceStaffStack extends Stack { // Create a Lambda function that closes out an order in the table const processPayment = new LambdaToDynamoDB(this, 'process-payment', { lambdaFunctionProps: { - runtime: lambda.Runtime.NODEJS_16_X, + runtime: cfg.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, code: lambda.Code.fromAsset(`${__dirname}/lambda/service-staff/process-payment`), handler: 'index.handler', timeout: Duration.seconds(15) diff --git a/source/use_cases/aws-restaurant-management-demo/lib/shared-stack.ts b/source/use_cases/aws-restaurant-management-demo/lib/shared-stack.ts index ba0409f28..a35f01a9c 100644 --- a/source/use_cases/aws-restaurant-management-demo/lib/shared-stack.ts +++ b/source/use_cases/aws-restaurant-management-demo/lib/shared-stack.ts @@ -16,6 +16,7 @@ import { Stack, StackProps, RemovalPolicy } from 'aws-cdk-lib'; import { Construct } from 'constructs'; import * as ddb from 'aws-cdk-lib/aws-dynamodb'; import * as lambda from 'aws-cdk-lib/aws-lambda'; +import * as cfg from './config'; // Stack export class SharedStack extends Stack { @@ -64,7 +65,7 @@ export class SharedStack extends Stack { // Setup a Lambda layer for sharing database functions ------------------------------------------------------------- this.layer = new lambda.LayerVersion(this, 'shared-db-functions-layer', { code: lambda.Code.fromAsset(`${__dirname}/lambda/layer`), - compatibleRuntimes: [ lambda.Runtime.NODEJS_16_X ], + compatibleRuntimes: [ cfg.COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME ], license: 'Apache-2.0', description: 'Layer for common database access functions', }); diff --git a/source/use_cases/aws-restaurant-management-demo/test/__snapshots__/kitchenStaffStack.test.js.snap b/source/use_cases/aws-restaurant-management-demo/test/__snapshots__/kitchenStaffStack.test.js.snap index 67b478ac1..9bb9c2a44 100644 --- a/source/use_cases/aws-restaurant-management-demo/test/__snapshots__/kitchenStaffStack.test.js.snap +++ b/source/use_cases/aws-restaurant-management-demo/test/__snapshots__/kitchenStaffStack.test.js.snap @@ -82,7 +82,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": Object { "Mode": "Active", @@ -256,7 +256,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": Object { "Mode": "Active", diff --git a/source/use_cases/aws-restaurant-management-demo/test/__snapshots__/serviceStaffStack.test.js.snap b/source/use_cases/aws-restaurant-management-demo/test/__snapshots__/serviceStaffStack.test.js.snap index 5b598d732..be3e81f5e 100644 --- a/source/use_cases/aws-restaurant-management-demo/test/__snapshots__/serviceStaffStack.test.js.snap +++ b/source/use_cases/aws-restaurant-management-demo/test/__snapshots__/serviceStaffStack.test.js.snap @@ -66,7 +66,7 @@ Object { "S3Bucket": Object { "Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}", }, - "S3Key": "f7e78725db82a6bcdfb3881f27ecf9760863196f64e16042f3eb567f522d9449.zip", + "S3Key": "fbf7fbd1e8bee59f8d06e9062d0b1d2b842afe0aac7618c99930897decfb4399.zip", }, "Environment": Object { "Variables": Object { @@ -82,7 +82,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": Object { "Mode": "Active", @@ -256,7 +256,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": Object { "Mode": "Active", diff --git a/source/use_cases/aws-restaurant-management-demo/test/__snapshots__/sharedStack.test.js.snap b/source/use_cases/aws-restaurant-management-demo/test/__snapshots__/sharedStack.test.js.snap index 20d7f4777..22a7b0158 100644 --- a/source/use_cases/aws-restaurant-management-demo/test/__snapshots__/sharedStack.test.js.snap +++ b/source/use_cases/aws-restaurant-management-demo/test/__snapshots__/sharedStack.test.js.snap @@ -118,7 +118,7 @@ Object { "shareddbfunctionslayerA9CFEC5A": Object { "Properties": Object { "CompatibleRuntimes": Array [ - "nodejs16.x", + "nodejs20.x", ], "Content": Object { "S3Bucket": Object { diff --git a/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/KitchenStaffStack.template.json b/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/KitchenStaffStack.template.json index 4330b3819..2b47dc9cd 100644 --- a/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/KitchenStaffStack.template.json +++ b/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/KitchenStaffStack.template.json @@ -146,7 +146,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": { "Mode": "Active" @@ -321,7 +321,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": { "Mode": "Active" diff --git a/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/ManagerStack.template.json b/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/ManagerStack.template.json index 6a6163bb5..ad8b7742d 100644 --- a/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/ManagerStack.template.json +++ b/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/ManagerStack.template.json @@ -151,7 +151,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": { "Mode": "Active" @@ -371,7 +371,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": { "Mode": "Active" @@ -775,7 +775,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": { "Mode": "Active" @@ -1098,7 +1098,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": { "Mode": "Active" @@ -1510,7 +1510,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": { "Mode": "Active" @@ -1752,7 +1752,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": { "Mode": "Active" @@ -2647,7 +2647,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": { "Mode": "Active" diff --git a/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/ServiceStaffStack.template.json b/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/ServiceStaffStack.template.json index 2e5c378e9..6c0a66c4e 100644 --- a/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/ServiceStaffStack.template.json +++ b/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/ServiceStaffStack.template.json @@ -146,7 +146,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": { "Mode": "Active" @@ -321,7 +321,7 @@ "Arn" ] }, - "Runtime": "nodejs16.x", + "Runtime": "nodejs20.x", "Timeout": 15, "TracingConfig": { "Mode": "Active" diff --git a/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/SharedStack.template.json b/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/SharedStack.template.json index 6ef59095d..105d4f9a2 100644 --- a/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/SharedStack.template.json +++ b/source/use_cases/aws-restaurant-management-demo/test/integ.basic-deployment.js.snapshot/SharedStack.template.json @@ -109,7 +109,7 @@ "Type": "AWS::Lambda::LayerVersion", "Properties": { "CompatibleRuntimes": [ - "nodejs16.x" + "nodejs20.x" ], "Content": { "S3Bucket": {