Skip to content

Commit

Permalink
fix: Custom Resources use end-of-life Lambda Node 10 runtime (#834)
Browse files Browse the repository at this point in the history
Update them to Node 12.

-----

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
skinny85 authored Jun 15, 2021
1 parent cb01bf2 commit 6590e7d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions lib/__tests__/expected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4300,7 +4300,7 @@ Resources:
STAGE_NAME: Publish
AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1"
Handler: index.handler
Runtime: nodejs10.x
Runtime: nodejs12.x
Timeout: 300
DependsOn:
- CodeCommitPipelineChangeControllerFunctionServiceRoleDefaultPolicy315F7AF5
Expand Down Expand Up @@ -4513,7 +4513,7 @@ Resources:
Handler: index.handler
Layers:
- Ref: X509CodeSigningKeyRSAPrivateKeyOpenSslCliLayer3F0C7B04
Runtime: nodejs10.x
Runtime: nodejs12.x
Timeout: 300
DependsOn:
- RSAPrivateKey72FD327D38134632934028EC437AA486ServiceRoleDefaultPolicy487DB1EA
Expand Down Expand Up @@ -4569,7 +4569,7 @@ Resources:
Handler: index.handler
Layers:
- Ref: X509CodeSigningKeyRSAPrivateKeyCertificateSigningRequestOpenSslCliLayer61AF8E77
Runtime: nodejs10.x
Runtime: nodejs12.x
Timeout: 300
DependsOn:
- CreateCSR541F67826DCF49A78C5A67715ADD9E4CServiceRoleDefaultPolicyC0800208
Expand Down Expand Up @@ -4747,7 +4747,7 @@ Resources:
Handler: index.handler
Layers:
- Ref: CodeSignGpgLayer4D38F47B
Runtime: nodejs10.x
Runtime: nodejs12.x
Timeout: 300
DependsOn:
- SingletonLambdaf25803d3054b44fc985f4860d7d6ee74ServiceRoleDefaultPolicyA8FDF5BD
Expand Down
2 changes: 1 addition & 1 deletion lib/change-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class ChangeController extends Construct {
const fn = new nodejs.NodejsFunction(this, 'Function', {
description: `Enforces a Change Control Policy into CodePipeline's ${props.pipelineStage.stageName} stage`,
entry: path.join(__dirname, 'change-control-lambda', 'index.ts'),
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_12_X,
environment: {
// CAPITAL punishment 👌🏻
CHANGE_CONTROL_BUCKET_NAME: changeControlBucket.bucketName,
Expand Down
2 changes: 1 addition & 1 deletion lib/chime-notifier/chime-notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class ChimeNotifier extends Construct {
handler: 'index.handler',
uuid: '0f4a3ee0-692e-4249-932f-a46a833886d8',
code: lambda.Code.inline(stripComments(fs.readFileSync(path.join(__dirname, 'notifier-handler.js')).toString('utf8'))),
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_12_X,
timeout: Duration.minutes(5),
});

Expand Down
2 changes: 1 addition & 1 deletion lib/code-signing/certificate-signing-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class CertificateSigningRequest extends Construct {
uuid: '541F6782-6DCF-49A7-8C5A-67715ADD9E4C',
lambdaPurpose: 'CreateCSR',
description: 'Creates a Certificate Signing Request document for an x509 certificate',
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_12_X,
handler: 'index.handler',
code: new lambda.AssetCode(codeLocation),
timeout: Duration.seconds(300),
Expand Down
2 changes: 1 addition & 1 deletion lib/code-signing/private-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class RsaPrivateKeySecret extends Construct {
lambdaPurpose: 'RSAPrivate-Key',
uuid: '72FD327D-3813-4632-9340-28EC437AA486',
description: 'Generates an RSA Private Key and stores it in AWS Secrets Manager',
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_12_X,
handler: 'index.handler',
code: new lambda.AssetCode(codeLocation),
timeout: Duration.seconds(300),
Expand Down
2 changes: 1 addition & 1 deletion lib/open-pgp-key-pair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class OpenPGPKeyPair extends Construct implements ICredentialPair {
code: new lambda.AssetCode(codeLocation),
handler: 'index.handler',
timeout: Duration.seconds(300),
runtime: lambda.Runtime.NODEJS_10_X,
runtime: lambda.Runtime.NODEJS_12_X,
// add the layer that contains the GPG binary (+ shared libraries)
layers: [new lambda.LayerVersion(this, 'GpgLayer', {
code: lambda.Code.fromAsset(path.join(__dirname, 'custom-resource-handlers', 'layers', 'gpg-layer.zip')),
Expand Down
2 changes: 1 addition & 1 deletion package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6590e7d

Please sign in to comment.