While reviewing an AWS CloudFormation template, a security engineer finds a parameter with a default value that exposes an application API key in plaintext. The value is referenced multiple times in the template. The engineer must replace the parameter, keeping the ability to reference the value throughout the template. What is the most secure solution?
Choose an answer
Tap an option to check your answer.
Correct answer: Store the API key in AWS Secrets Manager. In the template, replace references with {{resolve:secretsmanager:MySecretId:SecretString}}..
Why this is the answer
Storing the API key in AWS Secrets Manager is the most secure solution because Secrets Manager is purpose-built for managing, retrieving, and rotating secrets like API keys, database credentials, and other sensitive data. It offers encryption at rest and in transit, fine-grained access control, and integration with CloudFormation's dynamic referencing ({{resolve:secretsmanager:...}}) for secure retrieval during deployment. Storing the API key as a SecureString in AWS Systems Manager Parameter Store is a viable option, but Secrets Manager offers enhanced features specifically for secrets management, such as automatic rotation, which is not available for SecureStrings in Parameter Store. Storing the API key in Amazon DynamoDB or an Amazon S3 bucket is less secure. While both services can store data, they lack the specialized security features, access patterns, and lifecycle management capabilities that Secrets Manager provides for sensitive credentials. Direct storage in these services would require custom encryption and access control mechanisms, increasing complexity and potential for misconfiguration.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed