Error creating RDS cluster: InvalidDBClusterStateFault ... doesn't have binlogs enabled.
A customer asked: > I'm trying to create a cross regional Aurora Postgresql replica cluster. I am using; https://github.com/gruntwork-io/terraform-aws-data-storage/tree/master/modules/aurora I am getting this error; ``` module.aurora_replica.aws_rds_cluster.cluster[0]: Creating... ╷ │ Error: error creating RDS cluster: InvalidDBClusterStateFault: Source cluster arn:aws:rds:us-east-2:XXXXXXXXXXXXXXX:cluster:XXXXXXXXXXXX doesn't have binlogs enabled. │ status code: 400, request id: e955f54b-7cdc-4fa9-b16e-15453a9e86be │ │ with module.aurora_replica.aws_rds_cluster.cluster[0], │ on .terraform/modules/aurora_replica/modules/aurora/main.tf line 56, in resource "aws_rds_cluster" "cluster": │ 56: resource "aws_rds_cluster" "cluster" { │ ``` As far as I know, there is no such thing as binlogs in Postgresql? I have also tried converting the master postgresql cluster from a regional to a global via the console and then tried again. Same error. Anybody been able to add an Aurora Postgresql cross regional replica cluster?
From the official AWS docs https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Replication.html: > Aurora PostgreSQL DB clusters don’t support Aurora Replicas in different AWS Regions. That means you can’t use Aurora Replicas for cross-Region replication. However, you can scale reads and achieve high availability for an Aurora PostgreSQL DB cluster by using the Aurora global database feature. Aurora global databases have a single read/write primary DB cluster in one AWS Region and up to five read-only secondary DB clusters in different Regions. For more information, see [Using Amazon Aurora global databases](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html). Note that setting up a global replica requires some additional configuration. Refer to the aurora-global-cluster for more info: https://github.com/gruntwork-io/terraform-aws-data-storage/blob/master/examples/aurora-global-cluster/main.tf I also recall migrating a regional replica to global has a few additional steps: you need to make sure the terraform config has global aurora clusters enabled, and then you need to import the relevant resources to avoid terraform creating new ones. This is because a global aurora cluster has different terraform resources to manage the overarching cluster. So while you can migrate the AWS state from regional to global, you will then need to make sure the terraform state is updated accordingly in order for everything to work.