Amazon EventBridge Scheduler to start and stop EC2 instances Monday to Friday

Amazon EventBridge Scheduler → Amazon Elastic Compute Cloud

Pattern that starts and stops given EC2 instances based on time of day, timezone and days of week

Creates a schedule that turns on instances at 08:00 and turns them off at 17:00 Monday to Friday using the US/Eastern timezone.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/eventbridge-schedule-to-ec2-terraform

Deploy

terraform apply


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: terraform destroy.

Created by:

Ian Lodge

Ian Lodge

Ian is a Solutions Architect at Amazon Web Services based in the US.

Follow on LinkedIn