Amazon DocumentDB (AWS::DocDB::DBCluster) master user passwords must not be embedded as plaintext in the template or stored as parameter Default values. Exposed credentials in IaC or parameter defaults can be checked into source control or viewed in consoles and lead to unauthorized database access.
For AWS::DocDB::DBCluster resources, validate Resources.<name>.Properties.MasterUserPassword. It must reference an AWS Secrets Manager secret or a parameter that does not define a Default. When using a parameter for passwords, set NoEcho: true and omit Default. Alternatively, use a Secrets Manager dynamic reference or an AWS::SecretsManager::Secret resource and reference its secret value.
Resources with MasterUserPassword set to a literal string, or parameters that include a password-like Default, will be flagged.
Resources:NewAmpApp2:Type:AWS::DocDB::DBClusterProperties:MasterUserPassword:!Sub '{{resolve:secretsmanager:${MyAmpAppSecretManagerRotater}::password}}'Port:27017PreferredBackupWindow:"07:34-08:04"PreferredMaintenanceWindow:"sat:04:51-sat:05:21"SnapshotIdentifier:"sample-cluster-snapshot-id"StorageEncrypted:trueMyAmpAppSecretManagerRotater:Type:AWS::SecretsManager::SecretProperties:Description:'This is my amp app instance secret'GenerateSecretString:SecretStringTemplate:'{"username":"admin"}'GenerateStringKey:'password'PasswordLength:16ExcludeCharacters:'"@/\'