From 8d74c9aaabb24a8dc8c69d5e5bbd30c5552ad7fe Mon Sep 17 00:00:00 2001 From: Jericho Tolentino <68654047+jericht@users.noreply.github.com> Date: Fri, 17 Jun 2022 16:14:17 -0500 Subject: [PATCH] chore: update lambda runtimes to node 16 (#704) --- packages/aws-rfdk/lib/core/lib/exporting-log-group.ts | 2 +- packages/aws-rfdk/lib/core/lib/health-monitor.ts | 2 +- packages/aws-rfdk/lib/core/lib/imported-acm-certificate.ts | 2 +- packages/aws-rfdk/lib/core/lib/mongodb-post-install.ts | 2 +- packages/aws-rfdk/lib/core/lib/pad-efs-storage.ts | 2 +- packages/aws-rfdk/lib/core/lib/staticip-server.ts | 2 +- packages/aws-rfdk/lib/core/lib/x509-certificate.ts | 2 +- packages/aws-rfdk/lib/core/test/mongodb-post-install.test.ts | 2 +- packages/aws-rfdk/lib/core/test/pad-efs-storage.test.ts | 4 ++-- packages/aws-rfdk/lib/core/test/staticip-server.test.ts | 2 +- .../aws-rfdk/lib/deadline/lib/configure-spot-event-plugin.ts | 2 +- packages/aws-rfdk/lib/deadline/lib/thinkbox-docker-images.ts | 2 +- packages/aws-rfdk/lib/deadline/lib/version-query.ts | 2 +- packages/aws-rfdk/lib/deadline/lib/wait-for-stable-service.ts | 2 +- packages/aws-rfdk/lib/deadline/test/version-query.test.ts | 2 +- .../lib/deadline/test/wait-for-stable-service.test.ts | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/aws-rfdk/lib/core/lib/exporting-log-group.ts b/packages/aws-rfdk/lib/core/lib/exporting-log-group.ts index 2b12ba74b..009e1f6d7 100644 --- a/packages/aws-rfdk/lib/core/lib/exporting-log-group.ts +++ b/packages/aws-rfdk/lib/core/lib/exporting-log-group.ts @@ -138,7 +138,7 @@ export class ExportingLogGroup extends Construct { handler: 'index.handler', lambdaPurpose: 'LogGroupExporter', logRetention: RetentionDays.ONE_DAY, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, uuid: this.LOG_EXPORTER_UUID, }); diff --git a/packages/aws-rfdk/lib/core/lib/health-monitor.ts b/packages/aws-rfdk/lib/core/lib/health-monitor.ts index e33668b8e..28be0dddb 100644 --- a/packages/aws-rfdk/lib/core/lib/health-monitor.ts +++ b/packages/aws-rfdk/lib/core/lib/health-monitor.ts @@ -394,7 +394,7 @@ export class HealthMonitor extends HealthMonitorBase { this.unhealthyFleetActionLambda = new SingletonFunction(this, 'UnhealthyFleetAction', { code: Code.fromAsset(path.join(__dirname, '..', '..', 'lambdas', 'nodejs', 'unhealthyFleetAction')), - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'index.handler', lambdaPurpose: 'unhealthyFleetTermination', timeout: Duration.seconds(300), diff --git a/packages/aws-rfdk/lib/core/lib/imported-acm-certificate.ts b/packages/aws-rfdk/lib/core/lib/imported-acm-certificate.ts index 2b88c0f10..1ead92770 100644 --- a/packages/aws-rfdk/lib/core/lib/imported-acm-certificate.ts +++ b/packages/aws-rfdk/lib/core/lib/imported-acm-certificate.ts @@ -165,7 +165,7 @@ export class ImportedAcmCertificate extends Construct implements ICertificate { }, layers: [ openSslLayer ], retryAttempts: 0, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, timeout: Duration.minutes(5), }); diff --git a/packages/aws-rfdk/lib/core/lib/mongodb-post-install.ts b/packages/aws-rfdk/lib/core/lib/mongodb-post-install.ts index 5d156f10e..bb5284e54 100644 --- a/packages/aws-rfdk/lib/core/lib/mongodb-post-install.ts +++ b/packages/aws-rfdk/lib/core/lib/mongodb-post-install.ts @@ -198,7 +198,7 @@ export class MongoDbPostInstallSetup extends Construct { environment: { DEBUG: 'false', }, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'mongodb.configureMongo', layers: [ openSslLayer ], timeout: Duration.minutes(2), diff --git a/packages/aws-rfdk/lib/core/lib/pad-efs-storage.ts b/packages/aws-rfdk/lib/core/lib/pad-efs-storage.ts index 1f9844e38..c125f413f 100644 --- a/packages/aws-rfdk/lib/core/lib/pad-efs-storage.ts +++ b/packages/aws-rfdk/lib/core/lib/pad-efs-storage.ts @@ -196,7 +196,7 @@ export class PadEfsStorage extends Construct { const lambdaProps: any = { code: Code.fromAsset(path.join(__dirname, '..', '..', 'lambdas', 'nodejs')), - runtime: Runtime.NODEJS_14_X, + runtime: Runtime.NODEJS_16_X, logRetention: RetentionDays.ONE_WEEK, // Required for access point... vpc: props.vpc, diff --git a/packages/aws-rfdk/lib/core/lib/staticip-server.ts b/packages/aws-rfdk/lib/core/lib/staticip-server.ts index 479a082f6..e2f314fbf 100644 --- a/packages/aws-rfdk/lib/core/lib/staticip-server.ts +++ b/packages/aws-rfdk/lib/core/lib/staticip-server.ts @@ -324,7 +324,7 @@ export class StaticPrivateIpServer extends Construct implements IConnectable, IG eventHandler = new LambdaFunction(stack, functionUniqueId, { code: handlerCode, handler: 'index.handler', - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, description: `Created by RFDK StaticPrivateIpServer to process instance launch lifecycle events in stack '${stack.stackName}'. This lambda attaches an ENI to newly launched instances.`, logRetention: RetentionDays.THREE_DAYS, }); diff --git a/packages/aws-rfdk/lib/core/lib/x509-certificate.ts b/packages/aws-rfdk/lib/core/lib/x509-certificate.ts index 3453ce796..3406a7789 100644 --- a/packages/aws-rfdk/lib/core/lib/x509-certificate.ts +++ b/packages/aws-rfdk/lib/core/lib/x509-certificate.ts @@ -199,7 +199,7 @@ abstract class X509CertificateBase extends Construct { DATABASE: this.database.tableName, DEBUG: 'false', }, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, layers: [ openSslLayer ], handler: props.lambdaHandler, timeout: Duration.seconds(90), diff --git a/packages/aws-rfdk/lib/core/test/mongodb-post-install.test.ts b/packages/aws-rfdk/lib/core/test/mongodb-post-install.test.ts index 95f1b0350..85e165493 100644 --- a/packages/aws-rfdk/lib/core/test/mongodb-post-install.test.ts +++ b/packages/aws-rfdk/lib/core/test/mongodb-post-install.test.ts @@ -119,7 +119,7 @@ describe('MongoDbPostInstall', () => { DEBUG: 'false', }, }, - Runtime: 'nodejs12.x', + Runtime: 'nodejs16.x', VpcConfig: { SecurityGroupIds: [ { diff --git a/packages/aws-rfdk/lib/core/test/pad-efs-storage.test.ts b/packages/aws-rfdk/lib/core/test/pad-efs-storage.test.ts index 49b38de8e..32eb23ee4 100644 --- a/packages/aws-rfdk/lib/core/test/pad-efs-storage.test.ts +++ b/packages/aws-rfdk/lib/core/test/pad-efs-storage.test.ts @@ -79,7 +79,7 @@ describe('Test PadEfsStorage', () => { }, ], Handler: 'pad-efs-storage.getDiskUsage', - Runtime: 'nodejs14.x', + Runtime: 'nodejs16.x', Timeout: 300, VpcConfig: { SecurityGroupIds: [ stack.resolve(sg.securityGroupId) ], @@ -104,7 +104,7 @@ describe('Test PadEfsStorage', () => { }, ], Handler: 'pad-efs-storage.padFilesystem', - Runtime: 'nodejs14.x', + Runtime: 'nodejs16.x', Timeout: 900, VpcConfig: { SecurityGroupIds: [ stack.resolve(sg.securityGroupId) ], diff --git a/packages/aws-rfdk/lib/core/test/staticip-server.test.ts b/packages/aws-rfdk/lib/core/test/staticip-server.test.ts index c81135b6d..f0a6564b3 100644 --- a/packages/aws-rfdk/lib/core/test/staticip-server.test.ts +++ b/packages/aws-rfdk/lib/core/test/staticip-server.test.ts @@ -88,7 +88,7 @@ describe('Test StaticIpServer', () => { cdkExpect(stack).to(haveResourceLike('AWS::Lambda::Function', { Handler: 'index.handler', - Runtime: 'nodejs12.x', + Runtime: 'nodejs16.x', Description: 'Created by RFDK StaticPrivateIpServer to process instance launch lifecycle events in stack \'StackName\'. This lambda attaches an ENI to newly launched instances.', })); diff --git a/packages/aws-rfdk/lib/deadline/lib/configure-spot-event-plugin.ts b/packages/aws-rfdk/lib/deadline/lib/configure-spot-event-plugin.ts index e0db900ae..beaf22b74 100644 --- a/packages/aws-rfdk/lib/deadline/lib/configure-spot-event-plugin.ts +++ b/packages/aws-rfdk/lib/deadline/lib/configure-spot-event-plugin.ts @@ -448,7 +448,7 @@ export class ConfigureSpotEventPlugin extends Construct { DEBUG: 'false', LAMBDA_TIMEOUT_MINS: timeoutMins.toString(), }, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'configure-spot-event-plugin.configureSEP', timeout: Duration.minutes(timeoutMins), logRetention: RetentionDays.ONE_WEEK, diff --git a/packages/aws-rfdk/lib/deadline/lib/thinkbox-docker-images.ts b/packages/aws-rfdk/lib/deadline/lib/thinkbox-docker-images.ts index 8a517fe75..562e2017d 100644 --- a/packages/aws-rfdk/lib/deadline/lib/thinkbox-docker-images.ts +++ b/packages/aws-rfdk/lib/deadline/lib/thinkbox-docker-images.ts @@ -195,7 +195,7 @@ AWS Thinkbox EULA. uuid: '08553416-1fc9-4be9-a818-609a31ae1b5b', description: 'Used by the ThinkboxDockerImages construct to look up the ECR repositories where AWS Thinkbox publishes Deadline container images.', code: lambdaCode, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'ecr-provider.handler', timeout: Duration.seconds(30), logRetention: RetentionDays.ONE_WEEK, diff --git a/packages/aws-rfdk/lib/deadline/lib/version-query.ts b/packages/aws-rfdk/lib/deadline/lib/version-query.ts index d7e282d71..fad726784 100644 --- a/packages/aws-rfdk/lib/deadline/lib/version-query.ts +++ b/packages/aws-rfdk/lib/deadline/lib/version-query.ts @@ -168,7 +168,7 @@ export class VersionQuery extends VersionQueryBase { uuid: '2e19e243-16ee-4d1a-a3c9-18d35eddd446', description: 'Used by the Version construct to get installer locations for a specific Deadline version.', code: lambdaCode, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'version-provider.handler', timeout: Duration.seconds(30), logRetention: RetentionDays.ONE_WEEK, diff --git a/packages/aws-rfdk/lib/deadline/lib/wait-for-stable-service.ts b/packages/aws-rfdk/lib/deadline/lib/wait-for-stable-service.ts index 95ac95a5b..546458961 100644 --- a/packages/aws-rfdk/lib/deadline/lib/wait-for-stable-service.ts +++ b/packages/aws-rfdk/lib/deadline/lib/wait-for-stable-service.ts @@ -74,7 +74,7 @@ export class WaitForStableService extends Construct { environment: { DEBUG: 'false', }, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'wait-for-stable-service.wait', timeout: Duration.minutes(15), logRetention: RetentionDays.ONE_WEEK, diff --git a/packages/aws-rfdk/lib/deadline/test/version-query.test.ts b/packages/aws-rfdk/lib/deadline/test/version-query.test.ts index 59f53506a..aa0b158af 100644 --- a/packages/aws-rfdk/lib/deadline/test/version-query.test.ts +++ b/packages/aws-rfdk/lib/deadline/test/version-query.test.ts @@ -64,7 +64,7 @@ test('VersionQuery constructor full version', () => { 'Arn', ], }, - Runtime: 'nodejs12.x', + Runtime: 'nodejs16.x', })); }); diff --git a/packages/aws-rfdk/lib/deadline/test/wait-for-stable-service.test.ts b/packages/aws-rfdk/lib/deadline/test/wait-for-stable-service.test.ts index d3e43a162..7155a780c 100644 --- a/packages/aws-rfdk/lib/deadline/test/wait-for-stable-service.test.ts +++ b/packages/aws-rfdk/lib/deadline/test/wait-for-stable-service.test.ts @@ -89,7 +89,7 @@ describe('WaitForStableService', () => { DEBUG: 'false', }, }, - Runtime: 'nodejs12.x', + Runtime: 'nodejs16.x', Timeout: 900, })); });