Cutting Cloud Costs: How to Get More from AWS?

In our journey to maximize #ROI with #AWS, we’ve learned valuable lessons. My #DevOps guy had designed and deployed cloud architecture for multiple companies in varied industries: Cyber Security/Networking, Banking/FinTech, DevOps Consulting. I myself designed and deployed my own startup’s scalable cloud architecture on AWS. Being the owner, I was very conscious of costs, trying to find the best architecture that is: cost-effective, optimal, and easy to maintain even by our future backend and full-stack engineers; while leaving room for future changes; scale-as-we-go.

Below is our approach which we use for one startup’s use case. They need to strike to balance between costs, scalability and security:

  1. Infrastructure-as-Code: We use and highly recommend Terraform, which allows us to combine resources from AWS, GCP, Azure, and other providers in one codebase if we choose. This enables a multi-cloud, cloud-agnostic approach.
  2. Simplified Architecture: We leverage the battle-tested, industry-standard Docker approach and make it the preference over serverless. This standardizes teams’ skills and approaches. Docker can be used with ECS, Kubernetes, and even now Lambda (serverless) supports it. This simplifies our architecture and makes it more accessible.
  3. Optimal Network Architecture: We optimize traffic flow. Choosing the optimal way to place resources. There are many ways to do the same thing in AWS, and some are much more costlier than others and less effective. Something as simple as choosing the right region can save up to 15% on costs.
  4. Avoid AWS credit card blackholes: We will take ECS Fargate as an example. AWS often recommends ECS Fargate, but we’ve found that running ECS on EC2 costs only 58%-62% of the price, with all the same benefits. Plus, if you use Go (Golang) like we do, it uses much less memory/RAM, enabling us to use EC2 instance types that most businesses don’t if they choose other languages like Python or Java for their backend server – This could save an additional 50% on costs. Then we use 75% of servers as Spot instances, which can save up to 90% of the on-demand price. We save costs like the world is going to collapse tomorrow, and we still have food in the bunker, and our servers must still run and be scalable…
  5. Kubernetes for Databases: If managed services are too expensive, consider using Kubernetes for databases. One example is Mongo Atlas – costs an arm and a leg. My DevOps guy deployed Mongo-sharded cluster for a client with K8s, and it’s currently serving over 5 million users without a hitch. It’s auto-healed and requires minimal effort.
  6. Beware of NAT Gateway: For apps with extensive data flow, consider building something similar to NAT Gateway yourself. If your team doesn’t know how to do it, and your servers can be put in public subnets, then do so. The IPV4 cost introduced in 02/2024 will be nothing compared to NAT Gateway cost. But try to build your fleet of NAT, it’s better in the long-term,  so your servers can stay in the private subnet.

Remember, every organization is unique, and what works for us may not work for you. But we hope our experiences can help you on your journey to maximize ROI with AWS.

About the author

Table of Contents

Get more awesome content from us

Subscribe and get regular updates.
No spam or BS. Just great, insightful articles!

Need help with a software project?

Get an estimate

Have a project? We have an eagle eye for the most effective, cost-efficient solution.