Aliz
Aliz

Reputation: 407

How to give access to one specific bucket?

I have an Amazon AWS account and I'm using Amazon S3.

I'd like to give access to specific people to a Amazon S3 bucket.

Here's what I'd like to do :

How can I setup this config?

Upvotes: 1

Views: 843

Answers (2)

John Rotenstein
John Rotenstein

Reputation: 269355

The general approach is:

  • If you want something to be "public" (accessible by anyone), then use a Bucket Policy
  • If you want to only assign permissions to a specific IAM User, then attach a policy to the IAM User
  • If you want to only assign permissions to a group of IAM Users, then create an IAM Group, attach a policy and assign the group to the desired IAM Users

Upvotes: 0

Stargazer
Stargazer

Reputation: 1530

Just create an IAM policy and attach to the users you want to give access:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "ListObjectsInBucket",
            "Effect": "Allow",
            "Action": ["s3:ListBucket"],
            "Resource": ["arn:aws:s3:::bucket-name"]
        },
        {
            "Sid": "AllObjectActions",
            "Effect": "Allow",
            "Action": "s3:*Object",
            "Resource": ["arn:aws:s3:::bucket-name/*"]
        }
    ]
}

See: Amazon S3: Allows Read and Write Access to Objects in an S3 Bucket - AWS Identity and Access Management

Upvotes: 1

Related Questions