DEV Community

Divyansh Singh
Divyansh Singh

Posted on • Originally published at kubeblogs.com

Stop Wasting Money: Cut Your AWS EC2 Costs by 50% with Automated Scheduling

** Stop Wasting Money: Cut Your AWS EC2 Costs by 50% with Automated Scheduling **

You can save cost by turning off non-production ec2 instances when they are not needed. Automating start and stop actions using AWS Lambda and CloudWatch can save costs significantly. Instead of scripting this from scratch, Terraform modules can help implement the solution quickly and cleanly.In this guide, we’ll walk through using the open-source terraform-aws-lambda-auto-start-stop-ec2-instances module to automatically start and stop EC2 instances based on tags and schedule expressions. We'll use a real-world example where EC2 instances are:Started at 10:00 AM ISTStopped at 10:00 PM ISTThis setup is useful for non-prod or testing environments that only need to be active during typical working hours.We'll use a wrapper module available at kubenine/ec2-auto-start-stop-terraform to configure this easily using Terraform.

👉 Read the full blog here

Top comments (0)