Menu
Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Preview - Amazon Aurora with PostgreSQL Compatibility

Amazon Relational Database Service (Amazon RDS) is previewing Aurora (PostgreSQL), Amazon Aurora with PostgreSQL compatibility. Aurora is a fully managed, PostgreSQL- and MySQL-compatible, relational database engine. It combines the speed and reliability of high-end commercial databases with the simplicity and cost-effectiveness of open-source databases. For a complete overview of Aurora, see Overview of Amazon Aurora.

Aurora (PostgreSQL) is a drop-in replacement for PostgreSQL. You can use the code, tools, and applications you use today with your existing PostgreSQL databases with Aurora (PostgreSQL).

To register for the Aurora (PostgreSQL), go to the preview signup link at https://pages.awscloud.com/amazon-aurora-with-postgresql-compatibility-preview-form.html. When you're registered, you have access to the sandboxed AWS region where you can create your preview Aurora (PostgreSQL) instance. There is no charge for your preview database instances or storage used by your preview databases during the preview period.

The preview of Aurora (PostgreSQL) have the following limitations:

  • There are no availability or uptime commitments during the preview program.

  • The preview is compatible with PostgreSQL 9.6.2.

  • The preview currently supports the following DB instance classes: db.r3.8xlarge, db.r4.4xlarge, db.r4.8xlarge, and db.r4.16xlarge.

  • You can create up to three instances per account.

  • Read nodes are now supported.

  • Two-phase commit is not yet supported.

  • All extensions that are currently supported for PostgreSQL 9.6.2 are supported in the preview, with no exceptions.

  • Compared with PostgreSQL using Amazon EBS volumes on Amazon EC2, your performance should range from one to two times as fast.

Several Amazon Aurora features are not currently supported during this preview but will be available when Aurora (PostgreSQL) is generally available. The features include:

  • "Survivable" cache warming

  • DB Snapshot import from an Amazon RDS for PostgreSQL DB instance

Creating an Aurora (PostgreSQL) DB Cluster

An Aurora (PostgreSQL) DB cluster is made up of instances that are compatible with PostgreSQL and a cluster volume that represents data copied across three Availability Zones as a single, virtual volume. There are two types of instances in a DB cluster: a primary instance and Aurora Replicas.

The primary instance performs all of the data modifications to the DB cluster and also supports read workloads. Each DB cluster has one primary instance. An Aurora Replica supports only read workloads. Each DB instance can have up to 15 Aurora Replicas. You can connect to any instance in the DB cluster using an endpoint address.

Following, you can learn how to create an Aurora (PostgreSQL) DB cluster and then add an Aurora Replica for that DB cluster. You must complete the tasks in the Setting Up for Amazon RDS section before you can create a DB cluster.

The instructions following describe how to create an Aurora (PostgreSQL) DB cluster using the AWS Management Console. For simple instructions on connecting to your Aurora DB cluster, see Connecting to an Amazon Aurora DB Cluster. For a detailed guide on connecting to an Aurora (PostgreSQL) DB cluster, see RDS Aurora Connectivity.

DB Cluster Prerequisites

The following are prerequisites to create a DB cluster.

VPC

An Aurora (PostgreSQL) DB cluster can only be created in an Amazon Virtual Private Cloud (Amazon VPC) with at least two subnets in at least two Availability Zones. By distributing your cluster instances across at least two Availability Zones, you ensure that there will be instances available in your DB cluster in the unlikely case of an Availability Zone failure. The cluster volume for your Aurora DB cluster will always span three Availability Zones to provide durable storage with less possibility of data loss.

If you are using the Amazon RDS console to create your Aurora (PostgreSQL) DB cluster, then you can have Amazon RDS automatically create a VPC for you. Alternatively, you can use an existing VPC or create a new VPC for your Aurora DB cluster. Your VPC must have at least two subnets for you to use it with an Aurora (PostgreSQL) DB cluster. For more information, see How to Create a VPC for Use with Amazon Aurora. For information on VPCs, see Amazon Virtual Private Cloud (VPCs) and Amazon RDS.

Note

You can communicate with an EC2 instance that is not in a VPC and an Amazon Aurora DB cluster using ClassicLink. For more information, see A DB Instance in a VPC Accessed by an EC2 Instance Not in a VPC.

If you don't have a default VPC or you haven't created a VPC, you can have Amazon RDS automatically create a VPC for you when you create an Aurora (PostgreSQL) DB cluster using the RDS console. Otherwise, you must do the following:

  • Create a VPC with at least two subnets in at least two Availability Zones.

  • Specify a VPC security group that authorizes connections to your Aurora DB cluster. For information, see Working with a DB Instance in a VPC.

  • Specify an RDS DB subnet group that defines at least two subnets in the VPC that can be used by the Aurora DB cluster. For information, see the Working with DB Subnet Groups section in Amazon Virtual Private Cloud (VPCs) and Amazon RDS.

Additional Prerequisites

  • If you are connecting to AWS using AWS Identity and Access Management (IAM) credentials, your IAM account must have IAM policies that grant the permissions required to perform Amazon RDS operations. For more information, see Authentication and Access Control for Amazon RDS.

    If you are using an IAM account to access the Amazon Aurora console, you must first sign in on to the AWS Management Console with your IAM account. Then you can go to the Amazon RDS console link that you were provided when you registered for the preview.

  • If you want to tailor the configuration parameters for your DB cluster, you must specify a DB parameter group with the required parameter settings. For information about creating or modifying a DB parameter group, see Working with DB Parameter Groups.

  • You must determine the TCP/IP port number you will specify for your DB cluster. The firewalls at some companies block connections to the default Aurora (PostgreSQL) port (5432). If your company firewall blocks the default port, choose another port for your DB cluster. All instances in a DB cluster use the same port.

Using the AWS Management Console to Launch an Aurora (PostgreSQL) DB Cluster and Create an Aurora Replica

Launching an Aurora DB Cluster

The following procedures describe how to use the AWS Management Console to launch an Aurora (PostgreSQL) DB cluster and how to create an Aurora Replica during the preview.

To launch an Aurora (PostgreSQL) DB cluster using the console

  1. Open the link to the Amazon RDS console that you were provided when you registered for the preview. Choose Get Started Now.

  2. In the top-right corner of the AWS Management Console, set the region to US East (N. Virginia).

  3. In the navigation pane, choose Instances.

  4. Choose Launch DB Instance to start the Launch DB Instance wizard. The wizard opens on the Select Engine page.

  5. On the Select Engine page, choose the Select for the Aurora (PostgreSQL) DB engine.

  6. On the Specify DB Details page, specify your DB cluster information. The following table shows settings for an Aurora (PostgreSQL) DB instance.

    For This Option Do this

    DB Instance Class

    Select a DB instance class that defines the processing and memory requirements for each instance in the DB cluster. For this preview, Amazon (PostgreSQL) supports the db.r4.4xlarge, db.r4.8xlarge, db.r4.16xlarge, and db.r3.8xlarge DB instance classes. For more information about DB instance class options, see DB Instance Class.

    Multi-AZ Deployment

    Determine if you want to create Aurora Replicas in other Availability Zones for failover support. If you select Create Replica in Different Zone, then Amazon RDS will create an Aurora Replica for you in a different Availability Zone than the primary instance for your DB cluster.

    For more information about multiple Availability Zones, see Regions and Availability Zones.

    DB Instance Identifier

    Type a name for the primary instance in your DB cluster. This identifier is used in the endpoint address for the primary instance of your DB cluster.

    The DB instance identifier has the following constraints:

    • It must contain from 1 to 63 alphanumeric characters or hyphens.

    • Its first character must be a letter.

    • It cannot end with a hyphen or contain two consecutive hyphens.

    • It must be unique for all DB instances for each AWS account in a region.

    Master Username

    Type a name using alphanumeric characters that you will use as the master user name to log on to your DB cluster.

    Master Password

    Type a password that contains from 8 to 41 printable ASCII characters (excluding /,", and @) for your master user password.

  7. Choose Next.

  8. On the Configure Advanced Settings page, you can customize additional settings for your Aurora (PostgreSQL) DB cluster. The following table shows the advanced settings for a DB cluster.

    For This Option Do This

    VPC

    Select the VPC that will host the DB cluster. Select Create a New VPC to have Amazon RDS create a VPC for you. For more information, see DB Cluster Prerequisites earlier in this topic.

    Subnet Group

    Select the DB subnet group to use for the DB cluster. Select Create a New DB Subnet Group to have Amazon RDS create a DB subnet group for you. For more information, see DB Cluster Prerequisites earlier in this topic.

    Publicly Accessible

    Select Yes to give the DB cluster a public IP address; otherwise, select No. The instances in your DB cluster can be a mix of both public and private DB instances. For more information about hiding instances from public access, see Hiding a DB Instance in a VPC from the Internet.

    Availability Zone

    Determine if you want to specify a particular Availability Zone. For more information about Availability Zones, see Regions and Availability Zones.

    VPC Security Group(s)

    Select one or more VPC security groups to secure network access to the DB cluster. Select Create a New VPC Security Group to have Amazon RDS create a VPC security group for you. For more information, see DB Cluster Prerequisites earlier in this topic.

    DB Cluster Identifier

    Type a name for your DB cluster that is unique for your account in the region you selected. This identifier is used in the cluster endpoint address for your DB cluster. For information on the cluster endpoint, see Aurora Endpoints.

    The DB cluster identifier has the following constraints:

    • It must contain from 1 to 63 alphanumeric characters or hyphens.

    • Its first character must be a letter.

    • It cannot end with a hyphen or contain two consecutive hyphens.

    • It must be unique for all DB clusters per AWS account, per region.

    Database Name

    Type a name for your default database of up to 8 alpha-numeric characters. If you don't provide a name, Amazon RDS will not create a database on the DB cluster you are creating.

    To create additional databases, connect to the DB cluster and use the SQL command CREATE DATABASE. For more information about connecting to the DB cluster, see Connecting to an Amazon Aurora DB Cluster.

    Database Port

    Specify the port that applications and utilities will use to access the database. Aurora (PostgreSQL) DB clusters default to the default PostgreSQL port, 5432. The firewalls at some companies block connections to the default PostgreSQL port. If your company firewall blocks the default port, choose another port for the new DB cluster.

    Parameter Group

    Select a parameter group. Aurora has a default parameter group you can use, or you can create your own parameter group. For more information about parameter groups, see Working with DB Parameter Groups.

    Option Group

    Select an option group. Aurora has a default option group you can use, or you can create your own option group. For more information about option groups, see Working with Option Groups.

    Enable Encryption

    Select No for this preview. For more information, see Encrypting Amazon RDS Resources.

    Priority

    Choose a failover priority for the instance. If you don't select a value, the default is tier-1. This priority determines the order in which Aurora Replicas are promoted when recovering from a primary instance failure. For more information, see Fault Tolerance for an Aurora DB Cluster.

    Backup Retention Period

    Select the length of time, from 1 to 35 days, that Aurora will retain backup copies of the database. Backup copies can be used for point-in-time restores (PITR) of your database down to the second.

    Enable Enhanced Monitoring

    Choose Yes to enable gathering metrics in real time for the operating system that your DB cluster runs on. For more information, see Enhanced Monitoring.

    Granularity

    Only available if Enable Enhanced Monitoring is set to Yes. Set the interval, in seconds, between when metrics are collected for your DB cluster.

    Auto Minor Version Upgrade

    Select No for this preview.

    Maintenance Window

    Select the weekly time range during which system maintenance can occur.

  9. Choose Launch DB Instance to launch your Aurora (PostgreSQL) DB instance, and then choose Close to close the wizard.

    On the Amazon RDS console, the new DB instance appears in the list of DB instances. The DB instance has a status of creating until the DB instance is created and ready for use. When the state changes to available, you can connect to the primary instance for your DB cluster. Depending on the DB instance class and store allocated, it can take several minutes for the new instance to be available.

    To view the newly created cluster, choose the Clusters view in the Amazon RDS console. For more information, see Viewing an Amazon Aurora DB Cluster.

    
                                    Amazon Aurora DB Instances List

    Note the port and the endpoint of the cluster. Use the endpoint and port of the cluster in your JDBC and ODBC connection strings for any application that performs write or read operations.

Creating an Aurora Replica Using the Console

After creating the primary instance for your Aurora DB cluster, you can add up to 15 Aurora Replicas by using the Create Aurora Replica wizard.

To create an Aurora Replica by using the AWS Management Console

This example creates an Aurora Replica in the US East (N. Virginia) region.

  1. Open the link to the Amazon RDS console that you were provided when you registered for the preview.

  2. In the left navigation pane, choose Instances.

  3. Select the check box to the left of the primary instance for your Aurora DB cluster.

  4. Choose Instance Actions, and then choose Create Aurora Replica.

  5. On the Create Aurora Replica page, specify options for your Aurora Replica. The following table shows settings for an Aurora Replica.

    For This Option Do This

    DB Instance Class

    Select a DB instance class that defines the processing and memory requirements for the Aurora Replica. For the preview, Aurora (PostgreSQL) supports the db.r4.4xlarge, db.r4.8xlarge, db.r4.16xlarge, and db.r3.8xlarge DB instance classes. For more information about DB instance class options, see DB Instance Class.

    Aurora Replica Source

    Select the identifier of the primary instance to create an Aurora Replica for it.

    DB Instance Identifier

    Type a name for the instance that is unique for your account in the region you selected. You might choose to add some intelligence to the name such as including the region and DB engine you selected, for example aurora-read-instance1.

    Publicly Accessible

    Select Yes to give the Aurora Replica a public IP address; otherwise, select No. For more information about hiding Aurora Replicas from public access, see Hiding a DB Instance in a VPC from the Internet.

    Availability Zone

    Determine if you want to specify a particular Availability Zone. The list includes only those Availability Zones that are mapped by the DB subnet group you specified earlier. For more information about Availability Zones, see Regions and Availability Zones.

    Priority

    Choose a failover priority for the instance. If you don't select a value, the default is tier-1. This priority determines the order in which Aurora Replicas are promoted when recovering from a primary instance failure. For more information, see Fault Tolerance for an Aurora DB Cluster.

    Database Port

    The port for an Aurora Replica is the same as the port for the DB cluster.

    Auto Minor Version Upgrade

    Select No for this preview.

  6. Choose Create Aurora Replica to create the Aurora Replica.

Note the endpoint of the Aurora Replica. Use the endpoint of the Aurora Replica in your JDBC and ODBC connection strings for any application that performs only read operations.

Connecting to an Amazon Aurora DB Cluster

You can connect to an Aurora DB instance using the same tools that you use to connect to a PostgreSQL database. As part of this, you use the same public key for Secure Sockets Layer (SSL) connections. You can use the endpoint and port information from the primary instance or Aurora Replicas in your Amazon Aurora DB cluster in the connection string of any script, utility, or application that connects to a PostgreSQL DB instance. In the connection string, specify the DNS address from the primary instance or Aurora Replica endpoint as the host parameter, and specify the port number from the endpoint as the port parameter.

Once you have a connection to your Amazon Aurora DB cluster, you can run any SQL command that is compatible with PostgreSQL version 9.6.2.

For a helpful and detailed guide on connecting to an Amazon Aurora DB cluster, see RDS Aurora Connectivity.

In the details view for your DB cluster you can find the cluster endpoint. You use this endpoint in your PostgreSQL connection string. The endpoint is made up of the domain name and port for your DB cluster. For example, if an endpoint value is mycluster.cluster-123456789012.us-east-1.rds.amazonaws.com:3306, then you specify the following values in a PostgreSQL connection string:

  • For host or host name, specify mycluster.cluster-123456789012.us-east-1.rds.amazonaws.com

  • For port, specify 5432 or the port value you used when you created the DB cluster.

The cluster endpoint connects you to the primary instance for the DB cluster. You can perform both read and write operations using the cluster endpoint. Your DB cluster can also have up to 15 Aurora Replicas that support read-only access to the data in your DB cluster. The primary instance and each Aurora Replica each has a unique endpoint that is independent of the cluster endpoint. This unique endpoint allows you to connect to a specific DB instance in the cluster directly. The cluster endpoint always points to the primary instance. If the primary instance fails and is replaced, the cluster endpoint points to the new primary instance.


                    Amazon Aurora Launch DB Instance Wizard Create Aurora Replica DB
                        Instance

Troubleshooting Aurora (PostgreSQL) Connection Failures

Note

For a helpful and detailed guide on connecting to an Amazon Aurora DB cluster, see RDS Aurora Connectivity.

Common causes of connection failures to a new Aurora DB cluster are as follows:

  • The DB cluster was created using a VPC that doesn't allow connections from your device. To fix this failure, modify the VPC to allow connections from your device, or create a new VPC for your DB cluster that allows connections from your device. For an example, see Create a VPC and Subnets.

  • The DB cluster was created using a port value that your company has firewall rules blocking connections to that port from devices in your company network. To fix this failure, recreate the instance with a different port.