A company is deploying a retail application on Amazon EC2 instances. The application requires access to database credentials for an Amazon RDS for MySQL database, which must be rotated automatically every 30 days to comply with security standards. Additionally, the application requires access to a static API key for an external payment gateway provider. This API key must be encrypted at rest but does not require rotation. The company wants to minimize ongoing management costs for storing these credentials. Which combination of actions should a solutions architect recommend to meet these requirements? (Select TWO.)
- Store the database credentials in AWS Secrets Manager, and configure automatic rotation using a built-in rotation template with an AWS Lambda function.Answer
- Store the payment gateway API key as a SecureString parameter in AWS Systems Manager Parameter Store.Answer
- CStore the payment gateway API key as a String parameter in AWS Systems Manager Parameter Store to avoid KMS encryption charges.
- DStore the database credentials in AWS Secrets Manager, and enable automatic key rotation on the associated AWS KMS Customer Managed Key to rotate the database password.
- EStore both the database credentials and the payment gateway API key as String parameters in AWS Systems Manager Parameter Store to eliminate storage costs.
Answer
Store the database credentials in AWS Secrets Manager and configure automatic rotation using an AWS Lambda function, and store the payment gateway API key as a SecureString parameter in AWS Systems Manager Parameter Store.
The database credentials require automatic rotation, which is natively supported by AWS Secrets Manager using Lambda functions. The payment gateway API key is static, so it does not need rotation, and storing it as a SecureString parameter in AWS Systems Manager Parameter Store encrypts the data at rest using AWS KMS while avoiding the monthly per-secret cost of AWS Secrets Manager.
Step-by-Step Solution
Key Concept
Selecting between AWS Secrets Manager and Systems Manager Parameter Store based on credential rotation and cost-optimization requirements.
Estimated Time:2m 0s