> For the complete documentation index, see [llms.txt](https://docs.stacksync.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stacksync.com/two-way-sync/connectors/postgres/authorize-postgres/amazon-rds/ensuring-secure-rds-connections-with-ssl-certificate.md).

# Ensuring Secure RDS Connections with SSL Certificate

Providing the database's SSL certificate when connecting to the RDS database is important to verify the server's identity and prevent man-in-the-middle (MITM) attacks. Without specifying the certificate, the client cannot be sure it is connecting to the intended server, leaving the connection vulnerable to interception by malicious actors. By supplying the SSL certificate, the client can authenticate the server's identity, ensuring that the data exchange happens only with the legitimate database server. This verification step adds a critical layer of trust and security in database connections.

### 1. Identify the SSL Certificate used by your RDS

1. **Access the AWS Console:**
   * Log in to the AWS Management Console and navigate to the RDS service.
   * Select the target database instance.
2. **Determine Certificate Details:**
   * Identify the Certificate Authority (CA) your database uses.
   * Confirm the AWS Region where your database is hosted.

<figure><img src="/files/fgeWiHCx0MdnuDHDgmFN" alt=""><figcaption></figcaption></figure>

### 2. Download the SSL Certificate

1. **Download from AWS Documentation:**
   * Visit the [AWS RDS SSL Documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html) and locate the appropriate certificate bundle based on your database’s region (e.g., `eu-west-3`).

<figure><img src="/files/rK7dg1rKc7pszneUrkiu" alt=""><figcaption></figcaption></figure>

2. **Extract the Correct Key:**

* The downloaded certificate file includes three keys for supported encryption methods: `rsa2048`, `rsa4096`, and `ecc384`.
* Use a text editor like VSCode to open the file.
* Select the appropriate certificate based on your database’s encryption method:
  * **Shortest key:** `ecc384`
  * **Longest key:** `rsa4096` (commonly used for enterprise-grade databases).

### Upload the SSL certificate to Stacksync

When creating a new database connection in the Stacksync app, upload the selected SSL certificate to complete the secure configuration.

<figure><img src="/files/g0qLkfJ8mNPI0gXZigov" alt=""><figcaption></figcaption></figure>

If you have any questions or need further assistance, reach out to us at <hello@stacksync.com>. We’re here to help ensure a seamless and secure database connection setup.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.stacksync.com/two-way-sync/connectors/postgres/authorize-postgres/amazon-rds/ensuring-secure-rds-connections-with-ssl-certificate.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
