So, you decided to run your staking node on AWS? That’s great, AWS is probably the biggest cloud provider, is very reliable, and has a decent interface and feature set, but it’s not the cheapest. Let’s see how we can stake on AWS without spending a lot of money. The decision to be made is about the instance type, and a payment plan. Let’s first see about the instance types.
Avalanche recommends a 2-core, 2.0+GHz CPU with 4GB of RAM as a minimum for running a validator. Looking at the AWS instance types there is a mind-boggling amount of different machine configurations. We don’t need specialized HW, beefier networking or machine learning, so we can concentrate on General Purpose or Compute Optimized types.
The ‘default’ configuration (and usually recommended in many tutorials and how-tos) is the current generation of Intel-based instances, the C5 family. In that, c5.large is the one with two cores at 3.5GHz CPUs and 4 gigs of RAM. And let’s say 20GB of disk space. Let’s see how much will that set us back.
Default option for running an instance is On Demand, meaning it starts when we tell it, stops when we tell it, pay at the end of the month for the time instance was running. On Demand pricing for c5.large is $0.085 per hour, which comes out as $64.05 monthly. Ouch, not exactly cheap.
But, c5.large is an Intel based machine, running on Xeons, and those are expensive. AvalancheGo, on the other hand, can run on other system architectures too. So, let’s see what other options are there.
Looking through the list, we can see c6g instance types. Those are 6th generation of compute types, with G designating Graviton CPUs, that is to say Amazon’s custom, ARM based CPUs, running at 2.5GHz. Those are cheaper.
On Demand cost for c6g.large is $0.068, coming out at $51.64 monthly. Ok, that’s better, some 20% cheaper. $150 in savings on a yearly basis. But, maybe we can do better.
c6g is the second generation of Amazon’s ARM CPUs, but there’s also the a1 family, with gen1 Graviton CPUs, running at 2.3GHz. So, also above spec. Since AvalancheGo is not all that CPU hungry (it even runs fine on below-spec Raspberrys!), we might go with that.
On Demand cost for a1.large (also 2 core, 4GB RAM) is $0.051 per hour, $39.23 per month! Now we’re getting somewhere, further 20+% cheaper! This is almost 40% cheaper than c5 instance, almost $300 saved yearly.
But, On Demand is also the costliest payment option. You can get significant savings with Reserved Instances which is when you say that you will use the instance for a long time (1 to 3 years). If we get a Reserved Instance for a period of one year, our a1.large instance drops from $0.051 to $0.0321, coming out at $25.43 monthly, 35% cheaper than On Demand. And you still pay monthly. You can get further savings if you pay upfront, but those are not that dramatic (10-15%).
Then there are Spot Instances those are instances that dynamic pricing, which depends on demand, and can also bring substantial savings. You set a maximum price you’re willing to pay hourly for an instance, and if the prices goes above, your instance is stopped (enters Stop state), with Avalanche currently demanding 60% online time, that might be an option too. Setting that up is more involved, and savings harder to measure in advance, so we’ll leave that as an exercise for the reader.
Also, pricing varies from datacenter to datacenter, and as Avalanche is a global network, location of your node is irrelevant, so it’s worth checking out other Amazon regions for pricing.
As a conclusion, if you’re running on AWS, before launching an instance, make sure you research the options available, you might be paying 2-3x as much as you could be. For my money, I’d say a1.large with 1 year Reserved Instance option is the way to go.
p.s. If you’re running on ARM CPUs, make sure you download arm64 builds of the AvalancheGo binary!