Skip to content

Commit fdb0cf1

Browse files
authored
fix(lambda): RuntimeManagementMode.FUNCTION_UPDATE has wrong value (#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*
1 parent 8fb2711 commit fdb0cf1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/@aws-cdk/aws-lambda/lib/runtime-management.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class RuntimeManagementMode {
1616
* With this mode, you can detect and mitigate rare runtime update incompatibilities early.
1717
* When using this mode, you must regularly update your functions to keep their runtime up to date.
1818
*/
19-
public static readonly FUNCTION_UPDATE = new RuntimeManagementMode('Function update');
19+
public static readonly FUNCTION_UPDATE = new RuntimeManagementMode('FunctionUpdate');
2020
/**
2121
* You specify a runtime version in your function configuration.
2222
* The function uses this runtime version indefinitely.

packages/@aws-cdk/aws-lambda/test/runtime-management.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('runtime', () => {
2020
},
2121
});
2222
});
23-
test('Runtime Management Function Update', () => {
23+
test('Runtime Management FunctionUpdate', () => {
2424
// GIVEN
2525
const app = new cdk.App();
2626
const stack = new cdk.Stack(app, 'stack');
@@ -33,7 +33,7 @@ describe('runtime', () => {
3333
// WHEN
3434
Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', {
3535
RuntimeManagementConfig: {
36-
UpdateRuntimeOn: 'Function update',
36+
UpdateRuntimeOn: 'FunctionUpdate',
3737
},
3838
});
3939
});

0 commit comments

Comments
 (0)