RDS Configuration Notes
Warning: auto-generated passwords
When creating an RDS instance, if you choose "auto-generate a password", it will only appear in the blue AWS notification after you create it - don't dismiss that notification or you'll have to reset the password!
Parameter Group configuration
Also see the notes on maximum active connections at the bottom of this page, which is also controlled by the parameter group configuration.
Parameter | Value to set | Explanation |
log_bin_trust_function_creators | 1 | Without this change, you can't use stored procedures or functions with your RDS database. |
innodb_log_buffer_size | 128000000 for test environment, varies for live environments | If the log buffer size is too small, large transactions have to be written to disk in pieces before committing, which severely slows them down. |
Storage
Use the gp3 storage option - it's cheaper and has better throughput than gp2.
Maximum active connections
The max connections for a given DB instance depends on the instance type, based on its total memory. Note that it's not a straight formula, since some of the total memory is reserved for other purposes than just connections.
The first three types of DB have the following connection limits by default (tested Jan 3, 2024):
Instance type | Memory (GiB) | Max active connections (default) |
t4g.micro | 1 | 30 |
t4g.small | 2 | 68 |
t4g.medium | 4 | 151 |
You can technically increase this limit - the max_connections parameter in the DB's parameter group controls this value. The default is set to LEAST({DBInstanceClassMemory/25165760},12000), so you can adjust this by changing the divisor on the class memory. It's not recommended, as if there's too much memory use the DB server will crash.