0
0
{{ }} Substitute variables
Adjust the variable values according to your preference.
Policy Code
Referenced from: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_aws_deny-ip.html
1{
2 "Version": "2012-10-17",
3 "Statement": {
4 "Effect": "Deny",
5 "Action": "*",
6 "Resource": "*",
7 "Condition": {
8 "NotIpAddress": {
9 "aws:SourceIp": [
10 “{{sourceIP}}“
11 ]
12 },
13 "Bool": {"aws:ViaAWSService": "false"}
14 }
15 }
16}
DOC
Replace {{sourceIP}} with the IP range you wish to prevent from accessing AWS
Get the IAM Pulse Check Newsletter
We send out a periodic newsletter full of tips & tricks, contributions from the community, commentary on the industry, relevant social posts, and more.
Checkout past issues for a sampling of the goods.