You discover an S3 bucket with customer data has been public for three months. What now?

IntermediateScenarioSecurity incidents
Answer

Situation read → Close it first, then work out whether anyone actually downloaded it. That answer decides whether this is a reportable breach.

What I'd do →

  1. Block public access on the bucket immediately, then at the account level.
aws s3api put-public-access-block --bucket customer-exports \
  --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
aws s3control put-public-access-block --account-id 111122223333 \
  --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
  1. Check access evidence: S3 server access logs or CloudTrail data events, if enabled. Look for GetObject from unknown IPs.
  2. Bring in security, legal and privacy early; breach notification deadlines (like GDPR's 72 hours) start when you become aware.
  3. Find out how it happened (bucket policy, ACL, a Terraform change) via CloudTrail.
  4. Prevent: account-level Block Public Access in every account, an SCP stopping anyone from disabling it, and AWS Config or Security Hub rules alerting on public buckets.

Why → Account-level Block Public Access overrides bucket policies, so one change protects every bucket.

Interview tip → If data events weren't enabled, say so honestly; you may not be able to prove no one accessed it.

All Real-World Interview questions Roadmap: Interview readiness

More on Security incidents