Interview Prep/DevSecOps/Incident Response and Governance

You find a ransom note in an S3 bucket and most objects have been deleted. What do you do in the first hour?

AdvancedScenarioIncident Response and Governance
Answer

Situation read → Cloud ransomware usually means stolen credentials with s3:DeleteObject or s3:PutObject rights. Contain the identity first, then recover data.

What I'd do →

  1. Find the principal in CloudTrail data events (or S3 server access logs):
    aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=DeleteObjects \
      --start-time 2026-11-08T00:00:00Z --max-results 50
    
  2. Disable that access key or attach a deny-all policy to the role; revoke active sessions.
  3. Add a bucket policy denying writes and deletes to everyone except the IR role.
  4. Recover: if versioning was on, remove delete markers; otherwise restore from AWS Backup or the replicated bucket.
  5. Check for exfiltration (GetObject volume) because that changes the notification duties.
  6. Do not pay or contact the attacker without legal and leadership involvement.

Why → Versioning, Object Lock and cross-account backups decide whether this is a bad day or a business-ending one.

Interview tip → Mention S3 Object Lock in compliance mode for critical data.

All DevSecOps questions

More on Incident Response and Governance