Skip to content

Instantly share code, notes, and snippets.

@robert-moore
Created April 30, 2019 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robert-moore/a91447ffc3711e421a8c1ec377fb5bfc to your computer and use it in GitHub Desktop.
Save robert-moore/a91447ffc3711e421a8c1ec377fb5bfc to your computer and use it in GitHub Desktop.
AWS Amplify Storage Public Read for Guests
"S3BucketPolicy": {
"Type" : "AWS::S3::BucketPolicy",
"Properties" : {
"Bucket" : {"Ref" : "bucketName"},
"PolicyDocument": {
"Statement":[{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Action": "s3:GetObject",
"Principal": "*",
"Resource": { "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "bucketName" } , "/protected/*" ]]}
}]
}
}
}
@robert-moore
Copy link
Author

A full explanation can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment