Below you will find pages that utilize the taxonomy term “CloudWatch”
July 17, 2025
Schedule EC2 Shutdown with Lambda and CloudWatch
Introduction
In this technology era we are always concerned about reducing the cost whether its CAPex or OPex related. Running EC2 instances 24/7 when they’re not in use can lead to unnecessary costs, especially in development and testing environments. Fortunately, AWS offers a way to automate shutdowns using Lambda functions and CloudWatch Event Rules (now known as EventBridge).
In this guide, you’ll learn how to schedule automatic EC2 shutdowns every day using a simple Python Lambda function and a CloudWatch cron rule.