Interview Prep/DevSecOps/Cloud IAM and Compliance

A KMS key policy was edited and now nobody, including admins, can use or manage the key. What do you do?

AdvancedScenarioCloud IAM and Compliance
Answer

Situation read → Key policies are the primary access control for KMS. If the policy excludes the account root principal, IAM policies cannot help.

What I'd do →

  1. Check if any principal in the policy still has kms:PutKeyPolicy; use it to restore the standard root-account statement.
  2. If none, open a case with AWS Support; they can help in some cases but it is slow and not guaranteed.
  3. Meanwhile, assess impact: which data and services depend on the key.
  4. Prevent: manage key policies in IaC with review, always include arn:aws:iam::<acct>:root with kms:*, and use the KMS policy lockout safety check (do not bypass it).

Why → A locked-out key can mean permanently unreadable data.

Interview tip → Mention BypassPolicyLockoutSafetyCheck and why you never set it to true casually.

All DevSecOps questions Roadmap: Policy as code

More on Cloud IAM and Compliance