Amazon S3: Give a user write-access to selected buckets

Posted . Visible to the public.

There's no user interface to give an AWS IAM user read/write access to a selected list of S3 buckets.

Instead you need to attach an IAM policy like the one below to the user:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::bucket1",
                "arn:aws:s3:::bucket2"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:DeleteObject",
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": [
                "arn:aws:s3:::bucket1/*",
                "arn:aws:s3:::bucket2/*"
            ]
        }
    ]
}
Henning Koch
Last edit
Henning Koch
Keywords
aws, amazon
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2016-08-31 15:38)