AWS Cost Management and How Kamal Deploy Helped

Over the past month, we undertook a cleanup of our AWS account to significantly reduce costs. Initially, we were spending $135 per day, and in this article, I'll show you how I lowered it to $45 per day.

Being in the AWS Activate program, I was given a large amount of credits, and I'm very thankful for them and the support AWS provided. That said, I was also mindful not to spend all of them, leaving myself with a big monthly payment when the credits expired.
After acquiring 10+ businesses, my infrastructure footprint expanded, and costs started creeping up. We were mindful to steer away from AWS services that live too close to our application logic, like Cognito or Lambda. These types of services are great at first, but their prices don't scale well with your business and couple your software with AWS. Avoiding lock-in is your best negotiation tactic. While remaining mindful of usage, we still managed production and pre-production environments in our K8s cluster that ran 24/7.  Eventually, our credits met their expiration date, and I decided to see how much fat we could cut.

First, no more pre-production environments if the team is not using them.

Then, it was time to review every AWS account in our organization, as all of them were acquired and contained a lot of legacy resources from the founding developers. One thing I found funny was seeing devs shut down EC2 instances, yet there were still $10/month in VPC and EC2-Other charges. Lesson: there is more to tear down than just your instance.
Infrastructure is messy—things like CDK, CloudFormation, and Beanstalk leave all sorts of leftover S3 buckets, storage volumes, and other remnants that end up nickel-and-diming you for a few bucks a month, slowly inflating our monthly bill.

Finally, we decided that our services didn't need enterprise-level scaling and support from Kubernetes. Kamal was able to deploy our containers and offer an easier interface for our team of developers. Here, we were able to cut the cost of several servers, K8s management servers, load balancers, and other complexities.

Kamal was a big unlock for shipping containers without K8s or Elastic Container Services. I've loved those services for many years, but Kamal is far simpler and cheaper.

This is how I reduced my AWS usage by roughly 60% without buying any reserved instances.  I hope you are inspired to review your AWS account and keep a few more federal reserve notes in your account.

What's Next? 

Now that our applications are portable thanks to Docker and Kamal I'll be evaluating competitor pricing on Hetzner, AmericanCloud, and Alkamai.