Interview Prep/DevSecOps/Cloud IAM and Compliance

Someone logged in with the AWS root user last night. How do you react, and how should you have known?

BeginnerScenarioCloud IAM and Compliance
Answer

Situation read → Root use should be almost never. Treat any unplanned root login as an incident until explained.

What I'd do →

  1. Check CloudTrail for ConsoleLogin with userIdentity.type = Root, source IP and what actions followed.
  2. Confirm with the custodian of the root credentials.
  3. If unexplained: reset the password, replace MFA, check for new IAM users, access keys, or changed billing/contact details.
  4. Set up detection: EventBridge rule on root ConsoleLogin sending to Slack/PagerDuty.
  5. With Organizations, use centralised root access management to remove root credentials from member accounts.

Why → Root bypasses IAM policies (though not SCPs in member accounts), so it is the highest-value credential.

Interview tip → Mention the newer AWS feature to remove member-account root credentials.

All DevSecOps questions Roadmap: Policy as code

More on Cloud IAM and Compliance