Jan 19, 2022

Allow AWS Access Based on Date and Time

0
0
{{ }} Substitute variables

Adjust the variable values according to your preference.

Policy Code

1{
2    "Version": "2012-10-17",
3    "Statement": [
4        {
5            "Effect": "Allow",
6            "Action": "{{servicePrefix}}:{{actionName}}",
7            "Resource": "*",
8            "Condition": {
9                "DateGreaterThan": {"aws:CurrentTime": "{{startDate}}"},
10                "DateLessThan": {"aws:CurrentTime": "{{endDate}}"}
11            }
12        }
13    ]
14}
DOC

Specify the action you wish to allow by modifying the servicePrefix and actionName variables. Then choose a start and end date in UTC format.

    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.