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 Original file line number Diff line number Diff line change @@ -123,6 +123,17 @@ export class LambdaToSecretsmanager extends Construct {
123
123
this . secret = props . existingSecretObj ;
124
124
} else {
125
125
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
+ } ;
126
137
}
127
138
128
139
// Configure environment variables
You can’t perform that action at this time.
0 commit comments