An enterprise is deploying a microservices application on Amazon ECS using the AWS Fargate launch type. The application requires access to two sensitive values: a database password for an Amazon Aurora PostgreSQL DB cluster, and a static API key for a third-party payment provider. The security requirements mandate that: 1. The database password must be rotated automatically every 30 days. 2. The third-party API key must be encrypted at rest and retrieved securely by the ECS tasks at startup, but it does not require rotation. 3. Access to all credentials must be monitored and audited. 4. The architecture must minimize operational complexity and cost. Which approach meets these requirements?
- AStore the database password in AWS Systems Manager Parameter Store as a SecureString parameter and enable AWS KMS automatic key rotation on the Customer Managed Key (CMK) used to encrypt the parameter. Store the third-party API key as a String parameter in Parameter Store.
- BStore both the database password and the third-party API key as String parameters in AWS Systems Manager Parameter Store. Configure an IAM task execution role for the ECS tasks to restrict access to the parameters, and retrieve them directly from the container applications.
- Store the database password in AWS Secrets Manager and configure automatic rotation using the built-in integration for Amazon RDS. Store the third-party API key in AWS Systems Manager Parameter Store as a SecureString parameter, and reference this parameter in the container definition of the Amazon ECS task definition.Cevap
- DStore the database password in AWS Systems Manager Parameter Store as a SecureString parameter. Write a custom AWS Lambda function triggered by an Amazon EventBridge scheduled rule to update both the Parameter Store value and the database password every 30 days. Store the third-party API key as a String parameter in Parameter Store.
Cevap
Store the database password in AWS Secrets Manager with built-in RDS rotation, and store the third-party API key in AWS Systems Manager Parameter Store as a SecureString parameter injected into the ECS tasks at startup.
The correct architecture uses AWS Secrets Manager for the Aurora PostgreSQL password because it natively integrates with RDS to handle database credential rotation automatically without code changes or operational overhead. It uses AWS Systems Manager Parameter Store with a SecureString parameter for the payment provider API key because it does not require rotation, making Parameter Store a more cost-effective solution. Referencing the Parameter Store SecureString in the ECS task definition ensures the secret is fetched at task startup and injected as an environment variable, minimizing runtime API costs and latency.
Adım Adım Çözüm
Anahtar Kavram
Selecting and integrating Secrets Manager and Systems Manager Parameter Store based on automatic rotation needs, cost, and security.
Tahmini Süre:2m 0s