Assigning an AWS IAM user access to a single S3 bucket
When purposing an S3 bucket for a specific use case where single user will need access to work with that bucket a policy similar to the one below can be assigned to a user in IAM:
This is relevant in situations such as Using pgbackups-archive to automate archving Heroku backups to S3.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::myapp-backups"
},
{
"Action": "s3:PutObject",
"Effect": "Allow",
"Resource": "arn:aws:s3:::myapp-backups/*"
}
]
}
Written by Kenny Johnston
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#S3
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#