How to create cheap database for a side project on AWS?

I am currently using Postgres on AWS RDS. It is costing me about $15 per month despite the fact that I have only 1 table that I query a few times per day. I’m not sure why it costs so much.

The settings I chose are: db.ts.micro - Burstable Classes - 20GB

Are there any settings I should turn on/off to minimise cost. Is there a better AWS database to use for a side project with only a small amount of occasional traffic (I prefer a relational DB if possible)? I don’t mind if there is a small delay while the DB server instance boots if that makes it cheaper.

That is the cheapest for managed SQL.

The other cheapest unmanaged way is by installing your own in a Lightsail VPS for about $5/mo.

Did you take a look at aurora serverless v1? You’ll pay only for the time you’re connected to the database.

Unfortunately, the cheapest solution is probably gonna be to get out of rds

The good news is that for a single table, the move to ddb probably would be relatively painless

Checkout Aurora serveless v2. See the following under the Development and Testing heading

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html

It’s been a little while since I checked, but I believe the cheapest you can run Aurora Serverless v2 is at $40 per month. Which is cheap for what you can do with it, but definitely doesn’t beat OP’s $15 per month.

Yeah my bad, didn’t realize they got rid of scale down to 0 like they had in v1.

It is costing me about $15 per month

I’m not sure why it costs so much.

lmao

As others have said, it’s not gonna get much cheaper than that in RDS. You’d have to run your own instance in EC2 or something to beat that.

Depending on what you’re doing with the DB, you may want to consider something like Athena. If that fits your use-case, it’d probably be much cheaper than what you’re paying now. Otherwise DynamoDB can be very cheap and easy to set up (of course, not relational).

Migrate to SQLite. If you need backups, use it alongside litestream

Run your own Postgres on ec2, or rearchitect to use DynamoDB.

What does your table do? Could you migrate it to use DynamoDB instead?

DynamoDB has a pay-per-request pricing model available. If you’re only making a few calls per day then it will probably cost nothing.

There’s always Route53 :joy:

https://betterprogramming.pub/apparently-you-can-use-route53-as-a-blazingly-fast-database-dd416b56b005

There is no such thing as `db.ts.micro` so can’t help you there. But in general please read the free tier rules:

https://aws.amazon.com/rds/free/

And please paste the details of RDS bill if you want our help with what to configure.

Probably you just created your account more than a year ago so free tier is not for you.

Is a relational database a requirement?

Ever tried Supabase? You can get 2 free PostgreSQL dbs with their free plan (no CC required)

You can still run v1, but they don’t seem to be actively developing it anymore. The most recent update was adding a few newer supported versions to prevent running on an EOL minor version

That is hilarious!

Tho a little concerning that he didn’t include “your database defaults to being publicly readable” in the drawbacks!
The vpc shenanigans op would have to implement to make this viable might get it back above the $15 threshold

+1, For a single table low utilization design, dynamodb is likely to be much cheaper

This is what I did for personal projects. I think RDS is good value but for fun side projects I don’t really want to pay for it.

I would suggest making a DB inside an EC2. I have a MYSQL DB running in an EC2, it’s around 2-3GB and I am using a t2.medium DB instance. It is working fine