Interview Prep/AWS/Observability, Secrets, KMS and CloudFormation

Where should application database passwords live and how do they rotate?

IntermediateScenarioObservability, Secrets, KMS and CloudFormation
Answer

Situation read → Secrets Manager with managed rotation.

What I'd do →

  1. Create a secret: aws secretsmanager create-secret --name prod/db --secret-string file://creds.json
  2. Enable rotation: aws secretsmanager rotate-secret --secret-id prod/db --rotation-rules AutomaticallyAfterDays=30
  3. Use the multi-user rotation strategy for zero downtime
  4. App reads at runtime, refreshes on auth failure

Why → Rotation without redeploy removes the temptation to never rotate.

Interview tip → Aurora and RDS have managed rotation without custom Lambda.

aws All AWS questions

More on Observability, Secrets, KMS and CloudFormation