Your EC2 Bill is an Architecture Problem, Not an Accounting One

https://hackernoon.imgix.net/images/fBi0fwDbCmgqTfdYrts7XHewnJF2-p6a3bw1.png

Compute is usually the biggest line on the AWS bill. It’s also the part nobody designs on purpose. Someone picks an x86 On-Demand instance during the first sprint, sizes it “with some headroom,” and that choice quietly sticks around for 2 years.

You can’t fix that from the billing dashboard. Cost is decided much earlier:

  1. instance family you pick.
  2. how you buy capacity.
  3. how your load balancer behaves when a node disappears.
  4. where your current containers keep their data.

The above four things decide compute spend and system resilience. This post walks through each one and ends with a working AWS CDK stack that puts it all together.

Pick the hardware for the bottleneck you actually have.

AWS names instances like m5.2xlarge, where m is the class, 5 is the generation, and 2xlarge is the size. Class is the part that matters most, because it sets the ratio of vCPU...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE