Enable a user to access to a single S3 bucket
You need to access in your AWS console and activate IAM access control.
- Create a new bucket in S3
- Create a new group in IAM
-
Create a new policy in the IAM group and add:
{ "Statement": [ { "Effect": "Allow", "Action": "s3:*", "Resource": [ "arn:aws:s3:::test-bucket-mavimo", "arn:aws:s3:::test-bucket-mavimo/*" ] }, { "Effect": "Allow", "Action": "s3:ListAllMyBuckets", "Resource": "arn:aws:s3:::*" } ] }
and change the bucket name (from test-bucket-name to your real bucket name).
Create a new user in IAM
Add the user in the group created before
Now you can use your user credential to access and write/read in our bucket. User can list all bucket but can't access to data avialable inside the not authorized bucket. This is a know problem but there are not workaround.
Written by Marco Vito Moscaritolo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#S3
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#