Amazon RDS Proxy provides a managed connection layer between applications and supported Amazon RDS or Amazon Aurora databases. Applications connect to a proxy endpoint using their normal database drivers, while the proxy maintains a pool of connections to the target database. This is particularly useful when application instances or functions create many short-lived connections that would otherwise consume database memory and processing capacity.
RDS Proxy runs on serverless compute that automatically scales with the database workload. Its infrastructure spans multiple Availability Zones, with compute, memory, and storage independent of the database instance.
Supported database targets include Aurora Serverless clusters, but not Aurora Serverless v1 clusters.
The proxy can reuse a database connection across different client connections when transaction and session state allow it. This multiplexing reduces the number of database connections required for a workload, but it does not eliminate connection limits. Transactions hold database connections while active, and certain statements or session settings can pin a client session to a particular backend connection. Test representative application behavior and monitor session pinning before assuming a specific pooling benefit.
Deploy the proxy in a VPC with network access to its database target. Configure subnets and security groups so applications can reach the proxy and the proxy can reach the database port. A proxy is associated with a database target rather than functioning as a general-purpose router across unrelated databases. Applications normally adopt it by changing their database hostname to the proxy endpoint and configuring the appropriate authentication and TLS settings.
The proxy must reside in the same VPC as its database and cannot be publicly accessible, even if the database is publicly accessible.
Reserve free subnet IP addresses for proxy scaling and maintenance. Insufficient free addresses can prevent scaling and cause higher query latency or client connection failures; RDS reports this condition through event RDS-EVENT-0243.
Each proxy supports at most 20 user-defined endpoints in addition to its default endpoint, for a total of 21 endpoints. The default endpoint cannot be modified.
For RDS DB instances in replication configurations, a proxy can be associated only with the writer DB instance, not a read replica.
Authentication options depend on the database engine and proxy configuration. RDS Proxy supports AWS Secrets Manager credentials and IAM database authentication in supported configurations, including end-to-end IAM authentication where available. Distinguish authentication from the application to the proxy from authentication between the proxy and the database. When using stored credentials, grant the proxy access only to the required secrets and any necessary AWS KMS decryption permissions.
During a supported database failover, the proxy tracks the database target and redirects connections to the available writer. This reduces reliance on application-side DNS refresh and connection recreation, but does not guarantee uninterrupted transactions. In-flight work can fail, and applications still need bounded retries, transaction rollback handling, and idempotency controls. The proxy does not replay failed transactions automatically.
Connection pool settings let engineers limit the database connections used by the proxy and control how long requests wait to borrow one. Tune these settings alongside application concurrency, transaction duration, and database capacity. Use Amazon CloudWatch metrics and proxy logs to investigate connection saturation, borrow latency, authentication failures, and session pinning.
RDS Proxy reserves part of the MaxConnectionsPercent quota for internal monitoring connections, so that quota is not entirely available to application workloads. Keep at least 30% connection headroom above expected peak demand to accommodate spikes and internal connection redistribution.
Check engine, version, Region, and topology support before deployment. For supported Aurora configurations, additional proxy endpoints can provide read-only access to readers or connectivity from another VPC. RDS Proxy is not a query cache, a replacement for database scaling, or a universal solution for slow queries; query tuning, indexing, and transaction design remain necessary.