Skip to Content

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: the primary secret in us-east-1 rotates every 30 days with managed rotation, which also changes the RDS database password; the secret is replicated to us-west-2, where the replica is kept in sync and can be promoted to a standalone secret for disaster recovery AWS Secrets Manager: the primary secret in us-east-1 rotates every 30 days with managed rotation, which also changes the RDS database password; the secret is replicated to us-west-2, where the replica is kept in sync and can be promoted to a standalone secret for disaster recovery

Secrets that rotate themselves, in every Region needed.

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:

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt