Tuning Database Configuration and Pooling Connections with RDS Proxy
This lesson explains how operators change the instance class, storage, parameters or connection handling once monitoring shows the bottleneck, and how RDS Proxy addresses connection exhaustion and slow failovers.
Learning outcomes
After completing this lesson, you will be able to:
- Scale instance class and storage and change parameters.
- Use RDS Proxy for connection pooling and faster failover.
Instance class, storage and parameters
Scaling up the DB instance class (more vCPU and memory, or a newer Graviton generation) is done by modifying the instance, either immediately or during the next maintenance window; it causes a brief outage, or a failover of a few tens of seconds with Multi-AZ. Storage can be increased, changed to gp3 with provisioned IOPS and throughput, or to io2 for sustained IOPS, mostly without downtime, and storage autoscaling grows storage automatically when free space is low, up to a maximum you set. Storage cannot be reduced.
Engine settings live in DB parameter groups (instance level) and, for Aurora and Multi-AZ clusters, DB cluster parameter groups. Default groups cannot be edited, so create a custom group, change values such as max_connections, work_mem or innodb_buffer_pool_size, and associate it. Dynamic parameters apply immediately; static parameters need a reboot, and the instance shows pending-reboot until then. Option groups enable features such as Oracle and SQL Server options.
Static or dynamic?
RDS Proxy
Amazon RDS Proxy is a fully managed database proxy for RDS and Aurora (MySQL, PostgreSQL, MariaDB and SQL Server). Applications connect to the proxy endpoint, and the proxy maintains a pool of connections to the database that it shares among many client connections. This prevents connection exhaustion when many short-lived clients, typically Lambda functions or auto-scaled containers, open connections, and it reduces the CPU and memory the database spends on connection management. During a Multi-AZ or Aurora failover the proxy keeps client connections open and routes to the new primary, reducing failover time for applications by up to 66%.
The proxy retrieves database credentials from Secrets Manager and can require IAM authentication and TLS from clients. It runs in your VPC, so security groups must allow clients to reach the proxy and the proxy to reach the database. Pinning occurs when a session uses features that cannot be shared, such as temporary tables or session variables, which reduces pooling efficiency; the DatabaseConnectionsCurrentlySessionPinned metric shows it. Reader endpoints on the proxy spread read-only traffic across Aurora replicas.
The following diagram shows the proxy holding client connections through a failover.

Benefits of RDS Proxy
Lambda exhausting connections
During a promotion, a Lambda function that writes orders scales to 900 concurrent executions, and the Aurora MySQL writer rejects connections with Too many connections. Raising max_connections would consume memory on the database and only move the limit. The team creates an RDS Proxy for the cluster, stores the credentials in Secrets Manager, changes the function's database host to the proxy endpoint and enables IAM authentication. DatabaseConnections on the writer falls to about 80, while the proxy's ClientConnections follows the Lambda concurrency.
A parameter shows pending-reboot after a change. Why?
Show answer
It is a static parameter, which takes effect only after the instance reboots.
Exam Tips
Remember for the exam
- Default parameter groups cannot be modified; create a custom group.
- Static parameter changes need a reboot (pending-reboot status).
- Storage autoscaling grows storage automatically; storage cannot shrink.
- RDS Proxy pools connections for Lambda and other bursty clients and shortens failover impact.
- RDS Proxy uses Secrets Manager credentials and supports IAM authentication.