Articles → AWS → Create A Policy For The AWS S3 Bucket
Create A Policy For The AWS S3 Bucket
Scenario
 
Creation Of Bucket
 
- Uncheck the Block all public access checkbox
 - Check the checkbox I acknowledge that the current settings might result in this bucket and the objects within becoming public.
 
Click to Enlarge
Create The Policy JSON Using The AWS Policy Generator Tool
 
| Field | Value | 
|---|
| Effect | Allow | 
| Select Type of Policy | S3 Bucket Policy | 
| Principal | * | 
| Actions | GetObject | 
Click to Enlarge
| Field | Value | 
|---|
| Amazon Resource Name (ARN) | arn:aws:s3::[bucket Name]/* | 
Click to Enlarge
Click to Enlarge
Add The Policy JSON In S3 Bucket
 
Click to Enlarge
Click to Enlarge
IAM Policy Vs Bucket Policy
 
| Scenario | Policy Type | 
|---|
| You have numerous S3 buckets and each bucket has different permissions requirement | IAM policy | 
| You want to keep access control policies in the S3 environment | Bucket policy | 
| Your IAM policy has reached its service limits | Bucket policy | 
| Posted By  -   | Karan Gupta | 
|   | 
| Posted On  -   | Saturday, September 25, 2021 | 
|   | 
| Updated On  -   | Friday, August 5, 2022 |