Articles → AWS → Create a policy for the AWS S3 bucket

Create a policy for the AWS S3 bucket






Scenario





Creation of bucket




  1. Uncheck the "Block all public access" checkbox.
  2. Check the checkbox "I acknowledge that the current settings might result in this bucket and the objects within becoming public."
Picture showing unchecking the checkbox Block all public access to make bucket public

Click to Enlarge


Create the policy JSON using the AWS policy generator tool




FieldValue
Select Type of PolicyS3 Bucket Policy
Principal*
ActionsGetObject


Picture showing selecting the action as GetObject

Click to Enlarge



FieldValue
Amazon Resource Name (ARN)arn:aws:s3::/*




Picture showing adding the policy statement using the Add Statement button

Click to Enlarge



Picture showing the policy json created on click of the Generate Policy button

Click to Enlarge


Add the policy JSON in S3 bucket




Picture showing the Edit button for editing the bucket policy

Click to Enlarge



Picture showing the confirmation message for the creation of bucket policy

Click to Enlarge




Posted By  -  Karan Gupta
 
Posted On  -  Saturday, September 25, 2021

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250