Skip to content

Instantly share code, notes, and snippets.

@immma
Last active August 30, 2021 23:15
Show Gist options
  • Save immma/e295e31a68640e62a3f79291913b4f24 to your computer and use it in GitHub Desktop.
Save immma/e295e31a68640e62a3f79291913b4f24 to your computer and use it in GitHub Desktop.
S3-bucketpolicy-MFA
{
"Version": "2012-10-17",
"Id": "Policy1630051047351",
"Statement": [
{
"Sid": "Stmt1630050786717",
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
"Action": "s3:*",
"Resource": "arn:aws:s3:::your-bucket/*",
"Condition": {
"BoolIfExists": {
"aws:MultiFactorAuthPresent": "false"
}
}
},
{
"Sid": "Stmt1630051025367",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::111122223333:user/your-user"
},
"Action": "s3:*",
"Resource": "arn:aws:s3:::your-bucket/*"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment