Description
When KmsKeyId is omitted, Secrets Manager encrypts the secret value with the AWS managed aws/secretsmanager key.
Potential impact
Cross-account access and direct control over the key policy require a customer managed key.
Remediation
Set KmsKeyId to the required customer managed symmetric encryption key. For cross-account access, configure the secret’s resource policy, the caller’s IAM permissions and the KMS key policy.
Examples
String stands for the property values. Keep real secret values out of the template.
Before
yaml
Resources:
SecretsManagerSecret:
Type: AWS::SecretsManager::Secret
Properties:
Description: String
Name: String
SecretString: String
After
yaml
Resources:
SecretsManagerSecret:
Type: AWS::SecretsManager::Secret
Properties:
Description: String
KmsKeyId: String
Name: String
SecretString: String