Contents

IAM s3 One Bucket User Policy

Contents

This is a JSON config for IAM in AWS that let’s you specify a bucket that the user have access to. It will not allow you to do anything with other buckets on you’r account

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:DeleteObject",
                "s3:GetObject",
                "s3:GetObjectAcl",
                "s3:PutObject",
                "s3:PutObjectAcl",
                "s3:ListBucket",
                "s3:GetBucketLocation"
            ],
            "Resource": [
                "arn:aws:s3:::REPLACE_WITH_YOUR_BUCKET_NAME/*",
                "arn:aws:s3:::REPLACE_WITH_YOUR_BUCKET_NAME"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListAllMyBuckets"
            ],
            "Resource": [
                "arn:aws:s3:::*"
            ]
        }
    ]
}
Info
Just replace “REPLACE_WITH_YOUR_BUCKET_NAME” with your s3 bucket name