Aurora Serverless in v3
We are adding Aurora
, a new component for Amazon Aurora Serverless v2. Recently, AWS announced that Aurora Serverless v2 can scale to 0 and auto-pause. This is good for dev or PR stages.
There are some differences between this and the Postgres
RDS component. We talk about it here in this video.
Getting started
To get started, you can add the Aurora
component to your app.
Read more about the Aurora
component.
Scaling
By default, this has a min
of 0 ACUs and a max
of 4 ACUs.
An ACU or Aurora Capacity Unit is roughly equivalent to 2 GB of memory. So pick the minimum and maximum based on the baseline and peak memory usage of your app.
If you set a min of 0 ACUs, the database will be paused when there are no active connections in the pauseAfter
specified time period.
Read more about the scaling
config.
Dev mode
Aside from scaling to 0, you can also configure the Aurora
component to not deploy the database in sst dev
. Instead it can link to your locally running database, if you enable the dev
prop.
Read more about the dev
config.
Cost
Each ACU costs $0.12 per hour for both postgres
and mysql
engine. The storage costs $0.01 per GB per month for standard storage.
So if your database is constantly using 1GB of memory or 0.5 ACUs, then you are charged $0.12 x 0.5 x 24 x 30 or $43 per month. And add the storage costs to this as well.
If your database scales to 0 ACUs and is auto-paused, you are not charged for the ACUs.
Read more about the cost of using Aurora.
Examples
We also have a few examples that you can check out.