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
質問済み 3ヶ月前144ビュー
2回答
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
エキスパート
回答済み 3ヶ月前
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
エキスパート
回答済み 3ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ