Skip to content

Commit

Permalink
fix: update default runtime to support CDK < 2.105.0 (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
blimmer authored Sep 22, 2024
1 parent d1ccae9 commit 941015e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as child_process from 'child_process';
import * as path from 'path';
import { aws_ec2 as ec2, aws_iam as iam, aws_lambda as lambda, Duration, CustomResource, Token } from 'aws-cdk-lib';
import { PolicyStatement, AddToPrincipalPolicyResult } from 'aws-cdk-lib/aws-iam';
import { RuntimeFamily } from 'aws-cdk-lib/aws-lambda';
import { Construct } from 'constructs';
import { shouldUsePrebuiltLambda } from './config';

Expand Down Expand Up @@ -154,7 +155,7 @@ export class ECRDeployment extends Construct {
this.handler = new lambda.SingletonFunction(this, 'CustomResourceHandler', {
uuid: this.renderSingletonUuid(memoryLimit),
code: getCode(props.buildImage ?? 'golang:1'),
runtime: props.lambdaRuntime ?? lambda.Runtime.PROVIDED_AL2023,
runtime: props.lambdaRuntime ?? new lambda.Runtime('provided.al2023', RuntimeFamily.OTHER), // not using Runtime.PROVIDED_AL2023 to support older CDK versions (< 2.105.0)
handler: props.lambdaHandler ?? 'bootstrap',
environment: props.environment,
lambdaPurpose: 'Custom::CDKECRDeployment',
Expand Down

0 comments on commit 941015e

Please sign in to comment.