Operational Excellence and Automation

A reusable CloudFormation template must create a different database password for each stack without accepting or embedding plaintext passwords. Which approach meets this requirement?

Show the answer

Correct answerD. Create an AWS::SecretsManager::Secret resource with GenerateSecretString.

AWhy not this: Importing one shared password does not create a different password for each stack and exposes it through stack outputs.

BWhy not this: A shared default reuses the password and remains visible in the template despite NoEcho.

CWhy not this: Base64 is reversible encoding, not secret protection, and the embedded password would be reused.

DWhy this is right: Secrets Manager generates a password for each secret resource without requiring plaintext password input.

GenerateSecretString creates a secret value for each newly created secret resource without embedding the password in the template. NoEcho masks parameter values in certain displays but does not generate passwords or protect a plaintext default in the template.