DVA-C02 · Question #340
A company runs a payment application on Amazon EC2 instances behind an Application Load Balance. The EC2 instances run in an Auto Scaling group across multiple Availability Zones. The application…
The correct answer is D. Store the secrets in AWS Secrets Manager. Provision a new customer master key. Use the key to. AWS Secrets Manager provides built-in automatic rotation, KMS encryption, and IAM-controlled access, satisfying all requirements with the least custom development.
Question
A company runs a payment application on Amazon EC2 instances behind an Application Load Balance. The EC2 instances run in an Auto Scaling group across multiple Availability Zones. The application needs to retrieve application secrets during the application startup and export the secrets as environment variables. These secrets must be encrypted at rest and need to be rotated every month. Which solution will meet these requirements with the LEAST development effort?
Options
- ASave the secrets in a text file and store the text file in Amazon S3. Provision a customer managed
- BSave the secrets as strings in AWS Systems Manager Parameter Store and use the default AWS
- CSave the secrets as base64 encoded environment variables in the application properties.
- DStore the secrets in AWS Secrets Manager. Provision a new customer master key. Use the key to
How the community answered
(25 responses)- A12% (3)
- B4% (1)
- C8% (2)
- D76% (19)
Why each option
AWS Secrets Manager provides built-in automatic rotation, KMS encryption, and IAM-controlled access, satisfying all requirements with the least custom development.
Storing secrets in a plaintext S3 file is insecure at the application layer even with SSE; S3 also has no built-in secret rotation mechanism.
Systems Manager Parameter Store SecureString supports KMS encryption but does not have built-in automatic rotation like Secrets Manager, requiring custom rotation logic.
Base64 encoding environment variables in application properties is not encryption and exposes secrets in plaintext to anyone who can read the configuration.
AWS Secrets Manager natively supports scheduled automatic secret rotation using Lambda functions, encrypts secrets at rest with a customer-managed KMS key, and allows EC2 instances to retrieve secrets at startup via the Secrets Manager API. This satisfies encryption, rotation, and startup retrieval requirements without custom scheduling or rotation code.
Concept tested: AWS Secrets Manager automatic rotation and encrypted secret storage
Source: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html
Community Discussion
No community discussion yet for this question.