AWS Secrets Manager
AWS Secrets Manager for storing and rotating secrets, managed rotation and Lambda rotation, integration with RDS and Aurora, multi-Region secrets, and Secrets Manager vs Parameter Store.
What it is
AWS Secrets Manager is a service meant for storing secrets: database credentials, API keys, OAuth tokens.
- The capability to force rotation of secrets every X days.
- Automate generation of secrets on rotation:
- managed rotation for many services, with nothing to deploy;
- a Lambda function for other secrets.
- Integration with Amazon RDS (MySQL, PostgreSQL, Aurora) and other databases: rotation changes the password in the database and in the secret together.
- Secrets are encrypted with KMS.
- Mostly meant for RDS integration.
- About $0.40 per secret per month plus $0.05 per 10,000 API calls.
Multi-Region secrets
- Replicate secrets across multiple AWS Regions.
- Secrets Manager keeps read replicas in sync with the primary secret.
- A read replica secret can be promoted to a standalone secret.
- Use cases: multi-Region apps, disaster recovery strategies, multi-Region databases…
Secrets Manager vs Parameter Store
- Secrets Manager: more expensive; automatic rotation (managed, or a Lambda function), deep integration with RDS, Redshift, DocumentDB; KMS encryption is mandatory; multi-Region replication.
- Parameter Store: cheaper (standard parameters are free), simple API; no built-in rotation (it could be built with an EventBridge schedule and Lambda); KMS encryption is optional; can read Secrets Manager secrets through the
/aws/reference/secretsmanager/path.
Real-world examples
- A company stores its Aurora admin password in Secrets Manager with 30-day managed rotation; applications fetch the current password at connection time and nobody ever sees it.
- A multi-Region app replicates its API keys to a second Region, so the standby stack can start without manual secret copying.
Exam tips
- "Rotate database credentials automatically" → Secrets Manager.
- "Store RDS credentials securely, no passwords in code" → Secrets Manager (with RDS integration).
- "Same secret in several Regions", "DR for secrets" → multi-Region secrets.
- "Cheapest way to store config and secrets, no rotation needed" → Parameter Store.
Common traps
- "Parameter Store and Secrets Manager are the same." Only Secrets Manager rotates secrets automatically.
Check yourself
Secrets Manager has a 30-day free trial per secret, but rotation needs a database, so instead:
Store the password in Secrets Manager with automatic (managed) rotation every 30 days; applications read the secret at connection time instead of hard-coding it.
AWS documentation
SSM Parameter Store
AWS Systems Manager Parameter Store for configuration and secrets, SecureString encryption with KMS, parameter hierarchies, standard and advanced tiers, and parameter policies.
AWS Certificate Manager (ACM)
AWS Certificate Manager for public and private TLS certificates, requesting and validating certificates, automatic renewal, imported certificates and expiry monitoring, and ACM with load balancers and API Gateway.