Security, Identity, and Compliance
AWS Secrets Manager
Service for storing, retrieving, and rotating secrets such as database credentials, API keys, and OAuth tokens throughout their lifecycle. It helps you avoid hardcoding credentials in code: the application requests them from the service when it needs them, and rotation can be automatic.
Exam phrases that point here
«automatically rotate database credentials»
Secrets Manager rotates secrets on a schedule and updates both the secret and the password in the database, with built-in support for Amazon RDS, Amazon DocumentDB, and Amazon Redshift.
When not: If you only need to store configuration parameters or encrypted values without rotation, AWS Systems Manager Parameter Store may be enough and is simpler.
«remove credentials hardcoded in the application code»
The application requests the secret from Secrets Manager at runtime, with IAM permissions, instead of carrying the password in the code or in a file.
When not: If what the application needs is credentials to call AWS services, the answer is an IAM role with temporary credentials, not a stored secret.
«securely store third-party API keys»
In addition to database credentials, Secrets Manager stores API keys, SaaS or on-premises credentials, and SSH keys, encrypted with KMS.
When not: If what you need to store is an encryption key used to encrypt data, the service is AWS KMS (or CloudHSM), not a secret.
«restrict which teams can read each secret»
IAM policies control who reads or administers each secret; for example, developers with access only to the development secrets.
When not: If the access control being asked for is over who uses an encryption key, it is solved with the KMS key policy.
«rotate credentials without affecting the application»
Rotation tests the new credential before marking it as current, and open connections are not cut because authentication only happens when connecting.
When not: If the application caches the password or keeps it in its configuration and does not request it again, rotation will leave it with an old credential: you have to adapt the application before turning on rotation.
Often paired with
- Amazon RDS
- AWS Lambda
- AWS KMS