<@U04S8PLJWMT> wanted to setup a RDS for airbyte d...
# ask-ai
r
@kapa.ai wanted to setup a RDS for airbyte db
k
To set up an Amazon RDS instance as the Airbyte database, follow these steps based on the official documentation and user experiences: ### 1. Create the RDS PostgreSQL Instance - Launch a PostgreSQL instance in AWS RDS. - Make sure to note the hostname, port, database name, username, and password. - Ensure the security group allows inbound connections from your Airbyte deployment (e.g., your Kubernetes cluster or EC2 instance) on the PostgreSQL port (default: 5432) [source](https://github.com/airbytehq/airbyte/issues/48854). ### 2. Create Required Databases and Users - Manually create the following databases in your RDS instance:
Copy code
sql     CREATE DATABASE airbyte WITH OWNER = <your_user>;     CREATE DATABASE temporal WITH OWNER = <your_user>;     CREATE DATABASE temporal_visibility WITH OWNER = <your_user>;
Replace
<your_user>
with the username you plan to use for Airbyte. Grant all necessary privileges to this user [source](https://github.com/airbytehq/airbyte/issues/49304). ### 3. Configure Airbyte to Use the External Database #### For Helm/Kubernetes Deployments - In your
values.yaml
, disable the internal Postgres and configure the external database:
Copy code
yaml     postgresql:       enabled: false      global:       database:         type: "external"         secretName: "airbyte-config-secrets"         host: "<rds-endpoint>"         port: "5432"         database: "airbyte"         userSecretKey: "database-user"         passwordSecretKey: "database-password"
- Create a Kubernetes secret (before installing Airbyte) with your database credentials:
Copy code
yaml     apiVersion: v1     kind: Secret     metadata:       name: airbyte-config-secrets       namespace: airbyte     type: Opaque     stringData:       database-user: "<your_user>"       database-password: "<your_password>"
- If you encounter Helm timeouts, try increasing the timeout:
Copy code
bash     helm install release-1 airbyte/airbyte -f values.yaml --timeout 10m0s
[source](https://github.com/airbytehq/airbyte/issues/48542) #### For Docker Deployments - Edit your
.env
file to point to the RDS instance:
Copy code
DATABASE_USER=<your_user>     DATABASE_PASSWORD=<your_password>     DATABASE_HOST=<rds-endpoint>     DATABASE_PORT=5432     DATABASE_DB=airbyte     DATABASE_URL=jdbc:postgresql://<rds-endpoint>:5432/airbyte
- Remove the internal db service from your
docker-compose.yaml
[source](https://discuss.airbyte.io/t/2179). ### 4. Additional Notes - Supported Postgres versions for Airbyte as an external database include 12.19, 13.15, 14.12, 15.7, 16.3, and 17.1 [source](https://github.com/airbytehq/airbyte/issues/48542). - Ensure the Airbyte user has the correct privileges on all three databases. - If you see connection or authentication errors, double-check your secrets, security group settings, and that the correct host/port/user/password are being used [source](https://github.com/airbytehq/airbyte/issues/48854). For more detailed configuration examples, refer to the [official Airbyte documentation](https://docs.airbyte.com/platform/enterprise-setup/implementation-guide#configuring-the-airbyte-database). If you encounter specific errors, please provide the error message for more targeted troubleshooting.