Skip to content

Instantly share code, notes, and snippets.

@spasam
Created March 27, 2023 19:01
Show Gist options
  • Save spasam/a42fb59490f6acf34b3374104424073d to your computer and use it in GitHub Desktop.
Save spasam/a42fb59490f6acf34b3374104424073d to your computer and use it in GitHub Desktop.
Restrict access to resources based on network CIDRs
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "RestrictAccessBasedOnNetwork",
"Effect": "Deny",
"Action": [
"*"
],
"Resource": [
"*"
],
"Condition": {
"NotIpAddress": {
"aws:SourceIp": [
"192.0.2.0/24",
"203.0.113.0/24"
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment