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

Respond to a GuardDuty finding: `UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration`.

AdvancedScenarioObservability, Secrets, KMS and CloudFormation
Answer

Situation read → Instance role credentials used from outside AWS.

What I'd do →

  1. Revoke sessions: attach AWSRevokeOlderSessions style deny with aws:TokenIssueTime condition
  2. Isolate instance with a quarantine SG
  3. Snapshot disk and memory for forensics
  4. Review CloudTrail for actions
  5. Enforce IMDSv2 and rotate secrets

Why → Revoking sessions invalidates stolen tokens.

Interview tip → Isolate before terminate.

aws All AWS questions

More on Observability, Secrets, KMS and CloudFormation