RDS (Postgres)

Introduction

Faraday easily integrates with RDS, enabling you to embed AI-powered predictive analytics anywhere else in your stack. Discover your brand's bespoke personas, score your customers for churn risk, find repeat purchasers, and more, enabling you to confidently engage the right customers, at the right time, with personalized, relevant content. The best part? No code—and no PhD—required.

Getting started

Make sure you have a Faraday account (signup is free!) and that it's not in test mode.

Prerequisites

You'll need the following details to create your connection to RDS (Postgres):

  • Host required
  • Load balancer DNS name optional — In case the host is deployed behind a load balancer.
  • SSH bastion optional — In case the host is deployed behind an SSH bastion / jump server. Uses the Faraday SSH public key. This is the address of the bastion including username. For example, faraday@mybastion.example.com
  • Port required
  • User required
  • Password required
  • Database required
  • Schema required

Connection

Setting up your connection

First, you'll need to grant Faraday access to RDS (Postgres).

Amazon Relational Database Service (RDS) is a hosted database service. Postgres connections are host-based and require a user and password. We suggest that you create a Faraday-only schema to both send and receive data. Within this schema, Faraday would have full read and write access. Alternatively, you can give Faraday access to certain tables in a shared schema.

Example commands:

  • CREATE USER faraday_user WITH PASSWORD '***'
  • CREATE SCHEMA faraday_schema
  • ALTER DEFAULT PRIVILEGES IN SCHEMA faraday_schema GRANT ALL ON TABLES TO faraday_user
  • GRANT USAGE, CREATE ON SCHEMA faraday_schema TO faraday_user

This connection type can be placed behind an SSH bastion (aka jump server). In that case, specify the user and host of the SSH bastion.

This connection type can also be placed behind a load balancer. In that case, specify the host of the load balancer. Faraday suggests that you use an unguessable string somewhere in the path to your data. This avoids what is called the Confused deputy problem

For example, instead of naming an S3 bucket s3://faraday-acme/, name it s3://faraday-acme-pwiiprz162ez. This guarantees that malicious actors cannot guess the name and request that Faraday import data from it into their account. The same logic applies to any path that is used to locate data.

Creating your connection

Now you can connect Faraday to RDS (Postgres).

  • In the navigation sidebar, choose Connections. Screenshot of the empty connections list
  • Click the New Connection button.
  • Fill out the form
    • Choose RDS (Postgres).
    • Skip "Step 1" — you've already completed it!
    • For "Step 2," fill out the connection details you gathered above.
    • Enter a memorable name, like "My RDS (Postgres) connection". Screenshot of the new connection form, filled out
    • Click the Save connection button.

Screenshot of the connections list with the correct connections showing
Wait briefly while Faraday establishes your connection. It shouldn't take long.

Your new connection is now ready to use!