Container Spot capacity
We are adding support for using Spot instances when you create a Fargate service with the Cluster
component through the capacity
prop. Spot instances can be around 50% cheaper and we talk about how they work here.
Background
You can create container services with ECS and Fargate in SST with the Cluster
component.
You are charged per hour of vCPU and GB of memory used. With our base config, this works out to around $12 per month.
Spot instances are spare capacity that AWS has and it’s available at a discounted rate, around $6 per month.
Spot
You can enable this using the new capacity
prop.
You can also configure the % of regular Fargate vs Spot capacity you want to use.
Learn more about the capacity
prop.
Caveats
There are a couple of caveats.
- AWS may reclaim this capacity and turn off your service after a two-minute warning. This is rare, but it can happen.
- If there’s no spare capacity, you’ll get an error.
This makes Fargate Spot a good option for dev or PR environments.
Get started
Get started by checking out the Fargate Spot capacity example.
You can also check out our container service quick starts.
These will help you get started with building container services.