26 June, 20232 minute read

Instantly save 10% on your RDS bill

AWS’ proprietary ARM-based Graviton chips have existed for many years now, but there are still a surprising number of engineering teams out there who aren’t yet leveraging them. If you aren’t sure whether you’re using Graviton, you can quickly check by looking at your EC2 and RDS instance types—anything with a “g” in the name (like t4g or m6g) is running on Graviton.

Equivalently-sized Graviton instances offer similar performance to their x86 counterparts, and are generally about 10% cheaper to run per hour. The only obstacle is in the architecture switch: while some apps are ready to run on ARM as-is, there are also many which require engineering effort before a swap can be done. Generally speaking, apps built with scripting languages such as Python or JavaScript are easier to move over to the ARM architecture than compiled languages but the existence of native dependencies like Prisma can muddy the waters.

Fortunately, Graviton CPUs aren’t only available for your EC2 compute. You can also use them to power your RDS instances—and that’s almost always as simple as changing a value in Terraform.

The main thing that would block a swap over to ARM are user-defined functions written in C. If you’re using RDS you don’t need to worry about these, however. Loading a compiled UDF requires you to both move the binary into the filesystem of your database server, and have superuser permissions to actually load the binary. You can do neither of these things with an RDS instance, which makes swapping from a db.t3 instance to a db.t4g instance safe in almost all circumstances.

A multi-AZ db.t3.xlarge with instance running postgres with one standby costs US$0.896/hr in ap-southeast-2 region compared to only US$0.813/hr for a db.t4g.xlarge. This is a 9.7% saving, and given that database spend is often one of the most expensive line items on an AWS bill that cost reduction can go a long way.

If you aren’t using Graviton-based RDS instances, I recommend you give them a try in your staging environment. In Terraform it’s a one line change, and in ClickOps all you need to do is change the value of your instance class dropdown. There are few ways to save so much on your AWS bill with so little effort.

A note on regional pricing

As an aside, RDS pricing varies massively between regions. That same db.t4g.xlarge configuration costs only US$0.517/hr in us-east-2, which is a 36.5% saving. Almost all AWS products have different price points by region, but for RDS the difference can be huge.

While you should primarily be choosing your region based on its proximity to your customers, it’s worth checking out price differences before commiting. us-west-1 and us-west-2 are both located on the west coast, for instance, but us-west-2 has 24.4% cheaper RDS instances. Unless your use case is extremely latency-sensitive, it makes a lot of financial sense to deploy to us-west-2 instead of us-west-1.

Don't want to miss out on new posts?

Join 100+ fellow engineers who subscribe for software insights, technical deep-dives, and valuable advice.

Get in touch 👋

If you're working on an innovative web or AI software product, then I'd love to hear about it. If we both see value in working together, we can move forward. And if not—we both had a nice chat and have a new connection.
Send me an email at hello@sophiabits.com