Ravi Sir's Cards › AWS
Write a least-privilege S3 read policy
This revision card explains Write a least-privilege S3 read policy. It starts from the need that amazonS3FullAccess on a demo role teaches the wrong habit. A customer-managed policy with s3 — GetObject (and ListBucket if needed) on one bucket ARN is enough for a read lab. The how-to section notes IAM , then Policies , then Create , then JSON with Version 2012-10-17 and Resource arn:aws:s3:::lab-bucket/*. An example on the card is policy simulator or CLI get-object succeeds; delete-object is denied.
Read card text
What this card says
Why do we need it?
AmazonS3FullAccess on a demo role teaches the wrong habit.
What is it?
A customer-managed policy with s3:GetObject (and ListBucket if needed) on one bucket ARN is enough for a read lab.
How to do it
IAM → Policies → Create → JSON with Version 2012-10-17 and Resource arn:aws:s3:::lab-bucket/*.
s3:GetObject
Example
Policy simulator or CLI get-object succeeds; delete-object is denied.