Skip to content

Commit

Permalink
fix(lambda): Update RuntimeManagementConfig enum to be correct
Browse files Browse the repository at this point in the history
According to the Lambda docs, there is no space for FunctionUpdate.
This commit uses the correct value, as specified here:

https://docs.aws.amazon.com/lambda/latest/dg/API_PutRuntimeManagementConfig.html#API_PutRuntimeManagementConfig_RequestSyntax
  • Loading branch information
iph committed Feb 21, 2023
1 parent 8fb2711 commit 3c1fec7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda/lib/runtime-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class RuntimeManagementMode {
* With this mode, you can detect and mitigate rare runtime update incompatibilities early.
* When using this mode, you must regularly update your functions to keep their runtime up to date.
*/
public static readonly FUNCTION_UPDATE = new RuntimeManagementMode('Function update');
public static readonly FUNCTION_UPDATE = new RuntimeManagementMode('FunctionUpdate');
/**
* You specify a runtime version in your function configuration.
* The function uses this runtime version indefinitely.
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-lambda/test/runtime-management.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('runtime', () => {
},
});
});
test('Runtime Management Function Update', () => {
test('Runtime Management FunctionUpdate', () => {
// GIVEN
const app = new cdk.App();
const stack = new cdk.Stack(app, 'stack');
Expand All @@ -33,7 +33,7 @@ describe('runtime', () => {
// WHEN
Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', {
RuntimeManagementConfig: {
UpdateRuntimeOn: 'Function update',
UpdateRuntimeOn: 'FunctionUpdate',
},
});
});
Expand Down

0 comments on commit 3c1fec7

Please sign in to comment.