Skip to content

Instantly share code, notes, and snippets.

@b01
Created July 19, 2024 00:12
Show Gist options
  • Save b01/95d50dc299704f26818c4182981644df to your computer and use it in GitHub Desktop.
Save b01/95d50dc299704f26818c4182981644df to your computer and use it in GitHub Desktop.
Allow Selected Services By Region
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowServicesListedBelow",
"Effect": "Allow",
"Action": [
"account:*",
"access-analyzer:*",
"autoscaling:*",
"autoscaling-plans:*",
"aws-portal:*",
"billing:*",
"budgets:*",
"cloudformation:*",
"cloudfront:*",
"cloudshell:*",
"cloudtrail:*",
"cloudtrail-data:*",
"cloudwatch:*",
"ce:*",
"ec2:*",
"elasticfilesystem:*",
"elasticloadbalancing:*",
"freetier:*",
"lambda:*",
"route53:*",
"s3:*",
"secretsmanager:*",
"ssm:*"
],
"Resource": "*"
},
{
"Sid": "DenyAllServicesExceptInRegionsListedBelow",
"Effect": "Deny",
"Action": "*",
"Resource": "*",
"Condition": {
"StringNotEqualsIgnoreCase": {
"aws:RequestedRegion": [
"us-east-1",
"us-east-2",
"us-west-2"
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment