Amazon AWS S3 – Give User Access to Bucket

I was working at giving access to one of my Amazon S3 buckets to my cousin to share large files; but was having difficulty. I looked at using Dropbox to share files, but I didn’t want him to have to register on the site; I only wanted to provide him a private URL, username and password. The material was confidential, so I didn’t want to use Pastebin or some similar site.

So here’s what I did.

I created the S3 Bucket in the AWS Console.

I created a user for him in IAM and an auto-generated password; then put the user into a group.

I created an alias to my Amazon domain.

After several hours of Googling and setting user permissions, creating Bucket Policies and testing with the AWS Policy Generator, I found my answer here.

Can’t access bucket with user who has IAM policy applied

https://forums.aws.amazon.com/message.jspa?messageID=222596

 

I set a Group Policy, first by going to the IAM console

 

 

 

 

 

 

 

 

Clicked on Groups

 

 

 

 

 

 

 

And added the following JSON statement

 {
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["s3:Get*",
                 "s3:List*"],
      "Resource": "*"
    },
    {
      "Effect": "Deny",
      "Action": ["s3:ListBucket", "s3:GetBucket"],
      "NotResource":["arn:aws:s3:::<BucketName allowed access>"]
    }
  ]
}

 

 

Now it works. Yay!

0 thoughts on “Amazon AWS S3 – Give User Access to Bucket”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.