Allow AWS Access Based on Date and Time

Jan 19, 2022

0

Share this article

{{ }} 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.

    img

    Related Policies

    POLICY

    AWS ECR: Permit Cross Account Image Upload

    Grant n AWS accounts, any principal, to connect to ECR resource and upload image...

    Mar 07, 2022

    0
    POLICY

    AWS ECR, Permit Cross Account Image Download

    Grant n other accounts access to this ECR, account-wide. Use more specific princ...

    Feb 16, 2022

    0
    img

    Join the beta waitlist

    Enter your email to get notified when our product becomes available to try.

    Sign Up for the community

    Create your member profile to get involved with our content, programs, and events.