LogoLogo
  • Introduction
    • Welcome
    • Quickstart
  • Platform
    • Connections
      • Jobs
      • Sync types
      • Sync schedule
      • Column Anonymization
      • Block Window
    • Connect to databases
    • Running jobs manually
    • Alert Integrations
      • Discord
      • Email
      • Slack
    • Runs history
    • How we move data
  • Connectors
    • APIs
      • ActiveCampaign
      • Amplitude
      • Asaas
      • Asana
      • Bling
      • Beehiiv
      • BomControle
      • Campaign Monitor
      • ClickUp
      • Conta Azul
      • Convenia
      • CustomerX
      • Delighted
      • Facebook Ads
      • FreshChat
      • Freshdesk
      • Gainsight
      • Google Ads
      • Hotmart
      • HubSpot
      • Intercom
      • Jira
      • Linkedin Ads
      • MailChimp
      • MailGun
      • MercadoLibre
      • Mixpanel
      • Monday
      • Movidesk
      • Omie
      • Pipefy
      • Qulture.Rocks
      • RD Station CRM
      • RD Station Marketing
      • Sankhya
      • Sentry
      • Stripe
      • Superlógica
      • Tiny
      • Teamwork Desk
      • Track.co
      • Twitch.tv
      • Twygo
      • Typeform
      • Vindi
      • Zendesk
    • Databases
      • Firebird
      • MySQL
      • Neo4j
      • Oracle
      • PostgreSQL
  • Destinations
    • BigQuery
      • Hosted by Erathos
    • Databricks
    • PostgreSQL
      • Aws (RDS)
      • Azure
    • Redshift
    • S3 Iceberg
  • API
    • Introduction
      • Trigger jobs outside Erathos
      • Trigger jobs in Erathos
    • Quickstart
      • Airflow
      • Dbt Cloud
      • Erathos
      • Prefect
    • Concepts
      • Authentication
      • Metadata
      • Rules
      • Variables and secrets
    • API Reference
      • Jobs
      • Orchestration
      • Secrets
      • Variables
      • Workspaces
  • Settings
    • User settings
    • Workspace settings
Powered by GitBook
On this page
  • Setup
  • ARN RDS
  • IAM Role
  • Install Extension
  • Connect to Erathos
  1. Destinations
  2. PostgreSQL

Aws (RDS)

Connect Erathos to PostgreSQL (Aws).

PreviousPostgreSQLNextAzure

Last updated 6 months ago

To connect to your PostgreSQL RDS instance, in addition to the access credentials, there are specific configurations that need to be made.

Setup

ARN RDS

To grant the database access to pipeline data stored in S3, you’ll first need to associate an appropriate IAM role with the RDS instance.. First, you’ll need the ARN of the database. To do this, go to RDS and select Databases.

In the Databases table, click on the desired RDS instance to open its main page. Under the Configuration tab, copy the value under Amazon Resource Name (ARN).

In the JSON below:

  1. Replace ARN_RDS with the ARN value copied in the previous step.

  2. Replace ID_AWS_ACC with your AWS Account ID.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow", 
            "Principal": {
                "Service": "rds.amazonaws.com"
            }, 
            "Action": "sts:AssumeRole",
            "Condition": {
                "StringEquals": {
                    "aws:SourceArn": "<ARN_RDS>", 
                    "aws:SourceAccount": "<ID_AWS_ACC>"
                }
            }
        }
    ]
}

IAM Role

To create the role that will be used by RDS to authenticate access to S3, navigate to IAM > Roles and selected the action to Create role.

Select Custom trust policy under Trusted entity type and paste the JSON generated in the ARN RDS step into Custom trust policy.

Skip Step 2 and finalize the creation by naming the new role and reviewing the Trust policy JSON during Step 3.

After creating the role, navigate to its main page. Click the Attach policies button and then Create inline policy.

On the loaded page, select the JSON option and paste the policy below, which will allow the database to use the S3 service:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow", 
            "Action": ["s3:GetObject", "s3:ListBucket", "s3:GetBucketLocation"],
            "Resource": ["arn:aws:s3:::*", "arn:aws:s3:::*/*"]
        }
    ]
}

Click Next to proceed to the final stage of policy creation. Once named, click Create policy to complete the process.

Note: Remember the chosen name, as it will be needed in the next step.

Navigate to the main page of the desired instance as explained in Step 1. Under the initial Connectivity & security tab, scroll to the bottom of the page to view the Manage IAM roles table.

Choose the name of the IAM role created in Step 2 and the s3Import feature, then click Add role.

Wait a few moments until the association status changes from Pending to Active.

Install Extension

In your PostgreSQL Database, execute the following query to install the additional functionalities related to Storage:

CREATE EXTENSION aws_s3 CASCADE;

Connect to Erathos

To connect Erathos to your RDS PostgreSQL (Aws):

  1. Create a New Destination

    • Go to Settings > Data Warehouse.

    • Select PostgreSQL.

  2. Fill Out the Form

    • Input your credentials, such as Host, Database name, User, Password, Port and Region.

  3. Advanced Options (Optional)

Define if the connection should be made through a Static IP or SSH. For more information, plese referer to .

If you need help connecting to your PostgreSQL, reach out to our team at .

support@erathos.com
Databases connection types