Aurora PostgreSQL (Data API)
  • 13 Jan 2023
  • 2 Minutes to read
  • Dark

Aurora PostgreSQL (Data API)

  • Dark

Article summary


In this article we will explain how to connect an Amazon Aurora PostgreSQL database to Preset. So let's get started!

Allowlist Preset IPs

Preset Cloud runs on four regions. For Preset to access your data, first thing you need to do is to add region based Preset IP addresses to your Inbound and Outbound firewall rules.

us-west-2 (us1a)us-east-1 (us2a)eu-north-1 (eu5a)ap-northeast-1 (ap1a)

If you are not sure where your Preset workspace is located, you can refer to the URL on your browser when accessing Preset. It should look like this:, where us2a means it is in us-east-1.

Step 1: Create Database on AWS

To learn how to do this, please see Creating an Aurora PostgreSQL Database Cluster external-link_10x10.

Step 2: Ensure Accessibility from Outside VPC

To learn how to do this, please see Connecting an Aurora Database Cluster from Outside a VPC external-link_10x10.

Step 3: Connect Database to Preset

Add Database

Let's start by selecting + Database — have a look at Connecting your Data if you need help wth this step.

  • ...then, in the Connect a database window, select Aurora PostgreSQL (Data API) in the Supported Databases field.


In the Display Name field, enter a meaningful name for the new connection to the Aurora PostgreSQL database. In this example, we simply used the default Aurora PostgreSQL (Data API).

In the SQLAlchemy URI field, customize your URI connection string using the following syntax:

postgresql+auroradataapi://{aws access id}:{aws secret key}@/{db_name}
  • aws access id: Amazon Web Services access identification number
  • aws secret key: Amazon Web Services secret key
  • db_name: The name of your database

When done, select the Advanced tab.


Configure Advanced Tab

With the Advanced tab selected, expand the Other section.


In the Engine Parameters section, customize the following parameters using the following syntax:

  "connect_args": {
    "aurora_cluster_arn": "{cluster ARN}",
    "secret_arn": "{secret ARN}",
    "region_name": "us-east-2"
  • aurora_cluster_arn: The Amazon Resource Name that identifies the cluster.
  • secret_arn: The Amazon Resource Name for an encryption key (i.e., an AWS KMS key that Secrets Manager uses to encrypt and decrypt the secret value).
  • region_name: The region that you are deployed in.


When done, return to the previous screen by selecting the Basic tab.


Test and Connect

To test your connection, select Test Connection. If successful, a notification message appears:


After a successful test, go ahead and select Connect to finalize the connection.


Congratulations, your Aurora PostgreSQL database is now connected to Preset!

Was this article helpful?

What's Next