A company has an on-premises reporting application that must query an Amazon RDS database and write output reports to an Amazon S3 bucket. The application requires database credentials that must be rotated every 30 days. The company's security policy prohibits the use of long-term AWS credentials on-premises and mandates that database passwords must not be stored in plaintext.
Which solution meets these security requirements?
- Configure IAM Roles Anywhere to allow the on-premises application to exchange its X.509 certificate for temporary AWS credentials with permissions to write to the S3 bucket. Store the database credentials in AWS Secrets Manager, configure automatic rotation every 30 days, and retrieve the credentials dynamically using the temporary session.Answer
- BConfigure IAM Roles Anywhere to allow the on-premises application to exchange its X.509 certificate for temporary AWS credentials. Store the database credentials as a standard String parameter in AWS Systems Manager Parameter Store, and run an on-premises scheduled script to rotate the database password and update the parameter value in plaintext every 30 days.
- CCreate an IAM user with a policy that allows writing to the S3 bucket. Generate long-term access keys for this IAM user, store them on the on-premises server, and store the database credentials in an encrypted local configuration file that is updated manually every 30 days.
- DUse the AWS account root user credentials to configure the AWS CLI on the on-premises server to ensure uninterrupted access. Store the database credentials in AWS Secrets Manager, enable automatic rotation every 30 days, and retrieve the database credentials using the root credentials.
Answer
The solution using IAM Roles Anywhere with X.509 certificates and AWS Secrets Manager with automatic rotation.
The correct solution uses IAM Roles Anywhere, which allows workloads outside of AWS (such as on-premises servers) to use local digital certificates (X.509) to obtain temporary AWS credentials, thus avoiding long-term IAM user access keys. It also uses AWS Secrets Manager, which securely encrypts secrets at rest and supports automatic rotation of database credentials out-of-the-box.
Step-by-Step Solution
Key Concept
Securing hybrid cloud access using IAM Roles Anywhere to provide temporary credentials to on-premises workloads, combined with AWS Secrets Manager for encrypted secret storage and automated rotation.