Created
March 27, 2023 19:01
-
-
Save spasam/a42fb59490f6acf34b3374104424073d to your computer and use it in GitHub Desktop.
Restrict access to resources based on network CIDRs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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