1 Answer
- Newest
- Most votes
- Most comments
3
Hi,
You can try to achieve your goal with time-based conditions in the policies where you allow to start EC2 instances.
See https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_aws-dates.html for samples.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "service-prefix:action-name",
"Resource": "*",
"Condition": {
"DateGreaterThan": {"aws:CurrentTime": "2020-04-01T00:00:00Z"},
"DateLessThan": {"aws:CurrentTime": "2020-06-30T23:59:59Z"}
}
}
]
}
Best,
Didier
Relevant content
- AWS OFFICIALUpdated 3 years ago
