Skip to content

Commit 62cc689

Browse files
suppressed warning on build
1 parent 9ae1aec commit 62cc689

File tree

1 file changed

+11
-0
lines changed
  • source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/lib

1 file changed

+11
-0
lines changed

Diff for: source/patterns/@aws-solutions-constructs/aws-lambda-secretsmanager/lib/index.ts

+11
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,17 @@ export class LambdaToSecretsmanager extends Construct {
123123
this.secret = props.existingSecretObj;
124124
} else {
125125
this.secret = defaults.buildSecretsManagerSecret(this, 'secret', props.secretProps);
126+
127+
// suppress warning on build
128+
const cfnSecret: secretsmanager.CfnSecret = this.secret.node.findChild('Resource') as secretsmanager.CfnSecret;
129+
cfnSecret.cfnOptions.metadata = {
130+
cfn_nag: {
131+
rules_to_suppress: [{
132+
id: 'W77',
133+
reason: `Secrets Manager Secret should explicitly specify KmsKeyId. Besides control of the key this will allow the secret to be shared cross-account`
134+
}]
135+
}
136+
};
126137
}
127138

128139
// Configure environment variables

0 commit comments

Comments
 (0)