Your S3 Website Returns 403. Make the Bucket Public?
Objects in S3 return 403 and a teammate wants to turn off Block Public Access to fix it fast. Defend the right way to grant access.
Answer key reviewed by Branko Petric
Read first: AWS S3: Object Storage Explained
Your decision
Your app gets 403 AccessDenied fetching objects from a private S3 bucket. A teammate says just turn off Block Public Access and make the bucket public so it works. Do you agree, and what do you do instead?
The situation
Your web app started returning 403 AccessDenied when it loads files from an S3 bucket that has always been private. It worked in another environment, so something about access is misconfigured here.
Context
Block Public Access is on for the account and the bucket. The app runs on AWS with its own IAM role. A teammate is under deadline pressure and says the simplest fix is to turn off Block Public Access and add a policy that allows everyone to read the bucket, so the 403 just goes away. The bucket also holds some files that were never meant to be shared.
Related challenges
- Cross-Account S3 Access Still Fails. Just Open It Up?
A partner account still gets AccessDenied on your encrypted S3 objects after you added a bucket policy. A teammate wants to make the bucket and key public. Defend the right fix.
- Access Keys Are Hardcoded on the EC2 Box. Just Rotate Them?
An app on EC2 authenticates to AWS with long-lived IAM user keys in a config file. One leaked. Defend the real fix.
- The t3 Instance Got Slow. Just Size It Up?
An app on a t3 instance crawls under steady load and a teammate wants a bigger instance. Defend what is actually throttling it.
- Lambda Is Exhausting Your RDS Connections. Raise the Limit?
Under load, Lambda functions fail with too many connections to RDS. A teammate wants to bump max_connections. Defend the real fix.