Skip to content

Commit

Permalink
feat(lambda): Migrate away from NODEJS_10_X and NODEJS_12_X to NODEJS…
Browse files Browse the repository at this point in the history
…_14_X (#20595)

Spiritual successor of #20531

<img width="487" alt="Screen Shot 2022-06-01 at 9 08 18 PM" src="https://user-images.githubusercontent.com/31543/171552028-7153063a-1c19-4972-ab89-6f280a4e9326.png">

- Migrated away (tests, docs, internal use) from NODEJS_10_X to NODEJS_14_X
- Migrated away (tests, docs, internal use) from NODEJS_12_X to NODEJS_14_X
- Added NODEJS_16_X to CustomResources
- Update CustomResources to use nodejs14.x by default
- Updated integration tests across the board. Some integ tests introduced destructive changes (expected with change of nodejs runtime)

Closes #20568
Closes #19992
Closes #20474

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
robertd authored Jun 3, 2022
1 parent 49b397c commit 4537b3f
Show file tree
Hide file tree
Showing 496 changed files with 2,923 additions and 2,386 deletions.
2 changes: 1 addition & 1 deletion INTEGRATION_TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const stack = new cdk.Stack(app, 'aws-cdk-lambda-1');
const fn = new lambda.Function(stack, 'MyLambda', {
code: new lambda.InlineCode('foo'),
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
});

app.synth();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "17.0.0",
"version": "20.0.0",
"files": {
"8f06a3db22794ebc7ff89b4745fd706afd46e17816fe46da72e5125cabae725d": {
"source": {
Expand Down Expand Up @@ -40,15 +40,15 @@
}
}
},
"80aa78a4817ba118f8e03b489e7276a0100cd9dae8b7dd32db16e53b45d438b4": {
"0b2a2f517aed512c15790ab888051365faa60d6c56c60f963b9f68bd63700087": {
"source": {
"path": "aws-ecs-integ.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "80aa78a4817ba118f8e03b489e7276a0100cd9dae8b7dd32db16e53b45d438b4.json",
"objectKey": "0b2a2f517aed512c15790ab888051365faa60d6c56c60f963b9f68bd63700087.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@
}
},
"Handler": "framework.onEvent",
"Runtime": "nodejs12.x",
"Runtime": "nodejs14.x",
"Timeout": 900
},
"DependsOn": [
Expand Down Expand Up @@ -1279,7 +1279,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs12.x",
"Runtime": "nodejs14.x",
"Timeout": 120
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"17.0.0"}
{"version":"20.0.0"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "20.0.0",
"testCases": {
"integ.assign-public-ip": {
"stacks": [
"aws-ecs-integ"
],
"diffAssets": false,
"stackUpdateWorkflow": true
}
},
"synthContext": {},
"enableLookups": false
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "17.0.0",
"version": "20.0.0",
"artifacts": {
"Tree": {
"type": "cdk:tree",
Expand Down Expand Up @@ -146,10 +146,7 @@
"/aws-ecs-integ/name-task-definition/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "nametaskdefinition690762BB",
"trace": [
"!!DESTRUCTIVE_CHANGES: WILL_REPLACE"
]
"data": "nametaskdefinition690762BB"
}
],
"/aws-ecs-integ/name-task-definition/ExecutionRole/Resource": [
Expand Down
Loading

0 comments on commit 4537b3f

Please sign in to comment.