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.
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:
Check on snapshot count, use Cloudwatch monitoring to decide whether that instance type is really required, setup auto start/stop schedule for instance
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.
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.
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.
- 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
Some great suggestions below - here are two others;
Consider using shared ALBs rather than individual Load Balancers (where possible). We saved a lot by decommissioning non-prod classic load balancers.
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 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 !