My attempt to save money with AWS Elastic Beanstalk actually cost me more
A simple miscalculation resulted in it costing twice as much as I thought.
In a previous article, I discussed the idea that moving away from an EC2 LAMP stack to AWS Elastic Beanstalk would be easier to manage and certainly much more scalable, it would also help me save quite a bit of money.
While it was indeed much easier to manage each website more independently, I had totally overlooked something in my cost calculations. Load balancing.
I had estimated that each website would cost on average $15 running t2.nano instances, and with 4 websites to migrate, it would only cost $60 per month. saving me a grand total of $20 compared to the previous single EC2 instance, but also removed the additional $45 per month for a cPanel license.
But at the time, I completely forgot that Load Balancers were charged separately, and each website now had its own Load Balancer in front of it. The true cost of each website was actually around $40 per month, bringing the total to $160 all in, and costing me an additional $35 per month more than before. Whoops!
The load balancer is required for two reasons:
- Load balancing and auto-scaling
- Easily configure HTTPS using AWS Certificate Manager
I had definitely failed to save money as it had in fact ended up costing me more, but it certainly wasn’t wasted effort due to the fact it was now much easier to maintain the websites, and they were now highly scalable.
These websites have been active on Elastic Beanstalk for a few months now, but not once have I seen them scale up… it certainly seems that the load balancers are unnecessary overhead. So I looked into reconfiguring them on Elastic Beanstalk to single instances, but doing so requires manually configuring the SSL certificates. Damn.
There are definitely a few ways to set up SSL within Elastic Beanstalk, so I will be posting a lot more in the coming weeks about the solution I have currently settled on. I certainly have no doubt there are much better solutions, so I’m all ears!
Be sure to clap and follow to keep up to date with my journey through AWS! If you have any tips or suggestions, please do let me know.
