Skip to content

Commit

Permalink
Upgrade Node.js runtime to v18 since v16 is EOL as of 2024.
Browse files Browse the repository at this point in the history
  • Loading branch information
Esen Sagynov committed Mar 22, 2024
1 parent 36726d6 commit 15e7146
Show file tree
Hide file tree
Showing 43 changed files with 78 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class EcsDeploymentGroup extends Resource implements IEcsDeploymentGroup,
}

const serviceToken = new Function(this, 'Function', {
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
code: Code.fromAsset(path.join(__dirname, 'lambdas', 'ecs-deployment-group')),
handler: 'index.handler',
timeout: Duration.minutes(15),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class EcsService extends Construct implements IConnectable, IEcsService,
];

const serviceToken = new Function(this, 'Function', {
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
code: Code.fromAsset(path.join(__dirname, 'lambdas', 'ecs-service')),
handler: 'index.handler',
timeout: Duration.minutes(15),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class MSTeamsIncomingWebhookConfiguration extends Construct {
super(scope, id);

this.incomingWebhook = new Function(this, 'Function', {
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
code: Code.fromAsset(path.join(__dirname, 'lambdas', 'msteams-incoming-webhook')),
handler: 'index.handler',
environment: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
"Timeout": 300,
},
"Type": "AWS::Lambda::Function",
Expand Down Expand Up @@ -183,7 +183,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down Expand Up @@ -232,7 +232,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down Expand Up @@ -1043,7 +1043,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
"Timeout": 300,
},
"Type": "AWS::Lambda::Function",
Expand Down Expand Up @@ -1160,7 +1160,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down Expand Up @@ -1209,7 +1209,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
"Timeout": 300,
},
"Type": "AWS::Lambda::Function",
Expand Down Expand Up @@ -236,7 +236,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down Expand Up @@ -285,7 +285,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down Expand Up @@ -1506,7 +1506,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
"Timeout": 300,
},
"Type": "AWS::Lambda::Function",
Expand Down Expand Up @@ -1623,7 +1623,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down Expand Up @@ -1672,7 +1672,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class SecretGenerator extends Construct {

const secretGenerator = new aws_lambda.SingletonFunction(this, 'Function', {
uuid: 'cloudcomponents-cdk-cloudfront-authorization-secret-generator',
runtime: aws_lambda.Runtime.NODEJS_16_X,
runtime: aws_lambda.Runtime.NODEJS_18_X,
handler: 'index.handler',
code: aws_lambda.Code.fromAsset(path.join(__dirname, 'lambdas', 'secret-generator')),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class UserPoolDomain extends Construct {

const secretGenerator = new aws_lambda.SingletonFunction(this, 'Function', {
uuid: 'cloudcomponents-cdk-cloudfront-authorization-user-pool-domain',
runtime: aws_lambda.Runtime.NODEJS_16_X,
runtime: aws_lambda.Runtime.NODEJS_18_X,
handler: 'index.handler',
code: aws_lambda.Code.fromAsset(path.join(__dirname, 'lambdas', 'user-pool-domain')),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down Expand Up @@ -999,7 +999,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down Expand Up @@ -1159,7 +1159,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down Expand Up @@ -1909,7 +1909,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface CheckParamterFunctionProps {
export class CheckParameterFunction extends Function {
constructor(scope: Construct, id: string, props: CheckParamterFunctionProps) {
super(scope, id, {
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
handler: 'index.handler',
code: Code.fromAsset(path.join(__dirname, 'lambdas', 'check-parameter')),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface MergeBranchesFunctionProps {
export class MergeBranchesFunction extends Function {
constructor(scope: Construct, id: string, props: MergeBranchesFunctionProps) {
super(scope, id, {
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
handler: 'index.handler',
code: Code.fromAsset(path.join(__dirname, 'lambdas', 'merge-branches')),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down Expand Up @@ -467,7 +467,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down Expand Up @@ -1158,7 +1158,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down Expand Up @@ -1275,7 +1275,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down
4 changes: 2 additions & 2 deletions packages/cdk-codepipeline-slack/src/slack-approval-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class SlackApprovalAction extends Action {
}

const approvalRequester = new Function(scope, 'SlackApprovalRequesterFunction', {
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
handler: 'index.handler',
code: Code.fromAsset(path.join(__dirname, 'lambdas', 'approval-requester')),
environment,
Expand All @@ -74,7 +74,7 @@ export class SlackApprovalAction extends Action {
topic.addSubscription(new LambdaSubscription(approvalRequester));

const approvalHandler = new Function(scope, 'SlackApprovalHandlerFunction', {
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
handler: 'index.handler',
code: Code.fromAsset(path.join(__dirname, 'lambdas', 'approval-handler')),
environment,
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk-codepipeline-slack/src/slack-notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class SlackNotifier extends Construct {
}

const notifier = new Function(scope, 'SlackNotifierFunction', {
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
handler: 'index.handler',
code: Code.fromAsset(path.join(__dirname, 'lambdas', 'notifier')),
environment: this.environment,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
},
"Type": "AWS::Lambda::Function",
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk-container-registry/src/image-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class ImageRepository extends Repository {
const rule = this.onImageScanCompleted(id, { imageTags });

const severityFilter = new Function(this, 'SevierityFilter', {
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
code: Code.fromAsset(path.join(__dirname, 'lambdas', 'severity-filter')),
handler: 'index.handler',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
"Timeout": 900,
},
"Type": "AWS::Lambda::Function",
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk-contentful-webhook/src/contentful-webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class ContentfulWebhook extends Construct {

const handler = new aws_lambda.SingletonFunction(this, 'CustomResourceHandler', {
uuid: '91f2075f-b950-4743-a66b-ee0f6febf50d',
runtime: aws_lambda.Runtime.NODEJS_16_X,
runtime: aws_lambda.Runtime.NODEJS_18_X,
code: aws_lambda.Code.fromAsset(path.join(__dirname, 'lambdas', 'contentful-webhook')),
handler: 'index.handler',
lambdaPurpose: 'Custom::ContentfulWebhook',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
"Timeout": 900,
},
"Type": "AWS::Lambda::Function",
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk-deletable-bucket/src/empty-bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class EmptyBucket extends Construct {
const onEvent = new SingletonFunction(this, 'EmptyBucketFunction', {
code: Code.fromAsset(path.join(__dirname, 'lambdas', 'empty-bucket')),
handler: 'index.handler',
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_18_X,
uuid: 'CloudcomponentsEmptyBucketCustomResource',
timeout: Duration.minutes(15),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
"Timeout": 900,
},
"Type": "AWS::Lambda::Function",
Expand Down Expand Up @@ -169,7 +169,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
"Timeout": 900,
},
"Type": "AWS::Lambda::Function",
Expand Down Expand Up @@ -363,7 +363,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
"Timeout": 900,
},
"Type": "AWS::Lambda::Function",
Expand Down Expand Up @@ -493,7 +493,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
"Timeout": 900,
},
"Type": "AWS::Lambda::Function",
Expand Down Expand Up @@ -646,7 +646,7 @@ Object {
"Arn",
],
},
"Runtime": "nodejs16.x",
"Runtime": "nodejs18.x",
"Timeout": 900,
},
"Type": "AWS::Lambda::Function",
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk-dynamodb-seeder/src/dynamodb-seeder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class DynamoDBSeeder extends Construct {

const handler = new lambda.SingletonFunction(this, 'CustomResourceHandler', {
uuid: 'Custom::DynamodbSeeder',
runtime: lambda.Runtime.NODEJS_16_X,
runtime: lambda.Runtime.NODEJS_18_X,
code: lambda.Code.fromAsset(path.join(__dirname, 'lambdas', 'dynamodb-seeder')),
handler: 'index.handler',
lambdaPurpose: 'Custom::DynamodbSeeder',
Expand Down

0 comments on commit 15e7146

Please sign in to comment.