Skip to content

Commit

Permalink
fix(lambda): RuntimeManagementMode.FUNCTION_UPDATE has wrong value (#…
Browse files Browse the repository at this point in the history
…24252)

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

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
iph authored Feb 21, 2023
1 parent 8fb2711 commit fdb0cf1
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 fdb0cf1

Please sign in to comment.