- 新しい順
- 投票が多い順
- コメントが多い順
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.