DEV Community

sngvfx
sngvfx

Posted on

AWS: S3 Bucket access IAM policy example

Here is an easy way to grant all access to an S3 bucket and its objects to a specific user or group, you can use an S3 bucket policy similar to the following:

policy_s3

This policy grants all access (indicated by the "Action": "s3:" line) to the user or group identified by the "Principal" field (in this case, the user "demoteam" with the AWS account number **123456789012) for all objects in the bucket (indicated by the "Resource": "arn:aws:s3:::my-bucket/" line).

It's important to note that this policy grants the specified user or group full access to the bucket and its objects, which may not be appropriate in all cases.

Always customize the policy to grant less access to users and just based on your specific needs.

Top comments (0)