A developer is configuring a containerized application running on Amazon ECS that needs to access two settings: a public API endpoint URL (non-sensitive configuration) and a database password for an Amazon RDS database. The database password must be rotated automatically every 30 days. To ensure the design is both secure and cost-effective, which configuration should the developer implement?
- Store the public API endpoint URL as a String parameter in AWS Systems Manager Parameter Store. Store the database password in AWS Secrets Manager and configure automatic rotation using the built-in RDS rotation template.Answer
- BStore both the public API endpoint URL and the database password in AWS Secrets Manager, and enable automatic rotation for both parameters.
- CStore both the public API endpoint URL and the database password as SecureString parameters in AWS Systems Manager Parameter Store, and write a scheduled AWS Lambda function to rotate the password in the database.
- DStore the public API endpoint URL in Systems Manager Parameter Store, and define the database password as a plaintext environment variable in the ECS task definition.
Answer
Store the public API endpoint URL as a String parameter in AWS Systems Manager Parameter Store. Store the database password in AWS Secrets Manager and configure automatic rotation using the built-in RDS rotation template.
The correct configuration uses AWS Systems Manager Parameter Store for non-sensitive parameters like the API endpoint URL, which minimizes costs. It uses AWS Secrets Manager for the database password because Secrets Manager supports native integration with Amazon RDS to automatically rotate the password, fulfilling the security requirement without requiring custom rotation logic.
Step-by-Step Solution
Key Concept
Choosing between AWS Secrets Manager and Systems Manager Parameter Store based on sensitivity, automatic rotation requirements, and cost-effectiveness.