How to make bucket or objects public?

0

I created a bucket, used a couple of the settings for blocking access and then couldn't access my files via link for each object. I couldn't find any way to change access--for one object, the option in the Actions was disabled.

So I thought I'd set the bucket up incorrectly. I deleted and tried again, blocking nothing. But I'm in the same boat.

How can I change the access for one object even? I have a video file that I want to stream to Roku. Thanks

GCFAC
asked 7 months ago243 views
2 Answers
1

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.

profile pictureAWS
EXPERT
answered 7 months ago
0

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:

  1. Upload your file to the S3 bucket.
  2. 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:

  1. Go to the AWS Management Console and navigate to the S3 service.
  2. Find the bucket containing the objects you want to make public.
  3. Click on the checkbox next to the object(s) you want to make public.
  4. 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.

profile picture
EXPERT
answered 7 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.

Guidelines for Answering Questions