Created
February 23, 2016 17:45
-
-
Save theworkflow/1cb8ca5fc24e6b5a4113 to your computer and use it in GitHub Desktop.
S3 Mongo Access Policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version":"2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowUserToSeeBucketListInTheConsole", | |
"Action": ["s3:ListAllMyBuckets", "s3:GetBucketLocation"], | |
"Effect": "Allow", | |
"Resource": ["arn:aws:s3:::*"] | |
}, | |
{ | |
"Sid": "AllowRootAndHomeListingOfBackupBucket", | |
"Action": ["s3:ListBucket"], | |
"Effect": "Allow", | |
"Resource": ["arn:aws:s3:::mod.hippa.mongo.backups"], | |
"Condition":{"StringEquals":{"s3:prefix":["","${aws:username}/"],"s3:delimiter":["/"]}} | |
}, | |
{ | |
"Sid": "AllowListingOfUserFolder", | |
"Action": ["s3:ListBucket"], | |
"Effect": "Allow", | |
"Resource": ["arn:aws:s3:::mod.hippa.mongo.backups"], | |
"Condition":{"StringLike":{"s3:prefix":["${aws:username}/*"]}} | |
}, | |
{ | |
"Sid": "AllowAllS3ActionsInUserFolder", | |
"Effect": "Allow", | |
"Action": ["s3:*"], | |
"Resource": ["arn:aws:s3:::mod.mongo.backups/${aws:username}/*"] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment