Created
January 28, 2023 07:57
-
-
Save jcbagtas/2702a859d8171f6fa5cc2873060b6e94 to your computer and use it in GitHub Desktop.
AWS S3 public read based on object tag
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": [ | |
{ | |
"Sid": "Statement1", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Effect": "Allow", | |
"Action": [ | |
"s3:GetObject", | |
"s3:GetObjectVersion" | |
], | |
"Resource": [ | |
"arn:aws:s3:::mysite.jcbagtas.com/*" | |
], | |
"Condition": { | |
"StringEquals": { | |
"s3:ExistingObjectTag/public": "true" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment