Aurora Serverless v2: Minimum Cost Setup for Development Environment


Hello AWS Community,

I hope you're all doing well. I'm a solo developer working on a SaaS project, and I'm looking for some guidance on setting up a cost-effective development environment using Aurora Serverless v2.

My goal is to keep the costs minimal while ensuring a reliable and scalable database solution for my development needs. Since I'm working on a SaaS product, I want to optimize my expenses while maintaining the flexibility to scale as the project grows.

Here are some specifics:

Development Use Only:
    I'll be using the Aurora Serverless v2 instance solely for development purposes.
    Low usage and minimal traffic during development and testing phases.

Single Developer:
    I am a single developer working on the project.

I'm curious about the minimum monthly cost I can expect and any tips or best practices to optimize costs. Are there specific configurations, instance types, or storage options that could help keep the expenses down?

If any fellow developers have experience with similar setups or have suggestions on cost-effective configurations for Aurora Serverless v2 in a development context, I would greatly appreciate your insights.

Thank you in advance for your valuable input!

Best regards, M Alvee

2 Answers

With Serverless v2, the hourly cost is somewhere like 12-20 cents per ACU per hour, depending on the AWS Region. You can check the price for each combination of AWS Region and Aurora database engine here:

Let's consider us-east-1, which (as of January 2024) is 12 cents per ACU per hour. The minimum for Serverless v2 is 0.5 ACUs, so 6 cents / hour. A typical month has 720 hours (30 days) or 744 (31 days). So if you set minimum capacity to 0.5 ACUs, leave the cluster idle, and nothing unexpected happens, best case is roughly $43-45 per month for instance charges. Plus whatever usage-based charges for storage, I/O, and there are some other optional features that could result in charges. (That's why you would go through the exercise with the pricing calculator.)

What could interfere with the best case? Turning on memory-consuming or CPU-consuming features could prevent the idle cluster from scaling down to 0.5 ACUs. Something like Performance Insights (minimum 2 ACUs) or global database (minimum 8 ACUs). Cleanup operations like PostgreSQL vacuum could run and cause scaling up when you think the database should be idle.

What actions could you take to make the best case even better? Do "stop cluster" overnight or other long periods when you don't need to use the database. If you need to add reader instances to the cluster to test out multi-AZ usage (read/write splitting etc.), delete the reader instances when they're not needed. Have cron jobs to run stop-db-cluster, modify-db-cluster, etc. to put things into a cheaper state during overnight periods if you forget to do it at the end of the day.

answered 4 months ago

Your best bet is to use AWS Calculator # in order to estimate the operating cost with the services that you plan to use. Secondly using the Graviton2 instances would save a lot compared with other instances. I have listed some common instance types that you may start using and then change later based on your project workload. t4g : For dev/test workload m6g : For general purpose workload r6g : For memory optimized workload

Go with small storage initially and then you can scale it based on the need to optimize the cost.

answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions