{{ }} Substitute variables

Adjust the variable values according to your preference.

Policy Code

1{
2  "Sid": "Permit web access only to IP",
3  "Effect": "Deny",
4  "Principal": "*",
5  "Action": "s3:*",
6  "Resource": [
7    "arn:aws:s3:::{{bucket-name}}",
8    "arn:aws:s3:::{{bucket-name}}/*"
9  ],
10  "Condition": {
11    "NotIpAddress": {
12      "aws:SourceIp": "{{user-ip}}/32"
13    }
14  }
15}

    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.