Skip to content

Commit

Permalink
chore(codedeploy): fix broken integration tests (#19662)
Browse files Browse the repository at this point in the history
Update lambda runtime to NODEJS_14 from deprecated NODEJS_10


----

### All Submissions:

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

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/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/master/INTEGRATION_TESTS.md)?
	* [x] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-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
corymhall authored Apr 1, 2022
1 parent 1ead5d4 commit 9c1c09e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"HandlerServiceRoleFCDC14AE"
]
},
"HandlerCurrentVersion93FB80BFb2de9794fd0f0df5e5c01c16ba4b05cf": {
"HandlerCurrentVersion93FB80BFb2a9ce598bf2730613c07e406cddb6b6": {
"Type": "AWS::Lambda::Version",
"Properties": {
"FunctionName": {
Expand All @@ -101,7 +101,7 @@
},
"FunctionVersion": {
"Fn::GetAtt": [
"HandlerCurrentVersion93FB80BFb2de9794fd0f0df5e5c01c16ba4b05cf",
"HandlerCurrentVersion93FB80BFb2a9ce598bf2730613c07e406cddb6b6",
"Version"
]
},
Expand Down Expand Up @@ -250,7 +250,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"PreHookServiceRoleDefaultPolicy65358F76",
Expand Down Expand Up @@ -383,7 +383,7 @@
]
},
"Handler": "index.handler",
"Runtime": "nodejs10.x"
"Runtime": "nodejs14.x"
},
"DependsOn": [
"PostHookServiceRoleDefaultPolicy82AEE758",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const stack = new cdk.Stack(app, 'aws-cdk-codedeploy-lambda');
const handler = new lambda.Function(stack, 'Handler', {
code: lambda.Code.fromAsset(path.join(__dirname, 'handler')),
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
});
const version = handler.currentVersion;
const blueGreenAlias = new lambda.Alias(stack, 'Alias', {
Expand All @@ -22,12 +22,12 @@ const blueGreenAlias = new lambda.Alias(stack, 'Alias', {
const preHook = new lambda.Function(stack, 'PreHook', {
code: lambda.Code.fromAsset(path.join(__dirname, 'preHook')),
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
});
const postHook = new lambda.Function(stack, 'PostHook', {
code: lambda.Code.fromAsset(path.join(__dirname, 'postHook')),
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_14_X,
});

new codedeploy.LambdaDeploymentGroup(stack, 'BlueGreenDeployment', {
Expand Down

0 comments on commit 9c1c09e

Please sign in to comment.