A company's security team discovers that database credentials are stored in plaintext in application configuration files. The team wants to implement a secure way to store, manage, and automatically rotate these credentials every 90 days. The solution must provide fine-grained IAM policies to control which users and applications can access the secrets and must integrate with AWS services like Amazon RDS for automatic rotation. Which AWS service should the company use to meet these requirements?
Secrets Manager is the correct service. It provides native support for automatic rotation of credentials, including built-in integration with Amazon RDS. It also offers fine-grained IAM policies and central management of secrets, meeting all stated requirements.
Why this answer
AWS Secrets Manager is the correct service because it is purpose-built for securely storing, managing, and automatically rotating database credentials. It supports automatic rotation every 90 days for Amazon RDS, Aurora, Redshift, and DocumentDB with built-in Lambda rotation functions, and it integrates with IAM for fine-grained access control via resource-based and identity-based policies.
Exam trap
The trap here is that candidates often confuse AWS Systems Manager Parameter Store (which can store secrets but lacks native rotation) with Secrets Manager, leading them to choose Parameter Store when the question explicitly requires automatic rotation.
Why the other options are wrong
AWS Systems Manager Parameter Store does not support automatic rotation of secrets; it requires custom solutions for rotation. It also lacks fine-grained IAM policies for secret access control compared to Secrets Manager.
AWS KMS is a key management service for encryption keys, not for storing and rotating secrets like database credentials. It does not provide automatic rotation of secrets or fine-grained IAM policies for secret access.
IAM is used for managing users, groups, roles, and permissions, not for storing, managing, or rotating secrets like database credentials. It does not provide secret storage or automatic rotation capabilities.
When would these options actually be correct?
A company needs to store configuration data (e.g., database endpoints, AMI IDs) that does not require automatic rotation or fine-grained access policies. The solution must be cost-effective and integrate with EC2, Lambda, or other AWS services via simple parameter retrieval.
A company needs to encrypt data at rest in an S3 bucket and wants to use a customer-managed key with automatic annual rotation. AWS KMS would be the correct service to create and manage the encryption key.
A question asking which AWS service is used to define fine-grained permissions for users and applications to access AWS resources, such as controlling access to an S3 bucket or EC2 instances, would have IAM as the correct answer.
Why candidates pick the wrong answer
Candidates may confuse Parameter Store with Secrets Manager because both can store secrets, but they overlook the specific requirements for automatic rotation and fine-grained IAM policies that are unique to Secrets Manager.
Candidates may confuse KMS with Secrets Manager because both involve encryption and rotation, but KMS manages encryption keys, not secrets like credentials.
Candidates may confuse IAM's role in access control with secret management, thinking that IAM policies alone can secure credentials, but IAM does not store or rotate secrets.