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 →
- Check CloudTrail for
ConsoleLoginwithuserIdentity.type = Root, source IP and what actions followed. - Confirm with the custodian of the root credentials.
- If unexplained: reset the password, replace MFA, check for new IAM users, access keys, or changed billing/contact details.
- Set up detection: EventBridge rule on root
ConsoleLoginsending to Slack/PagerDuty. - 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.
More on Cloud IAM and Compliance
You find an IAM policy with `"Action": "*", "Resource": "*"` attached to an application role. How do you right-size it?BeginnerYour company has 40 AWS accounts with no central controls. How do you set up preventive guardrails?IntermediateGuardDuty reports `UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS`. What happened and what do you do?AdvancedYour company must pass SOC 2 Type II in six months. What does DevOps own, and how do you automate evidence?IntermediateA partner needs access to one S3 bucket in your account. How do you set up cross-account access safely?IntermediateHow do you collect logs from 40 accounts so an attacker in one account cannot delete them?Intermediate