- Newest
- Most votes
- Most comments
Please refer to this knowledge base article on how to make the bucket or object public. You might also consider using presigned URLs if you only want the object available to you.
To make objects in an AWS S3 bucket public, you need to adjust the permissions either at the bucket level or the individual object level. Here's how you can do it:
Method 1: Making Objects Public during Upload
When you upload an object to an S3 bucket, you can set its permissions to be public. If you're using the AWS Management Console, you can do this by following these steps:
- Upload your file to the S3 bucket.
- In the "Set permissions" section during the upload process, choose Grant public read access.
Method 2: Making Objects Public after Upload
If you've already uploaded the objects and need to make them public afterward, follow these steps:
- Go to the AWS Management Console and navigate to the S3 service.
- Find the bucket containing the objects you want to make public.
- Click on the checkbox next to the object(s) you want to make public.
- Click on the Actions dropdown menu, then select Make public.
Method 3: Adjusting Bucket Policy
You can also set a bucket policy that allows public access to objects in the bucket. Here's a sample bucket policy you can use:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*" } ] }
Replace YOUR_BUCKET_NAME
with the name of your bucket. This policy allows anyone to read objects in your bucket.
Relevant content
- asked 10 months ago
- asked 3 years ago
- AWS OFFICIALUpdated 18 days ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated a year ago