A company is deploying a new web application using AWS App Runner. The application requires access to a database connection string containing sensitive credentials that must be automatically rotated every 30 days. The application also needs access to a database port configuration, which is non-sensitive and static. The company wants to implement a secure solution that minimizes cost and management overhead. Which configuration meets these requirements?
- AStore both the database connection string and the database port as standard String parameters in AWS Systems Manager Parameter Store. Configure an Amazon EventBridge cron rule to trigger an AWS Lambda function that updates the parameters every 30 days.
- Store the database connection string in AWS Secrets Manager and configure automatic rotation every 30 days using an AWS Lambda function. Store the database port as a String parameter in AWS Systems Manager Parameter Store.Answer
- CStore the database connection string as a SecureString parameter in AWS Systems Manager Parameter Store. Enable automatic annual rotation on the AWS KMS key used to encrypt the parameter to rotate the credentials every 30 days.
- DStore the database connection string as a String parameter in AWS Systems Manager Parameter Store. Configure the application to decrypt the string using a hardcoded key stored in the application configuration.
Answer
Store the database connection string in AWS Secrets Manager with automatic rotation configured via an AWS Lambda function, and store the database port as a standard String parameter in AWS Systems Manager Parameter Store.
AWS Secrets Manager is designed for storing sensitive credentials and natively supports automatic rotation using AWS Lambda functions, which aligns with the security requirements. For non-sensitive configurations such as the database port, AWS Systems Manager Parameter Store standard String parameters are the most cost-effective choice since they are free of charge, thus minimizing overall cloud architecture costs.
Step-by-Step Solution
Key Concept
Secrets and Parameter Management
Estimated Time:1m 30s