AWS – How to setup an IAM user to access only one s3 Bucket

05. March 2012 SysAdmin 0

Hi,

This will explain how you can create an IAM user in AWS, so that you can grant access to only one S3 bucket.

– Create an S3 bucket in AWS account.

[![](https://res.cloudinary.com/jobnix/image/upload/v1415999956/jobin_2012_02_24_01_vche3d.jpg “AWS_create_s3_bucket”)](https://res.cloudinary.com/jobnix/image/upload/v1415999956/jobin_2012_02_24_01_vche3d.jpg)

–  Switch to AWS IAM tab
– Click Group >> Create Group

[![](https://res.cloudinary.com/jobnix/image/upload/v1415999956/jobin_2012_02_24_02_azzusv.jpg “AWS_create_iam_group”)](https://res.cloudinary.com/jobnix/image/upload/v1415999956/jobin_2012_02_24_02_azzusv.jpg)
– Enter a Group Name, Click Continue

– Click **Custom Policy** at next screen, Click **Select**

– Fill The Details
You need to give the following as Policy Document
“`



{


“Statement”:[{


“Effect”:”Allow”,


“Action”:[“s3:*”],


“Resource”:[


“arn:aws:s3:::jobin-backups”,


“arn:aws:s3:::jobin-backups/*”]


}


]


}

“`

[![](https://res.cloudinary.com/jobnix/image/upload/v1415999956/jobin_2012_02_24_03_c0losf.jpg “AWS_create_iam_group-policy”)](https://res.cloudinary.com/jobnix/image/upload/v1415999956/jobin_2012_02_24_03_c0losf.jpg)
– Replace **jobin-backup** with your bucket name, And click Continue
– Click Create group.

– Now click **Users** from the Navigation pane.

– Click **create new user**
– Enter the UserName. Eg **jobin-backups** , Click **create**
– It will show you the **SecretKey** and **AccessKey**,
[![](https://res.cloudinary.com/jobnix/image/upload/v1415999955/jobin_2012_02_24_04_chl9oy.jpg “AWS_create_iam_credentials”)](https://res.cloudinary.com/jobnix/image/upload/v1415999955/jobin_2012_02_24_04_chl9oy.jpg)
Please note it down. You dont have a second chance.

– Thats it. Now you can use the same credentials with **s3cmd**

0 0 votes
Article Rating

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments