Followers

AWS - S3 Bucket policy - Theory + Lab

  Bucket Policy It is a resource-based policy for all the objects of a bucket. It is in Json format Effects are either Allow or Deny GET for...

 Bucket Policy
  1. It is a resource-based policy for all the objects of a bucket.
  2. It is in Json format
  3. Effects are either Allow or Deny
  4. GET for reading access, CREATE for create, PUT for the update, DELETE for delete
  5. Use Policy generator tool to create Json access policy

Example: To create an access level policy in S3 to give the public access to all the objects in an s3 bucket

Step 1: Create Bucket (give any valid name) mybucket908 in your region.
Step 2: Select Permission Tab 
Step 3: Click on Edit button which in Bucket policy section.
Step 4: Click on Policy generator button
Step 5: Provide below details to generate an access level policy (Principal mean user's ARN, * means for everyone )
           Select Type of Bucket policy :  S3 Bucket policy
           Effect:  Allow
           Principal: *
           Action: GetObject
           ARN: arn:aws:s3:::mybucket908
 Click on Add Statement button
 Click on Generate Policy button, It will generate a json access policy          
Step 6: Copy generated Json Code and Paste it in Bucket policy of S3 bucket permission tab.
    Note in Json add /* after bucket name in Resource option.
         "Resource": "arn:aws:s3:::mybucket908/*"  
Step 7: Click on save changes button
Step 8: upload an index.html file 
Step 9: use object URL to access the index.html file

Experiments

1. In bucket policy change the Effect from Allow to Deny and check whether you are able to access index.html
2. Delete bucket policy and check are you able to access index.html or not.





           

COMMENTS

Name

Ansible,6,AWS,1,Azure DevOps,1,Containerization with docker,2,DevOps,2,Docker Quiz,1,Docker Swarm,1,DockerCompose,1,ELK,2,git,2,Jira,1,Kubernetes,1,Kubernetes Quiz,5,SAST DAST Security Testing,1,SDLC Quiz,3,SonarQube,3,Splunk,2,vagrant kubernetes,1,YAML Basics,1,
ltr
item
DevOpsWorld: AWS - S3 Bucket policy - Theory + Lab
AWS - S3 Bucket policy - Theory + Lab
DevOpsWorld
https://www.devopsworld.co.in/2022/03/aws-s3-bucket-policy-theory-lab.html
https://www.devopsworld.co.in/
https://www.devopsworld.co.in/
https://www.devopsworld.co.in/2022/03/aws-s3-bucket-policy-theory-lab.html
true
5997357714110665304
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content