A developer is configuring an application deployed on AWS App Runner in Account A. The application needs to retrieve database credentials to connect to an Amazon RDS database hosted in Account B. The database credentials must be rotated automatically every 30 days. Additionally, the application requires access to a public API endpoint URL that is non-sensitive and does not change. The developer wants to implement a secure, cost-effective parameter storage solution that allows cross-account access where necessary. Which combination of actions should the developer take to meet these requirements? (Select TWO.)
- Store the database credentials in AWS Secrets Manager in Account B, configure automatic rotation, and attach a resource-based policy to the secret that grants retrieve permissions to the App Runner instance role in Account A.Answer
- Store the public API endpoint URL in AWS Systems Manager Parameter Store in Account A as a Standard String parameter.Answer
- CStore the database credentials in AWS Systems Manager Parameter Store in Account B as a SecureString parameter, and attach a resource-based policy to the parameter to grant access to Account A.
- DStore the public API endpoint URL in AWS Secrets Manager in Account A, and configure a custom Lambda function to rotate the URL daily to optimize storage costs.
- EHardcode the database credentials in the application's configuration file within the App Runner container image, and restrict access to the container image using Amazon ECR repository policies.
Answer
Store the database credentials in AWS Secrets Manager in Account B with a resource-based policy granting access to Account A, and store the public API endpoint URL in AWS Systems Manager Parameter Store in Account A as a Standard String parameter.
The correct options are to store the database credentials in AWS Secrets Manager in Account B with a resource-based policy, and store the public API endpoint URL in AWS Systems Manager Parameter Store in Account A. AWS Secrets Manager supports automatic rotation and allows direct cross-account access via resource-based policies. Systems Manager Parameter Store is a cost-effective choice for non-sensitive, static configurations since standard parameters have no storage costs.
Step-by-Step Solution
Key Concept
Secrets Manager vs Parameter Store feature comparison, including rotation, pricing, and cross-account capabilities.