Q: A team in AWS Account A is writing data to an S3 bucket in Account B. Account B explicitly grants them `s3:PutObject` in the bucket policy. However, when Account B administrators try to read the files, they get `Access Denied`. Why, and how is it fixed?
Historically, in S3, the AWS account that uploads the object retains explicit ownership and full control of that object, even if the bucket itself belongs to a different account.
Want to master this scenario in a live sandbox? Stephane Maarek's AWS Certified DevOps Engineer Professional Masterclass on Udemy covers this exact problem with hands-on terminal drills.
🛠️ Production Runbook & Step-by-Step Resolution
Direct Answer: "When an interviewer asks how I troubleshoot this in AWS, I frame it through my hands-on production experience. The interviewer is testing: Cross-account S3 Object Ownership.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third."
Production Solution & Architecture
Historically, in S3, the AWS account that uploads the object retains explicit ownership and full control of that object, even if the bucket itself belongs to a different account. Because Account A uploaded the file, Account A owns it, and Account B (the bucket owner) is locked out unless Account A explicitly grants them read ACLs during the upload (--acl bucket-owner-full-control). *The Modern Fix:* In Account B, go to the S3 bucket settings and enable S3 Object Ownership: Bucket owner enforced. This entirely disables all legacy ACLs. The bucket owner (Account B) automatically and forcefully assumes ownership of every file uploaded to the bucket, instantly restoring their read access.
- Immediate Triage: Historically, in S3, the AWS account that uploads the object retains explicit ownership and ful
- Run targeted verification commands before modifying configuration.
- Automate permanent guardrails (CI check, alerts, IaC policy) to prevent recurrence.
Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:
- Relying on legacy bucket ACLs instead of modern S3 Block Public Access and IAM bucket policies when configuring team Account writing AWS recommends disabling ACLs (Bucket Owner Enforced) in favor of centralized declarative bucket policies and account-level Block Public Access controls.
-
Confusing SSE-S3 encryption with KMS customer-managed key (SSE-KMS) authorization policies when configuring team Account writing
Accessing SSE-KMS encrypted objects requires both
s3:GetObjectandkms:Decryptpermissions; neglecting KMS key policies causes silent 403 Forbidden errors. - Using sequential timestamps or predictable prefixes for high-throughput S3 read and write keys when configuring team Account writing Sequential key prefixes limit S3 horizontal partitioning; randomized hash prefixes distribute workloads across partitions to achieve 3,500 PUT and 5,500 GET requests/sec.
- Failing to audit S3 object delete markers when troubleshooting missing versioned objects when configuring team Account writing Issuing a DELETE on a versioned bucket only adds a delete marker; engineers must retrieve previous versions or purge markers to restore data.