Skip to main content

Amazon RDS Proxy

Amazon RDS Proxy

Make your applications more scalable, resilient, and secure

What is RDS Proxy?

RDS Proxy is a fully managed, highly available, and easy-to-use database proxy feature of Amazon RDS that makes your applications 1/ more scalable by pooling and sharing database connections, 2/ more resilient by reducing database failover times by up to 66% and preserving application connections during failovers, and 3/ more secure by optionally enforcing AWS IAM authentication to databases and securely storing credentials in AWS Secrets Manager.

You don’t need to provision or manage any additional infrastructure to start using RDS Proxy, and it can be enabled for most applications with no code changes. 

Benefits of Amazon RDS Proxy

RDS Proxy maintains a pool of established connections to your RDS database instances, reducing the stress on database compute and memory resources that typically occurs when new connections are established. It also shares infrequently used database connections so that fewer connections access the RDS database. This connection pooling enables your database to efficiently support a large number and frequency of application connections, so your application can scale without compromising performance.

RDS Proxy minimizes application disruption from outages affecting the availability of your database by automatically connecting to a new database instance while preserving application connections. When failovers occur, RDS Proxy directly routes requests to the new database instance. This reduces failover times for Aurora and RDS databases by up to 66%. RDS Proxy also supports Multi-AZ with two readable standbys for typically under 35 second failovers, 2x improved write latency, added read capacity, and reduced minor version upgrade downtime to typically under 1 second.

RDS Proxy gives you additional control over data security by giving you the choice to enforce IAM authentication for database access and avoid hard coding database credentials into application code. It also allows you to centrally manage database credentials using Secrets Manager.

A database proxy server helps handle additional load on your database. While traditional proxy servers allow applications to scale more effectively, they are difficult to deploy, patch, and manage—consuming resources that could be better spent on developing great products. RDS Proxy is fully serverless and a fully managed database proxy so it automatically scales to accommodate your workload while removing the burden of patching and managing your own proxy server.

RDS Proxy is fully compatible with the protocols of supported database engines so you can deploy it for your application without making changes to your application code. You simply point your application connections to the proxy instead of RDS database and the rest is seamlessly managed.

Getting started with Amazon RDS Proxy

Looking for information on how you can quickly get started on RDS Proxy? Below are the most important technical documentation guides, user guides, and tutorials to show how you can get started on RDS Proxy in a few steps.

FAQs

Page topics

General

Open all

Applications with unpredictable workloads: Applications that support highly variable workloads may attempt to open a burst of new database connections. RDS Proxy’s connection governance allows you to gracefully scale applications dealing with unpredictable workloads by efficiently reusing database connections. First, RDS Proxy enables multiple application connections to share a database connection for efficient use of database resources. Second, RDS Proxy allows you to maintain predictable database performance by regulating the number of database connections that are opened. Third, RDS Proxy removes unserviceable application requests to preserve overall performance and availability of the application.

Applications that frequently open and close database connections: Applications built on technologies, such as Serverless, PHP, or Ruby on Rails, may open and close database connections frequently to serve application requests. RDS Proxy allows you to maintain a pool of database connections to avoid unnecessary stress on database compute and memory for establishing new connections.

Applications that keep connections open but idle: Applications in industries, such as SaaS or eCommerce, may keep database connections idling to minimize the response time when end users re-engages. Instead of overprovisioning databases to support mostly idling connections, you can use RDS Proxy to hold idling connections while only establishing database connections as required to optimally serve active requests.

Applications requiring availability through transient failures: With RDS Proxy, you can build applications that can transparently tolerate database failures without needing to write complex failure handling code. RDS Proxy automatically routes traffic to a new database instance while preserving application connections. It also bypasses DNS (Domain Name System) caches to reduce failover times by up to 66% for RDS and Aurora Multi-AZ databases. During database failovers, the application may experience increased latencies and ongoing transactions may have to be re-tried.

Improved security and centralized credentials management: RDS Proxy aids you in building more secure applications by giving you a choice to enforce IAM based authentication, and lets you centrally manage database credentials through AWS Secrets Manager.

RDS Proxy transforms your approach to building modern serverless applications that leverage the power and simplicity of relational databases. It enables serverless applications to scale efficiently by pooling and reusing database connections. This allows you to handle highly variable workloads that may attempt to open a burst of new connections or keep many connections open but idle—situations that could strain your database server leading to slower queries and limited application scalability.

With RDS Proxy, you no longer need to handle database credentials in your Lambda code. Instead, you can use the IAM execution role associated with your Lambda function to authenticate with RDS Proxy and your database. Furthermore, RDS Proxy is fully managed and scales its capacity automatically based on your application demands—you don't need to manage any new infrastructure or code. It maintains predictable database performance by controlling the total number of database connections that are opened, and preserves application availability by denying unserviceable connections that may degrade database performance.

RDS Proxy is available for Aurora PostgreSQL, Aurora MySQL, RDS for PostgreSQL, RDS for MySQL, RDS for MariaDB, and RDS for SQL Server. You can find a list of supported engine versions in the Aurora User Guide or the RDS User Guide.

You enable RDS Proxy for your RDS database with just a few clicks in the RDS console. While enabling RDS Proxy, you specify the VPC and subnets you want to access RDS Proxy from. As a Lambda user, you can enable RDS Proxy for your RDS database and set up a Lambda function to access it with just a few clicks and without leaving the Lambda console.

For authentication between your applications and the database through RDS Proxy, you have multiple options. You can use traditional username and password authentication with AWS Secrets Manager to store your database credentials while centralizing, securing, and simplifying credential management for your application. When using Secrets Manager, you can connect with RDS Proxy the same way you connect with your database. The username and password you supply are matched with credentials stored in Secrets Manager and then utilized for database connections.

For enhanced security, you can use IAM-based authentication. Instead of specifying a username and password, your applications can use an IAM execution role associated with services, such as AWS Lambda or Amazon EC2, to authenticate with RDS Proxy. You have two options with IAM authentication:

  • Use IAM authentication for client-to-proxy connections and use Secrets Manager for proxy-to-database connections.
  • Use IAM authentication for both client-to-proxy and proxy-to-database connections, removing the need to store database passwords in Secrets Manager.

For more information about authentication with RDS Proxy, you can learn more in Connecting to a database through RDS Proxy documentation. 

Yes, please refer to the RDS Proxy SLA page.

Customers

Acquia

"We are continuously on the lookout to optimize and improve performance and scalability for our customers. Since Drupal does not natively support connection pooling, we wanted a solution that would allow us to better scale our application’s connections on relational databases. RDS Proxy fits the bill perfectly! With RDS Proxy, our customer's Drupal applications are able to easily utilize a ready pool of established connections. This has allowed us to both better manage sudden surges in website traffic and improve the efficiency of our databases."

Ed Brennan, Chief Architect - Acquia

Missing alt text value

CAINZ

"We have a serverless API infrastructure based on AWS Lambda, which is expected to support tens of thousands of users and requires a scalable backend data store. While we have traditionally relied on NoSQL databases for such scenarios, the challenge in this situation was that we needed strong SQL querying capabilities to manage and access the data provided by Amazon RDS and Amazon Aurora databases. We can now address this challenge with RDS Proxy in front of our RDS and Aurora databases. In our testing, we observed 4X improvement in response times with RDS Proxy at peak loads. RDS Proxy is beneficial for us since we can use familiar SQL statements with our relational databases and all we needed to do was to simply switch the endpoint."

Masahiro Arai, Digital Strategy Division - CAINZ

Missing alt text value

CloudHealth by VMware

"We recently migrated our MySQL databases to Amazon Aurora. Our applications keep a large number of database connections open, putting stress on our databases during connection surges, causing outages for our customers. Upon migrating to Aurora, RDS Proxy became a critical piece of our architecture to scale our application and optimize costs. Using RDS Proxy, our applications could open far more connections to the proxy, which in turn reduced database connections by up to 90 percent during peak hours, insulating the database from high connection counts. RDS Proxy helped improve our system stability and reduced our costs. With less system resources going to database connections, we could consolidate our databases into fewer Aurora clusters, lowering our total operating costs."

Peter Fein, Senior Software Architect - CloudHealth by VMware

Missing alt text value

Dream 11

"RDS Proxy was a game-changer for us during Indian Premier League 2023. It helped us handle the massive traffic spikes during round lock without compromising on database performance and availability. It also enabled us to scale our resources dynamically and optimize our costs. We were able to deliver a seamless experience to our users. RDS Proxy is a must-have for any online gaming platform that needs to handle unpredictable and high-volume traffic."

Bipul Karnani, Principal Engineer - Dream 11

Missing alt text value