Aurora MySQL regional cluster: cannot enable LocalWriteForwardingStatus

0

The console configuration shows "Local read replica write forwarding" as enabled. However, the aws rds CLI shows

aws rds describe-db-clusters --query '*[].{DBClusterIdentifier:DBClusterIdentifier,LocalWriteForwardingStatus:LocalWriteForwardingStatus}'

shows

{
        "DBClusterIdentifier": "xxxx-enc-cluster",
        "LocalWriteForwardingStatus": null
    }

And writing to the reader node just yields "1290 The MySQL server is running with the --read-only option so it cannot execute this statement". Rebooting the reader node had no effect.

1 Answer
0

Hello.

Did you set "aurora_replica_read_consistency" in the parameter group as described in the document below?
I think you can use it by changing "aurora_replica_read_consistency" to "SESSION" etc.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-mysql-write-forwarding.html#aurora-mysql-write-forwarding-consistency

Always set the aurora_replica_read_consistency DB parameter or DB cluster parameter when you want to forward writes. If you don't, then Aurora doesn't forward writes. This parameter has an empty value by default, so choose a specific value when you use this parameter. The aurora_replica_read_consistency parameter only affects DB clusters or instances that have write forwarding enabled.

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • Thank you for the quick response! I'm using the alternative option on that page: "You can also use aurora_replica_read_consistency as a session variable, for example ...". However, it isn't obvious which RDS endpoint I should be using for both the session variable and directing the queries (the writer xxxx-enc-cluster.cluster-cjx.us-east-1.rds.amazonaws.com or the reader xxxx-enc-cluster.cluster-ro-cj5x.us-east-1.rds.amazonaws.com). I'm currently using the reader for the session variable and the usual SELECT to reader, INSERT to writer since directing writes to the reader endpoint does not work.

  • Why not try re-enabling it using the AWS CLI's "modify-db-cluster" command? You can enable it by specifying the option "--enable-local-write-forwarding". It's strange that "LocalWriteForwardingStatus" is Null, so I think it probably wasn't enabled properly. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/modify-db-cluster.html

  • Turns out that version 2.11 of aws-cli provides the wrong answer ("null"). Upgrading to aws-cli 2.17 shows "enabled."