1 Answer
- Newest
- Most votes
- Most comments
1
To create an S3 bucket policy that makes all objects uploaded to the bucket publicly accessible, you can define a policy that grants read permissions to everyone (*). Below is an example policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::your-bucket-name/*"
}
]
}
Replace "your-bucket-name" with the name of your S3 bucket. This policy allows anyone (the * symbol in the "Principal") to retrieve (GetObject) any object (*) within the specified bucket.
**To apply this policy: **
- Open the Amazon S3 console.
- Select your bucket.
- Go to the "Permissions" tab.
- Click "Bucket Policy".
- Paste the policy JSON into the policy editor.
- Click "Save".
answered 17 days ago
Relevant content
- Accepted Answerasked 10 months ago
- asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 8 months ago