I've noticed that my cloud expenses skyrocketed to around 3 lakh INR ($3400 USD) back in April. Since then, I've taken to manually shutting down my testing resources at night and during weekends, which helped my bills drop to about $1400 USD. However, managing this process is getting pretty tedious. Each time I encounter a bug, I have to tweak my script, almost like I'm building a solution from scratch! I looked up some guides online, but most seem outdated and complicated. Is there any tool, open-source or proprietary, that can help automate this task more efficiently?
3 Answers
Honestly, you might not even need to write any scripts. Have you checked out AWS Systems Manager? They offer a Resource Scheduler feature that can turn instances on and off at set times. It's surprisingly easy to use, and we've been using it for our dev and test environments without any hassle.
You can also look into AWS Instance Scheduler; it works wonders for managing EC2 instances. It can even schedule RDS resources. You can find out how to set it up in the AWS documentation. Plus, there's a feature to manage instances across different accounts, if that’s useful for you.
If you're finding it tedious to run your script, consider using AWS Lambda to automate the process. You can schedule it with CloudWatch, which makes it super easy to manage. Just set up your script to trigger automatically, so you won't have to run it manually every time.
Thanks for the suggestion! I’ll definitely try this approach.
That sounds like a solid plan! We implemented a similar setup where we use EventBridge Scheduler to trigger a Python Lambda for shutting down and starting up our infrastructure. Depending on your setup, you can keep things simple or expand the script's functionality as needed.
Awesome! So it’s free and can save me a lot of trouble. I'm all for solutions that are backed by AWS.