> ## Documentation Index
> Fetch the complete documentation index at: https://midplane.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon RDS

> Connect Amazon RDS for PostgreSQL or MySQL to Midplane: a read replica's endpoint, the security group or a bastion, verified TLS with RDS's own CAs, and the role script.

RDS for PostgreSQL and RDS for MySQL 8.4 connect; RDS for MySQL 8.0 is
refused, since Midplane needs MySQL 8.3 or later. For Aurora, see
[Aurora](https://midplane.ai/docs/hosts/aurora.md).

**1. Copy a read replica's endpoint**

It is on the instance's **Connectivity & security** tab:

```text theme={null}
postgres://<user>:<password>@mydb-replica.abc123.eu-central-1.rds.amazonaws.com:5432/app
```

The master user is fine to start. Use a password: IAM authentication
tokens expire after 15 minutes.

**2. Let Midplane in**

Directly, the instance must be publicly accessible, with an inbound rule
in its security group for your region's
[egress addresses](https://midplane.ai/docs/connect/allowlist.md). To keep it private, use an
[SSH bastion](https://midplane.ai/docs/connect/ssh.md): an EC2 instance in the same VPC whose
security group the database's admits.

**3. Run the role script on the primary**

A replica is read-only: run the script as the master user on the
primary, in the same database, and the role reaches the replica by
replication ([the role script](https://midplane.ai/docs/connect/role.md)).

Midplane carries RDS's certificate bundle for every region, so the source
says **TLS verified** with no CA to paste. `rds.force_ssl` makes no
difference: Midplane always uses TLS.

More in AWS's guides:
[TLS for RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html)
and [security groups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.RDSSecurityGroups.html).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.