So I got a very surprising bill from AWS for Augus...
# orm-help
h
So I got a very surprising bill from AWS for August this weekend. I’ve set up multiple environments - test, stage and prod. Test and stage are both prisma instances on a AWS RDS db micro instance, and are the only ones that have been used seeing as the app in question is still in development. The production instance is hosted on AWS Aurora. A deploy was made to test that everything was working, but it has received no real traffic. The bill, however, says just over 1000 DB hours for all databases. Which in itself is kind of funny, seing as there is only around 24 * 31 = 744 hours in a month. It’s worth noting that we have no cron-jobs or anything, and our team primarily works between 8-17 on weekdays. Seeing as both databases are paid pr hour of use, I’m trying to investigate what is making requests to keep them alive all the time. I have two suspects: Apollo Engine (for metrics), and Prisma. Does anyone know anything about this?
b
Mb “Prisma Cloud” health check requests (if you use it)
h
That’s what I was thinking. Any way to disable that?
n
You are saying that requests keep your DB alive. I have not seen such a dynamic when hosting DBs at AWS before. The DB is alive constantly, until you remove the instance again. Why don't you remove the instance once you don't need it anymore?
h
Honestly I was thinking that when I set up the databases and Prisma servers, I would only be paying for what I used, and therefore would not be paying anything as long as we’re in development with close to no traffic on test/stage, and no traffic on prod. Then I received a 142 USD bill from Amazon for last month, which is what I’m investigating.
n
Ok. It seems you were not aware of the billing dynamics of AWS.
h
Indeed. Looking into differences between Aurora provisioned vs serverless right now.
But the question still stands in some capacity - where are all those reads to the prod DB coming from? How often does Prisma servers perform health checks?
And say I go with Aurora Serverless, and set the “standby on inactivity” timer to 5 minutes, will Prisma keep it alive anyway with health checks? Because if so, then I gain nothing from moving to Aurora Serverless
n
Prisma Cloud performs the health checks lazily, so only when you open the Cloud UI. The reads should account for the minority of your costs. Running the DB should be the majority of your costs.
h
It seems it isn’t possible to make a Aurora Serverless cluser available publically, only through AWS VPC. I’m hosting my Prisma server on Zeit right now. Does that mean that I can’t use Aurora Serverless without also hosting Prisma on an Amazon EC2?
l
I don’t know the answer to your first question, but I do know that Zeit is on Google Cloud, so that’s where you’ll want your database. About a year ago I ran into the same confusion. I thought RDS databases “slept” — like a heroku hobby dyno. They don’t. They only stop when you kill the instance. AWS does a terrible job explaining that, so you aren’t alone.
❤️ 1
j
I'm so happy I saw this thread