Skip to content

Commit 4de51f7

Browse files
author
Niranjan Jayakar
committed
fix(lambda): incorrect values for prop UntrustedArtifactOnDeployment
The allowed values for `UntrustedArtifactOnDeployment` in the `AWS::Lambda::CodeSigningConfig` resource type are 'Warn' and 'Enforce'. This was incorrectly set in the CDK. fixes #13586
1 parent 4934937 commit 4de51f7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/@aws-cdk/aws-lambda/lib/code-signing-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ export enum UntrustedArtifactOnDeployment {
1010
/**
1111
* Lambda blocks the deployment request if signature validation checks fail.
1212
*/
13-
ENFORCE = 'enforce',
13+
ENFORCE = 'Enforce',
1414

1515
/**
1616
* Lambda allows the deployment of the code package, but issues a warning.
1717
* Lambda issues a new Amazon CloudWatch metric, called a signature validation error and also stores the warning in CloudTrail.
1818
*/
19-
WARN = 'warn',
19+
WARN = 'Warn',
2020
}
2121

2222
/**

packages/@aws-cdk/aws-lambda/test/code-signing-config.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('code signing config', () => {
2828
}],
2929
},
3030
CodeSigningPolicies: {
31-
UntrustedArtifactOnDeployment: lambda.UntrustedArtifactOnDeployment.WARN,
31+
UntrustedArtifactOnDeployment: 'Warn',
3232
},
3333
});
3434
});
@@ -78,7 +78,7 @@ describe('code signing config', () => {
7878

7979
expect(stack).toHaveResource('AWS::Lambda::CodeSigningConfig', {
8080
CodeSigningPolicies: {
81-
UntrustedArtifactOnDeployment: lambda.UntrustedArtifactOnDeployment.ENFORCE,
81+
UntrustedArtifactOnDeployment: 'Enforce',
8282
},
8383
Description: 'test description',
8484
});

0 commit comments

Comments
 (0)