Interview Prep/AWS/IAM, Organizations and Multi-Account

How do you rotate IAM access keys used by a legacy app you cannot refactor quickly?

IntermediateScenarioIAM, Organizations and Multi-Account
Answer

Situation read → Two keys per user permit zero-downtime rotation; automation prevents it from being forgotten.

What I'd do →

  1. Create the second key: aws iam create-access-key --user-name legacy-app
  2. Store it in Secrets Manager and update the app configuration
  3. Confirm via aws iam get-access-key-last-used that the new key is in use
  4. Deactivate then delete the old key
  5. Schedule it with a Lambda or Secrets Manager rotation template, and alert via Config rule access-keys-rotated

Why → Overlap eliminates the outage window that makes teams avoid rotation.

Interview tip → Offer the long-term fix: move the app to a role.

aws All AWS questions Roadmap: AWS core services

More on IAM, Organizations and Multi-Account