Skip to content

How do I make a single file in an S3 bucket publicly accessible?

0

How do I make a single file in an S3 bucket publicly accessible? I'm new to AWS and using S3 for image storage on a basic website. I don’t want to make the entire bucket public—just one file. What are the exact steps to do this safely?

1 Answer
1
Accepted Answer

Hi, please try the following.

First, ensure bucket settings allow public access: Go to S3 bucket Click on "Permissions" tab Under "Block public access", make sure "Block public access to buckets and objects granted through new public bucket or access point policies" is OFF Also ensure "Block public access to buckets and objects granted through any access control lists (ACLs)" is OFF Make the object public:

Select the file in S3 Click "Actions" dropdown Select "Make public using ACL" Confirm the action

Verify access: Click on the object Copy the "Object URL" Test in a new browser window

Important Security Note: Only make objects public if absolutely necessary. Consider using pre-signed URLs for temporary access or Amazon CloudFront for content delivery instead of making objects directly public.

AWS
answered 10 months ago
AWS
SUPPORT ENGINEER
reviewed 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.