Skip to content

Instantly share code, notes, and snippets.

@jcbagtas
Created January 28, 2023 07:57
Show Gist options
  • Save jcbagtas/2702a859d8171f6fa5cc2873060b6e94 to your computer and use it in GitHub Desktop.
Save jcbagtas/2702a859d8171f6fa5cc2873060b6e94 to your computer and use it in GitHub Desktop.
AWS S3 public read based on object tag
{
"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