Go back to the main page

Add a user to one of your s3 buckets in pictures

This article is over 2 years old. Proceed with caution.

Regards ♨ – Minimul

 

Simple s3 bucket permissions

1. Goto the IAM service.
2. Create a new user.
3. Called "myclient" for example. Doesn't need to be part of a group. When prompted save the new user's credentials somewhere.
4. Select "myclient" user and goto the Summary tab below.
5. Copy the entire AWS IAM userid e.g. "arn:aws:iam:489384444488:user/myclient".
6. Next, go over to the s3 service and create a bucket called "myclient-backups". for example. Then select the new bucket's magnify glass icon. The bucket's properties will appear on the right side.
7. Select the bucket's "Permissions" section and click the button "Edit bucket policy".
8. Cut'n paste the json policy (replacing with your bucket name and IAM user id) below into the modal box and click "Save".
{
  "Version": "2008-10-17",
  "Statement": [
    {
      "Sid": "AddCannedAcl",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam:489384444488:user/myclient"
      },
      "Action": [
        "s3:GetObjectAcl",
        "s3:ListBucket",
        "s3:GetObject",
        "s3:PutObjectAcl",
        "s3:PutObject"
      ],
      "Resource": [
        "arn:aws:s3:::myclient-backups",
        "arn:aws:s3:::myclient-backups/*"
      ]
    }
  ]
}
Bucket policy to allow "myclient" user to put, get, and list.
9. Finished. After successfully saving the policy the "myclient" will be able to upload, download and list on the "myclient-backups" bucket. Tip: to list the objects within the bucket you must explicitly pass the bucket name into a s3 client e.g. s3cmd ls s3://myclient-backups.
Comment on this article?