Skip to content

Instantly share code, notes, and snippets.

@cbodley
Created October 25, 2023 18:26
Show Gist options
  • Save cbodley/41e2c6125e28f049c47c099f171895d5 to your computer and use it in GitHub Desktop.
Save cbodley/41e2c6125e28f049c47c099f171895d5 to your computer and use it in GitHub Desktop.
bucket policy to restore access to bucket owner
{
"Version": "2012-10-17",
"Id": "FixDirACLs",
"Statement": [
{
"Sid": "AllowBucketOwner",
"Principal": {"AWS": "arn:aws:iam:::user/bucket-owner-uid"},
"Effect": "Allow",
"Action": "*"
},
{
"Sid": "DenyAnotherUser",
"Principal": {"AWS": "arn:aws:iam:::user/another-user-uid"},
"Effect": "Deny",
"Action": "*"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment