How are you guys saving money on AWS?

Hey guys,

Times are tough and I am looking for ways to save money on AWS and maybe help somebody else seeing this post. What are some recent ways that you have been able to save a little extra money? Please provide the obvious suggestions too, as they may not be so obvious to me or somebody else.


Related discussions:

An easy one; Leverage spots to the greatest degree.

A less easy one; Analyse where your costs are going and work on them in turn. Proper tagging so you can group things correctly is vital.

Automate everything.. here’s some automations we built where i work:
elb cleanup, elastic ip cleanup, auto/scheduled shutdown of ec2, clean up of EBS, clean up cloud watch log groups/streams , clean up and set up lifecycle policies in S3, ebs snapshot cleanup, AMI cleanup

In the past week, I’ve been putting more focus on my resources – making sure that they’re scaling at the correct time and terminating unused resources. I am hoping to take it one step at a time and expand my knowledge.

Here are a few articles which helped me, for anybody wanting to know what I’ve done:

  1. https://www.allcode.com/cost-savings-on-aws/
  2. https://gameanalytics.com/blog/reduce-costs-https-api-aws.html

Feel free to share some of your suggestions and articles to. I want to grow this thread to help some people out during these times. (:

Check on snapshot count, use Cloudwatch monitoring to decide whether that instance type is really required, setup auto start/stop schedule for instance

Yeah proper tagging is hard.

Not having a bunch of spaghetti code to automate interacting with those tags is actually not hard because of cloud custodian (whose docs seriously suck but once you get the hang of it, wow).

You can look into AWS config as well, cloud custodian uses it but I find that its ability to do complex filtering is pretty nice.

Saving on AWS in order of priority:

  • Use Tags to track expenses
  • Turn off/delete things when not needed
  • Right-size everything
  • Spot use where possible
  • Savings Plans / RI over anything else
  • Rearchitect to serverless

If you are cutting costs and don’t mind compromising performance or availability:

t3a.nanos for anything that can run on 512MB ram and 5% of a cpu average. They are far more capable than they sound, just keep an eye on the CPU credits and don’t use unlimited.

Use an instance as a NAT gw instead of the AWS service.

Put everything in one AZ to save on inter-AZ bandwidth costs. Single AZ failures are amazing rare anyway.

Use the cheapest tier for S3, either apply thought or use intelligent tiering.

Cheap up your snapshots, delete everything you possibly can.

Review your EBS setup, use the cheap magnetic types of storage wherever practical.

Check all regions for anything you don’t expect. People love to test things and then forget about them.

Downgrade, or cancel, support.

I’m not claiming any of the above are good ideas in a business environment, only that they might save you money. Watch out of PHBs who will take credit for every cost saving but blame you for every outage.

Don’t use multi vpc. Use shared vpc.

Thank you for the suggestions. These suggestions make for some good Sunday reading!

I actually just got Cloudwatch. Glad to hear such great things about it!

Awesome. Thanks!

Lots of ways to save money on AWS. The answer depends on your environment and workload. Yo reduce cost, you must explore the biggest cost center in terms of service, and then charge type. See if that can be optimized in terms of cost. E.g. RI, Savings Plan for high consistent EC2 usage.
Additionally, you could look into moving away from instances, and consume serverless compute. Then again, maybe there’s a workload that requires dedicated EC2. So many options available. Including spot.. spot everything everywhere.
So yeah, you can DM me some more details and I can provide you a more custom answer for cost saviy.

Identify what is costing what.
Reengineer the solution, lambda, spot instance, event driven, cloudfront etc.

Things I haven’t seen mentioned yet:

- dig into what you store in S3, consider Infrequent Access or (Deep) Glacier based on access patterns

- consider your retention policies - you might be able to replace really old snapshots with some Deep Glacier storage or delete them completely

And then, in order of complexity, assuming you have already right-sized your env:

- move to the newest instance generation of the family you are currently using, they usually offer increased performance at the same (or slightly lower) price

- consider AMD instances (*a) - they are cheaper than Intel

- consider Amazon Graviton2 instances (*g) - they often are the absolute best performance/cost but are ARM-based so the move might be a bit more challenging depending how you build your AMIs

get or write a tool that helps you analyze your current costs and trends. alerting can be useful, though often a nuisance.

cross az bandwidth charges can be substantial. try to design around it. one surprising method that can work is single-az, multiple region.

Use Tags to track expenses

I use the following tags on every resource:

  • application or product - the overall product being powered by this resource, a product may have many resources
  • owner - the single owner of this product, an owner may have many products
  • service - the service powering this resource (e.g. IAM, CloudWatch, Lambda, S3)
  • bucket - in S3, the specific bucket name to which the object belongs

What other tags are suggested best practices?

Some great suggestions below - here are two others;

  1. Consider using shared ALBs rather than individual Load Balancers (where possible). We saved a lot by decommissioning non-prod classic load balancers.
  2. Check for failed EBS snapshots and delete. Failed snaps are still written into s3 and you pay for that storage. If you’re not cleaning up failed EBS snapshots, the storage costs accrue quickly.

If you equate your time as money, the majority of my money saved through AWS is saved time through abstract management. I don’t have to manage my containers, logs, disk, etc. It “just works.” I realized this when noticing the majority of my DigitalOcean-hosted problems were directly related to managing the host (running out of memory, certificates expiring, etc.) and not writing my software. I actually increased my cost per month to move these applications to AWS, but I saved likely dozens of hours each month. Given my personal value per hour, I saved a lot of “money,” even if my bank account disagreed. If you want to work for $2/hour, you can drop AWS in favor of self-managed solutions, but alternatively you can have AWS manage infrastructure while you work for minimum wage and turn a profit.

Hey OP, first check out the cost explorer - first step in minimizing cost is to understand where, what and why you’re spending that money.

EC2 instances? Look into if you’ve over provisioned, maybe they’re suboptimized (if you don’t use the resources then down scale instance types). Do you even need the EC2s? Maybe you can move stuff to lamba? Fargate? Etc. Look into spot and reserved instances!

High network cost? Look into what data is transferring, maybe it’s doing unnecessary cross AZ transfers thatll make ur bill go up?

Cleanup waste!! Kill dev machines during non office hours - you can save up to almost 2/3s of your dev env cost…

You can write rules that does this using cloud custodian, which integrates with AWS security hub these days.

Anyway those are some examples. It always starts with understanding your cost first then address it :slight_smile: if you want more ideas please share what you’re spending moneys on now - either here or PM and I can give examples applicable to your env !

Edit: cloud custodian additon