Skip to content

Instantly share code, notes, and snippets.

@spasam
Created March 27, 2023 18:38
Show Gist options
  • Save spasam/a8e68a932b134325c29fdea77ec4546c to your computer and use it in GitHub Desktop.
Save spasam/a8e68a932b134325c29fdea77ec4546c to your computer and use it in GitHub Desktop.
Restrict access to all resources within an AWS account to only principals from the organization
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "RestrictAccessToOrg",
"Effect": "Deny",
"Action": "*",
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:PrincipalOrgID": "o-1234567890"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment