Quick verdict
Choose Amazon RDS Proxy if you run RDS or Aurora, want AWS to operate and scale the pooler, and value IAM authentication, Secrets Manager credentials and faster failover for Multi-AZ deployments, especially for Lambda workloads. Choose PgBouncer if you want no extra AWS charge, need settings RDS Proxy does not offer (statement pooling, protocol-level prepared statements in transaction mode, query cancel), run PostgreSQL outside RDS, or want the same pooler across clouds. RDS Proxy pins a PostgreSQL session to one connection when it sees SET, SQL PREPARE and similar state changes, so check pinning before relying on its savings.
Amazon RDS Proxy is a fully managed database proxy for Amazon RDS and Aurora. The application connects to the proxy endpoint; the proxy keeps a pool of database connections and, by default, can reuse a connection after each transaction (AWS calls this multiplexing). It supports Aurora MySQL, Aurora PostgreSQL, RDS for MariaDB, RDS for MySQL, RDS for PostgreSQL and RDS for SQL Server. Clients can be required to authenticate with IAM, and the proxy reaches the database with credentials from AWS Secrets Manager or with IAM database authentication. AWS says it can reduce failover times for RDS Multi-AZ DB instances by up to 66%. For the full background, see Amazon RDS Proxy explained.
PgBouncer is an open source (ISC) connection pooler for PostgreSQL only. You install it on EC2, in containers or as a sidecar, and it offers session (default), transaction and statement pooling. Version 1.26.1 (14 October 2026) is current; 1.26.0 removed online restart (-R) in favour of rolling restarts with so_reuseport.
Managed service versus self-run software. RDS Proxy is an AWS service you pay for by database capacity and cannot run outside AWS. PgBouncer is software you operate wherever PostgreSQL runs. Both are poolers, not SQL-aware read/write splitters; for that, see PgBouncer vs Pgpool-II.
Side by side
| Aspect | Amazon RDS Proxy | PgBouncer |
|---|---|---|
| Product type | Managed AWS service; proxy compute is serverless and scales with the workload | Open source software you install and operate |
| Databases | RDS for PostgreSQL, MySQL, MariaDB and SQL Server; Aurora PostgreSQL and MySQL; RDS and Aurora targets only | PostgreSQL only, anywhere (self-managed, RDS, Aurora, other clouds) |
| Pooling behaviour | Transaction-level reuse (multiplexing) by default; sessions are pinned to one connection when state changes | Session (default), transaction or statement pooling, chosen by you |
| Session state on PostgreSQL | SET, PREPARE/EXECUTE/DEALLOCATE, temporary tables, cursors, LISTEN, session advisory locks and DISCARD pin the session; no pinning filters for PostgreSQL | In transaction mode SET, LISTEN and SQL PREPARE are unsafe; protocol-level prepared statements supported since 1.21 |
| Failover | Tracks the writer and routes to the new primary without DNS caches; AWS cites up to 66% shorter failover for RDS Multi-AZ DB instances | No primary detection; relies on a DNS name, virtual IP, Patroni or HAProxy |
| Read traffic | For RDS instances, writer only; Aurora and Multi-AZ DB clusters can add read-only proxy endpoints | Separate logical databases pointing at replicas; host list with load_balance_hosts |
| Authentication | IAM for clients (optional), Secrets Manager or IAM database authentication to the database; up to 200 secrets per proxy | cert, md5, scram-sha-256, trust, hba, ldap, pam; auth_file or auth_query |
| Network | Same VPC as the database, never publicly accessible; listens on 5432 for PostgreSQL | Wherever you run it; port 6432 by convention |
| Notable PostgreSQL gaps | No CancelRequest (Ctrl+C in psql), protocol 3.0 only, no streaming replication mode, lastval not always accurate | Single-threaded per process; online restart removed in 1.26.0 |
| Price | 0.015 USD per vCPU-hour of the instance (or per ACU-hour for Aurora Serverless) in US East (N. Virginia) | Free (ISC); you pay for the compute it runs on |
| Main trade-off | Nothing to operate and AWS-native security, but pinning can erase savings and adds about 5 ms on average (AWS figure) | Full control and no licence cost, but you run, patch and make it highly available |
Key differences
Who operates the pooler
RDS Proxy removes the pooler from your operations list. AWS runs the proxy compute serverlessly across Availability Zones, independently of the DB instance; the default endpoint is provisioned across two Availability Zones from the subnets you give it, and you can add up to 20 more endpoints. You configure it through the console, CLI or CloudFormation, monitor it with CloudWatch metrics, and do not patch it. The constraints are AWS ones: 20 proxies per account by default, one target DB instance per proxy, the proxy in the same VPC as the database, and no public access.
PgBouncer is yours to run. You size it, place it (often next to the application or on the database host), make it highly available with more than one instance, and upgrade it. Because 1.26.0 removed online restart, upgrades now use rolling restarts with so_reuseport or several instances behind a balancer. In return you control every setting and can use the same pooler on any PostgreSQL deployment, including outside AWS.
Pooling and pinning on PostgreSQL
Both poolers get their savings by lending a server connection for one transaction at a time, and both struggle with session state. They handle it differently. PgBouncer leaves the choice to you: in transaction mode, session features such as SET, LISTEN and SQL PREPARE are simply not safe, while protocol-level prepared statements work since 1.21. Version 1.26.0 tracks all parameters PostgreSQL reports, including search_path, so those settings do not leak between clients.
RDS Proxy protects correctness automatically by pinning: when it detects a session state change, it keeps that client on the same database connection until the session ends. The User Guide lists the PostgreSQL triggers, including SET commands, PREPARE, DISCARD, DEALLOCATE and EXECUTE, temporary tables, sequences and views, cursors, LISTEN, loading a library such as auto_explain, nextval and setval, and session advisory locks. Session pinning filters exist only for the MySQL engine family. Any statement larger than 16 KB also pins. AWS suggests moving identical SET statements into the proxy's initialization query and watching the DatabaseConnectionsCurrentlySessionPinned metric.
-- PostgreSQL: patterns that pin a session on RDS Proxy
SET search_path TO app; -- SET commands
PREPARE q AS SELECT 1; -- SQL-level prepared statements
SELECT nextval('orders_id_seq'); -- sequence functions
-- Prefer: RETURNING instead of lastval()
INSERT INTO orders (customer_id) VALUES (42) RETURNING id; Failover, authentication and AWS integration
RDS Proxy tracks the current writer of a Multi-AZ deployment and connects to the new primary after failover while preserving application connections; AWS states this reduces failover times by up to 66% for RDS Multi-AZ DB instances. It can enforce IAM authentication for clients and keeps database credentials in Secrets Manager, which suits Lambda functions; the Lambda Developer Guide recommends a proxy for production. It also queues or throttles connections it cannot serve immediately and sheds load beyond the limits you set.
PgBouncer has no failover logic and no IAM integration. On AWS it typically points at the RDS or Aurora cluster endpoint and relies on DNS for failover, or on the approach AWS published for using PgBouncer with RDS Multi-AZ DB clusters. Authentication uses PostgreSQL methods such as SCRAM, certificates, LDAP or PAM, with auth_query to look up passwords in the database.
PostgreSQL feature gaps to check
The RDS User Guide lists PostgreSQL-specific limitations for RDS Proxy: no support for cancelling a query with a CancelRequest (for example Ctrl+C in psql), only version 3.0 of the PostgreSQL messaging protocol, no streaming replication mode, no direct SSL negotiation, inaccurate lastval results (use RETURNING), and the default postgres database must exist. The RDS FAQs also say it can add an average of 5 milliseconds of latency. PgBouncer has its own constraints, mainly the transaction-mode session limits and the single-threaded design, but it is not tied to a cloud provider's feature list.
Pricing and licensing
Amazon RDS Proxy. The pricing page says that for provisioned instances on Aurora, RDS for PostgreSQL, MySQL, MariaDB and SQL Server, RDS Proxy is priced per vCPU of the database instance per hour, and for Aurora Serverless per ACU-hour consumed by the database. The page itself shows no rates; AWS's price data (published 29 October 2026) lists 0.015 USD per vCPU-hour and 0.015 USD per ACU-hour in US East (N. Virginia). Partial hours are billed in 1-second increments with a 10-minute minimum after a billable status change. The default endpoint has no extra charge; additional read-only or read/write endpoints use AWS PrivateLink, billed separately. Example: a proxy in front of a 2-vCPU instance such as db.m8g.large for 730 hours is 2 x 730 x 0.015 = 21.90 USD a month, on top of the database. Prices vary by Region.
PgBouncer. Free under the ISC licence, with no paid edition. Your cost is the EC2 instances, containers or spare capacity it runs on, plus the time to operate and patch it; running two or more instances for availability multiplies the compute.
Pricing checked on the vendors' official pages on 7 November 2026. Prices change; confirm before buying.
Where each one leads
Amazon RDS Proxy strengths
- Fully managed: no pooler servers to size, patch or make highly available
- Faster failover for Multi-AZ deployments, with application connections preserved
- IAM authentication for clients and credentials in Secrets Manager
- One service for PostgreSQL, MySQL, MariaDB and SQL Server on RDS and Aurora
- Recommended by AWS for Lambda functions in production
PgBouncer strengths
- Free, with no charge tied to database size
- Works with any PostgreSQL deployment, on AWS or elsewhere
- Choice of session, transaction or statement pooling
- Protocol-level prepared statements in transaction mode
- Forwards query cancel requests (with peering across processes), which RDS Proxy does not support for PostgreSQL
Limitations
Amazon RDS Proxy limitations
- SET, SQL PREPARE, temporary objects and similar state pin PostgreSQL sessions, with no pinning filters for PostgreSQL
- For RDS instances it can target only the writer, not read replicas
- Same VPC only, not publicly accessible, and adds about 5 ms on average according to AWS
- PostgreSQL gaps: no CancelRequest, protocol 3.0 only, no streaming replication mode
- Billed per vCPU-hour or ACU-hour of the database, so cost grows with instance size
PgBouncer limitations
- You run, patch and monitor it, and make it highly available yourself
- No failover logic or IAM integration
- PostgreSQL only
- Single-threaded per process, and online restart was removed in 1.26.0
When to choose each
Choose Amazon RDS Proxy if
- Lambda functions or other bursty clients connect to RDS or Aurora
- You want IAM authentication and Secrets Manager credentials at the proxy
- Faster Multi-AZ failover with preserved connections matters to you
- You would rather pay per vCPU-hour than operate pooler instances
- You also need pooling for RDS for MySQL, MariaDB or SQL Server
Choose PgBouncer if
- Your application relies on prepared statements or session settings that would pin RDS Proxy sessions
- You run PostgreSQL outside RDS, or across several clouds
- You want statement pooling or settings RDS Proxy does not expose
- Cost tied to large instance sizes is a concern
- You already run containers or sidecars where a pooler fits naturally
When neither is right
- Long-running application servers with a well-sized driver or framework pool may not need any proxy.
- You need SQL-aware read/write splitting and failover in the middleware: see PgBouncer vs Pgpool-II.
- A single PgBouncer process is CPU-bound on a large self-managed fleet: see Odyssey vs PgBouncer.
- Connection limits are a symptom of the wrong engine choice: compare Aurora PostgreSQL vs RDS PostgreSQL and Amazon RDS vs Amazon Aurora.
Final recommendation
On RDS or Aurora, Amazon RDS Proxy is the lower-effort option, and the natural fit for Lambda, IAM-based access and faster Multi-AZ failover, provided your PostgreSQL sessions do not pin constantly. PgBouncer is the better fit when you want no per-vCPU charge, need prepared statements or other features that RDS Proxy pins or lacks, or run PostgreSQL outside RDS, and you are prepared to operate it. Before choosing RDS Proxy, review your driver settings and session use against the pinning list; before choosing PgBouncer, decide who owns its availability.
Frequently asked questions
Is RDS Proxy just a managed PgBouncer?
No. AWS does not describe it that way. It is a separate AWS service that pools connections for PostgreSQL, MySQL, MariaDB and SQL Server, uses pinning instead of user-selected pooling modes, and adds IAM authentication and failover handling. PgBouncer is a PostgreSQL-only open source pooler.
How much does RDS Proxy cost compared with PgBouncer?
RDS Proxy is billed at 0.015 USD per vCPU-hour of the database instance (or per ACU-hour for Aurora Serverless) in US East (N. Virginia), about 21.90 USD a month for a 2-vCPU instance. PgBouncer is free; you pay for the compute it runs on and the time to operate it.
Do prepared statements work through RDS Proxy on PostgreSQL?
They work, but PREPARE, EXECUTE and DEALLOCATE pin the session to one database connection, which removes the multiplexing benefit for that client. PgBouncer supports protocol-level prepared statements in transaction mode since 1.21.
Can I run PgBouncer in front of RDS or Aurora?
Yes. PgBouncer works with any PostgreSQL endpoint, including RDS and Aurora, typically on EC2 or in containers in the same VPC. AWS has published an approach for using PgBouncer with RDS Multi-AZ DB clusters for fast switchovers.
Can RDS Proxy send reads to replicas?
For RDS DB instances, no: a proxy can only be associated with the writer. For Aurora DB clusters and Multi-AZ DB clusters you can create additional read-only proxy endpoints, which use AWS PrivateLink and are billed separately.
Sources
- Amazon RDS User Guide: Amazon RDS Proxy (quotas and limitations)
- Amazon RDS User Guide: Avoiding pinning an RDS Proxy
- Amazon RDS User Guide: Planning where to use RDS Proxy
- Amazon RDS Proxy pricing
- AWS price data: RDS Proxy (USD)
- Amazon RDS FAQs (RDS Proxy)
- AWS Database Blog: Fast switchovers with PgBouncer on RDS Multi-AZ DB clusters
- PgBouncer features and pooling modes
- PgBouncer configuration reference
- PgBouncer changelog
Checked November 2026.
How we research comparisons: our editorial method.