This is my first time learning about creating databases, so excuse my ignorance if I am asking dumb questions. I’m building a webapp that integrates with a postgress db. I originally just had my DB on my local machine, but I want it available 24/7.
So I started learning about how to deploy my DB to a server, and went with AWS RDS. I am on a free tier, with the 20gb/750 hrs /month usage limits. I understand that I wont go over the 750 hrs as long as I only have 1 instance running (which I do). I got a notification this morning saying I crossed 85% of my current usage for: "20.0 GB-Mo for free for 12 months as part of AWS Free Usage Tier (Global-RDS:StorageUsage) ". I’m currently at 17GB.
I don’t understand why that number is so high since i’ve barely been testing with my db, and with a small dataset. I pulled up pgAdmin, connected to my RDS DB instance, and viewed the statistics to see how much data I was storing, and it’s only 8.15mb!
I’m trying to figure out why in the world my current usage would be at 17gb. How can I view what is causing this? Are there tools to view these stats? Like, would this be from my front end querying my DB?
Check AWS Cost Explorer for details but here are a few thoughts:
AWS does not charge you for what you consume, AWS charges you for what you provision so it does not matter if you have only 8MB in your database, if you provisioned the database with 20GB of backing storage then you are paying for the 20GB of provisioned storage
Another thing to look into is automatic RDS snapshots which are often turned on by default. I don’t think this is your case but if you are sensitive to cost and storage in RDS you need to have a handle on if/how backups and snapshots are being created because there are RDS deployment methods where daily snapshot backups are turned on by default
Gut feeling is you are looking at fees related to the size of the database you provisioned
Storage allocated counts as usage, so for the free tier which allows 20GB-month, if you allocate more than 20GB to your instance you will essentially pay for the extra.
Actual data on the storage is irrelevant for RDS usage, just allocated volume.
Yeah, I wouldn’t use RDS for learning unless you’re specifically trying to learn RDS. If you just want to learn postgres either use a free tier ec2 instance or just run it in a local VM.
Yeah I’m just learning how to make it so my db is available 24/7, not just when I have my local machine running. I’m open to exploring whatever hosting is the easiest
Hm I see. Is there a way to view what is contributing to my 17gb of used storage? Trying to figure out what is causing that. I think it may be the automatic back ups/snap shots
Hm I checked the cost explorer, and it’s empty (thankfully lol). I haven’t gone over my limits for the free tier.
Im just trying to wrap my head around what caused me to use 17gb of my 20gb of storage. But i’m tracking the rest of your comment, and i’m thinking its because of the daily automatic backups/snapshots I had set up.
In my front end app, I use prisma to query my DB. Would running an unnecessary high amount of DB queries cause my RDS storage to increase? That wouldnt make sense tho right?
Also check out Lightsail and DigitalOcean. DO has single node setups starting at $15. I have used DO for a personal server for years and it’s been very good especially considering the pricing.
As mentioned by the other user, if you allocated 20 GB about 25 days ago, that’s about 17 GB used for the month. This concept is very confusing. Imagine round numbers, say 30 days in a month and you allocated 30 GB to a single instance, and to keep the numbers clean imagine the free tier usage was 30 GB for the month, not 20. If you ran that instance for 24 hours, then deleted it, you would have used 1 GB of the 30 GB for the month. That’s the concept at play here.
Hmm okay I think I understand. That would make more sense then, considering I’ve been testing with a very small data set and didn’t think I was doing a lot
You didn’t actually read his comment. If you have consumed 17 of your 20gb of storage then it’s because you launched the instance with 17GB of provisioned storage.