Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lambda): update Cloudwatch Lambda insights versions #30233

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions packages/aws-cdk-lib/aws-lambda/lib/lambda-insights.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,33 @@ export abstract class LambdaInsightsVersion {
*/
public static readonly VERSION_1_0_229_0 = LambdaInsightsVersion.fromInsightsVersion('1.0.229.0');

/**
* Version 1.0.273.0
*/
public static readonly VERSION_1_0_273_0 = LambdaInsightsVersion.fromInsightsVersion('1.0.273.0');

/**
* Version 1.0.275.0
*/
public static readonly VERSION_1_0_275_0 = LambdaInsightsVersion.fromInsightsVersion('1.0.275.0');

/**
* Version 1.0.295.0
*/
public static readonly VERSION_1_0_295_0 = LambdaInsightsVersion.fromInsightsVersion('1.0.295.0');

/**
* Version 1.0.317.0
* Important - this version includes the removal of support for the Amazon Linux 1 platform.
*/
public static readonly VERSION_1_0_317_0 = LambdaInsightsVersion.fromInsightsVersion('1.0.317.0');

/**
* The latest layer version available in this CDK version. New versions could
* introduce incompatible changes. Make sure to test them before deploying to production.
*/
public static readonly LATEST = this.VERSION_1_0_317_0

/**
* Use the insights extension associated with the provided ARN. Make sure the ARN is associated
* with same region as your function
Expand Down
11 changes: 11 additions & 0 deletions packages/aws-cdk-lib/aws-lambda/test/lambda-insights.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,15 @@ describe('lambda-insights', () => {
Layers: ['arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:21'],
});
});
test('LATEST links to v1.0.317.0', () => {
const app = new cdk.App();
const stack = new cdk.Stack(app, 'Stack', {
env: { account: '123456789012', region: 'us-east-1' },
});
functionWithInsightsVersion(stack, 'MyLambda', lambda.LambdaInsightsVersion.LATEST, lambda.Architecture.X86_64);

Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', {
Layers: ['arn:aws:lambda:us-east-1:580247275435:layer:LambdaInsightsExtension:52'],
});
});
});
Loading
Loading