All cheat sheets
Databasescheat sheet

Amazon RDS Proxy

Connection count, not CPU, is often what forces an RDS upsize. RDS Proxy pools thousands of client connections (especially from Lambda) onto ~10–30 real ones, so a small instance stays small — the proxy fee typically covers 10–25% of the avoided upsize.

Last reviewed: July 14, 2026

TL;DR: RDS Proxy sits between your app and RDS, keeping a small pool of long-lived database connections and multiplexing thousands of client connections onto them. It matters for the bill because connection count — not CPU or query load — is often what forces an upsize: a db.t3.medium can serve the queries fine but caps around 450 PostgreSQL connections, so teams jump to a db.r5.large just for headroom. The proxy breaks that chain, and the fee usually covers only 10–25% of the upsize it avoids.

The numbers

  • Proxy fee: ~$0.015 per vCPU-hour of the target database — db.t3.medium (2 vCPU) ≈ $22/mo; db.r5.2xlarge (8 vCPU) ≈ $88/mo. It tracks vCPU count, not client connections or query volume.
  • PostgreSQL connection ceilings scale with memory: db.t3.small (~220), db.t3.medium (~450), db.r5.large (~1,800). The trap: a workload needing 200 active connections can peak at 600 open ones, forcing an upsize purely for the ceiling.
  • Field examples: a Lambda API kept a db.t3.medium instead of jumping to db.r5.large — ~$170/mo net after the fee; 15 microservices downsized db.m5.large → medium (~$80/mo); a nightly 50-worker batch downsized db.r5.xlarge → large ($100+/mo).

Do this

  1. Find the tell: connections near max_connections while CPU sits low — that instance was upsized for headroom, not work.
  2. Create the proxy (RDS console → Proxies), pointing at the target instance or Aurora cluster.
  3. Tune pool behavior — max connections percentage, borrow timeout, init queries.
  4. Enable IAM auth (especially for Lambda) — connect with the execution role, no DB passwords in env vars or Secrets Manager round-trips per cold start.
  5. Repoint the app at the proxy endpoint, then monitor DatabaseConnections, ClientConnections, and DatabaseConnectionsBorrowLatency to confirm the pool is sized right — and downsize the instance once load proves calm.

Gotchas

  • Lambda is the canonical case — stateless invocations can't hold their own pool, so 800 concurrent invocations = 800 DB connections without a proxy. Monoliths and long-lived pods already pool well and gain little.
  • It's not a cure for real compute pressure — if the instance is genuinely CPU-bound, the proxy won't help; fix the actual bottleneck.
  • Sub-millisecond added latency — negligible for nearly everyone, but direct is better if you're chasing microsecond reads.
  • RDS Oracle is unsupported; SQL Server support is limited — verify against current docs.

Skip this if

  • Your app already pools connections efficiently (healthy Rails/Spring pool) and the instance is sized for the queries — there's little to gain.
  • The database has plenty of connection headroom (a big instance using 50 of 7,000 slots) — you don't have the problem the proxy solves.
  • The real waste is elsewhere on the same instance — pair with RDS Storage Auto-Scaling to stop over-provisioning disk and RDS Instance Stop/Start to stop billing dev/test nights and weekends.

Run this audit with your AI assistant

Paste this into Claude, ChatGPT, or any agent that can run the AWS CLI with read-only credentials. It audits your account for exactly the waste this sheet describes — and changes nothing.

You are auditing an AWS account's RDS/Aurora fleet for RDS Proxy
savings (avoiding connection-driven instance upsizes). Use the AWS CLI
with READ-ONLY credentials. Do not create, modify, or delete anything —
report findings and recommended (unapplied) fixes only.

1. Inventory: aws rds describe-db-instances / describe-db-clusters —
   capture engine, instance class, vCPUs. aws rds describe-db-proxies —
   which already have a proxy.
2. Connection vs compute pressure: pull CloudWatch DatabaseConnections
   (max) and CPUUtilization (avg/max) over 30 days. Flag instances where
   connections approach max_connections while CPU stays LOW — these were
   likely upsized for connection headroom, not workload.
3. Client shape: identify Lambda / Fargate / many-microservice callers
   (stateless, connection-storm-prone) hitting RDS directly — the prime
   proxy candidates.
4. Savings math: proxy fee ≈ $0.015/vCPU-hour of the target DB. Compare
   to the cost of the instance class the proxy lets you AVOID (or
   downsize from). Net = avoided-upsize $ - proxy fee.

Report a table: DB | engine | vCPUs | max connections vs CPU% | caller
type | proxy fee $/mo | avoided-upsize $/mo | net $/mo | recommend. Note
RDS Oracle is unsupported. Change nothing.
Works with any assistant that can run shell commands.

Want the guided version?

The Amazon RDS Proxy walkthrough covers this topic interactively — it asks about your setup, branches to what’s relevant, and quizzes you on the tricky parts. Free and anonymous.

Start the walkthrough