Vylara
awsdatabasescostrds

Managed vs Self-Hosted Databases on AWS: The Cost Comparison

Managed Postgres on RDS (~$15-30/mo) beats self-hosting for most small teams. A concrete AWS cost comparison of RDS, Aurora Serverless v2, and DynamoDB with real break-even points.

Written byVylara Team
7 min read
Managed vs Self-Hosted DB Costs

For most small teams shipping a first production app, managed Postgres on RDS is the right default: expect roughly $15-18/month for a db.t4g.micro with 20 GB of storage, and you skip patching, backups, and failover engineering entirely. Self-hosting Postgres on a bare EC2 instance lands around $16-20/month all-in — not cheaper once you count the labor — while Aurora Serverless v2 starts near $43/month at a 0.5-ACU floor and DynamoDB can cost pennies for genuinely spiky key-value traffic. The spread between the cheapest and most expensive option at small scale is about $50/month, which is noise next to an engineer’s hourly rate. This post lays out the concrete numbers for each and the break-even points where switching is actually defensible.

The four options, priced honestly #

Start with the baseline. A single db.t4g.micro RDS Postgres instance with 20 GB of gp3 storage runs about $15-18/month on-demand, or closer to $10 with a one-year reserved commitment. Bump to db.t4g.small for a real workload and you’re near $30/month. Add a Multi-AZ standby for automatic failover and that roughly doubles — call it $60/month for t4g.small with high availability. Those are small-team numbers, and they buy you managed backups, minor-version patching, and a one-click restore that you did not have to build. If backups are your main worry about going managed, the mechanics are laid out in An RDS Backup Strategy for Teams Without a DBA.

Self-hosted Postgres on EC2 is where the theoretical savings live. A t4g.small instance is about $12/month, plus an EBS volume, so you might land at $16-20/month all-in — cheaper than Multi-AZ RDS on paper. But that price excludes the labor: you own the backups, the point-in-time recovery, the OS patching, the Postgres major-version upgrades, and the 3 a.m. page when the disk fills. We walk through that full tally in RDS vs Self-Hosted Postgres: The Real Cost for a Small Startup, and the honest conclusion is that self-hosting only wins once you have both scale and a person whose job is the database.

Aurora Serverless v2 is a different pricing model entirely: you pay per Aurora Capacity Unit (ACU) per hour, currently around $0.12/ACU-hour, with a configurable floor. If your minimum is 0.5 ACU, that’s roughly $43/month just to keep the lights on, before storage and I/O. It shines for spiky or unpredictable traffic where you’d otherwise over-provision, but for a steady low-traffic app it is frequently more expensive than a fixed t4g.small. The cost-truth breakdown lives in Aurora Serverless v2 vs Self-Managed RDS: The Startup Cost Truth.

DynamoDB is the outlier because it isn’t a relational database and shouldn’t be compared purely on price. On-demand mode charges per request — roughly $1.25 per million writes and $0.25 per million reads — plus $0.25/GB-month of storage. For a genuinely serverless, low-and-spiky access pattern, DynamoDB can cost pennies a month and scale to zero. For a read-heavy relational workload with joins and reporting queries, forcing it into DynamoDB trades a small AWS bill for a large engineering one — you’ll rebuild query logic the database used to do for free.

Where the break-even points actually are #

The decision is rarely about the raw dollar figure — a $50/month spread at small scale is about 20 minutes of a senior engineer’s time per month. The real break-evens are about operational load: how much a failure costs you, and who is around to fix it at 3 a.m. With that framing, the choice collapses to a short decision table where order reflects how most teams should climb it.

  • RDS single-AZ when downtime during a reboot (a few minutes) is acceptable and you want zero DBA overhead — this is the default for ~$15-18/month.
  • Multi-AZ RDS when a few minutes of downtime costs you customers; budget roughly double for the standby.
  • Aurora Serverless v2 when your traffic swings by 5-10x and you’re currently paying for peak capacity you rarely use.
  • DynamoDB only when your access pattern is key-value or single-table by nature, not when you’re trying to save $20/month.

Self-hosting deserves its own rule: don’t, until you’ve measured a real bottleneck that managed services can’t address, and you have someone accountable for the database on-call rotation. The related guidance in When to Stop Using AWS Managed Services and Self-Manage holds here — the crossover is a function of headcount and predictability, not instance pricing. Notice that none of these break-evens hinge on the sticker price; they hinge on how much a failure costs you and who is around to fix it. One more cost trap worth naming: under load, connection count, not instance size, is often the thing that falls over first, which is why RDS Connection Pooling for a Small App matters more than picking a bigger tier.

How Vylara picks — and lets you override #

When you connect the Vylara GitHub App and the agent engine analyzes your repository, it detects your database from your dependencies. A prisma, typeorm, pg, or psycopg2 import surfaces PostgreSQL; @aws-sdk/client-dynamodb or a DYNAMODB_TABLE_NAME env var surfaces DynamoDB. On the "Your app needs" screen you see a plain card — PostgreSQL Database, detected via prisma, ~$15/mo — with two choices: create a managed database for me, or I already have one and paste a connection string. You are not staring at instance classes or capacity units; you’re making a cost-shaped product decision, and the per-resource estimate is shown before anything is created.

Everything provisions into your own AWS account. Vylara never hosts your data — the RDS instance, the DynamoDB table, the storage bucket all live under your account, and billing flows straight from AWS to you. Vylara charges for the orchestration layer, not the compute. The database is created on your first deploy, not when a PR merges; merging only updates your repo with the generated Dockerfile, CI pipeline, and deployment configs. After the environment is live, the connection URL is persisted under cloud_config.service and shown in your dashboard as connection.

json
{
  "service": {
    "primary_url": "myapp.internal:5432",
    "notes": "managed PostgreSQL, db.t4g.micro"
  }
}

Be honest about the limit here: the initial sizing is an educated guess. The agent reads your dependencies, not your production traffic, so it defaults to a conservative, low-cost tier — the ~$15/month instance rather than an oversized one. That’s a feature for cost control, but it means you should treat the first choice as a starting point. Once metrics come in, the platform surfaces scale-up-under-load and scale-down-to-save suggestions as one-click actions, and you can ask the in-app infrastructure chat why a database is sized the way it is — the chat reads your logs and metrics and proposes the change inline. Any action that modifies infrastructure still requires your explicit approval before it applies.

If you want the broader picture of how these database choices fit into a full AWS deployment — networking, load balancing, secrets — start from the AWS deployment guide. The database is usually the highest-stakes line item on the bill, but it’s rarely the most expensive when you get the sizing right, and moving from a wrong choice to a right one costs far more in engineering time than the monthly difference ever will.

Try Vylara on your repo

Review your cloud plan in Vylara, merge delivery changes as Git PRs, and deploy into your own AWS or Azure account when you’re ready.

Start free

Frequently asked questions

Is RDS or self-hosted Postgres cheaper for a small startup?
On raw AWS charges they're close — a single-AZ RDS db.t4g.micro is about $15-18/month, and self-hosted Postgres on a t4g.small EC2 instance lands around $16-20/month. Once you price in backups, patching, and on-call time, RDS is almost always cheaper for teams without a dedicated DBA.
When does Aurora Serverless v2 actually save money?
When your traffic swings by 5-10x and you'd otherwise pay for peak capacity around the clock. At roughly $0.12/ACU-hour with a 0.5 ACU floor (about $43/month minimum), it's often more expensive than a fixed t4g.small for steady low-traffic apps.
How much does DynamoDB cost compared to a managed relational database?
DynamoDB on-demand is roughly $1.25 per million writes, $0.25 per million reads, and $0.25/GB-month of storage, so a low-traffic app can pay pennies and scale to zero. But that only beats a ~$15/month RDS instance when your access pattern is genuinely key-value — a relational workload forced into DynamoDB trades a small AWS bill for a large engineering one.
Does Vylara let me choose my database type and size?
Yes. After analysis, Vylara detects your database from your code dependencies and offers a plain choice on the 'Your app needs' screen — create a managed one for you or bring your own connection string. It defaults to a conservative low-cost tier (around $15/month), and you approve any scale-up or scale-down suggestion from the dashboard before it applies.

Related posts