Created
November 14, 2016 13:19
-
-
Save nachoab/b19379a0bcf318980a6760187f089177 to your computer and use it in GitHub Desktop.
AWS S3 user folder policy
This file contains hidden or 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": [ | |
{ | |
"Effect": "Allow", | |
"Principal": { "Federated": "cognito-identity.amazonaws.com" }, | |
"Action": ["s3:ListBucket"], | |
"Resource": ["arn:aws:s3:::BUCKET_NAME"], | |
"Condition": {"StringLike": {"s3:prefix": ["${cognito-identity.amazonaws.com:sub}/*"]}} | |
}, | |
{ | |
"Effect": "Allow", | |
"Principal": { "Federated": "cognito-identity.amazonaws.com" }, | |
"Action": [ | |
"s3:GetObject", | |
"s3:PutObject", | |
"s3:DeleteObject" | |
], | |
"Resource": ["arn:aws:s3:::BUCKET_NAME/${cognito-identity.amazonaws.com:sub}/*"] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment