Why am I unable to create an Aurora read replica for my RDS for PostgreSQL instance?

3 minute read
1

I'm trying to create an Amazon Aurora read replica for my Amazon Relational Database Service (Amazon RDS) for PostgreSQL instance from the RDS console. However, the option to do so is greyed out in the Amazon RDS console.

Short description

You can use an Amazon RDS for PostgreSQL DB instance to create a new Amazon Aurora PostgreSQL-Compatible Edition DB cluster by using an Aurora read replica for the migration process. In this case, an Aurora cluster is created with a reader instance. This cluster, called the Replica cluster, acts as a read replica for the RDS for PostgreSQL instance. After creating the Replica cluster and migrating data to Aurora with a replication lag of zero, you can perform a cutover by promoting the Aurora read replica.

To create an Aurora read replica for the migration process, see Creating an Aurora read replica.

If the option to create an Aurora read replica using the Amazon RDS console isn't available, then be sure that your Aurora PostgreSQL version is compatible with the RDS for PostgreSQL version.

Resolution

The Aurora read replica option is available only for migrating within the same AWS Region and account. The option is available only if the Region offers a compatible version of Aurora PostgreSQL for your RDS for PostgreSQL DB instance. The Aurora PostgreSQL version must be the same as the RDS for PostgreSQL version or a higher minor version in the same major version family.

For example, to use this technique to migrate an RDS for PostgreSQL 11.14 DB instance, the Region must offer either of the following:

  • Aurora PostgreSQL version 11.14
  • A higher minor version in the PostgreSQL version 11 family

To see a list of available versions and the defaults for newly created DB instances, run the AWS Command Line Interface (AWS CLI) command describe-db-engine-versions:

aws rds describe-db-engine-versions --engine postgres --query DBEngineVersions[*].EngineVersion
aws rds describe-db-engine-versions --engine aurora-postgresql --query DBEngineVersions[*].EngineVersion

Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.

You can compare the results of both commands to check if the engine version of Aurora PostgreSQL is compatible with that of RDS for PostgreSQL.

Use the AWS CLI to create an Aurora read replica when the option to create a read replica with the RDS console isn't available to you.

To create an Aurora read replica from a source RDS for PostgreSQL DB instance using the AWS CLI, run the create-db-cluster command. Be sure to set the parameter replication-source-identifier to the ARN of the source instance. Running this command creates a headless Aurora DB cluster. A headless cluster is cluster storage without any instances.

After the cluster is created, use the create-db-instance command to create the primary instance for your DB cluster.

aws rds create-db-cluster --db-cluster-identifier example-aurora-cluster --db-subnet-group-name example-db-subnet --vpc-security-group-ids example-security-group --engine aurora-postgresql --engine-version <same-as-your-rds-instance-version> --replication-source-identifier example-rds-source-instance-arn 
aws rds create-db-instance --db-cluster-identifier example-aurora-cluster --db-instance-class example-instance-class --db-instance-identifier example-instance identifier --engine aurora-postgresql

Related information

Migrating data from an RDS for PostgreSQL DB instance to an Aurora PostgreSQL DB cluster using an Aurora read replica