I am using Amazon Aurora and I have 2 database server by default: The Reader instance and the Writer instance.
My application is connecting to the primary connection endpoint
sample.cluster-sample.us-west-2.rds.amazonaws.com
However, my application can't write data into the database suddenly and I found the replica (sample-instance-r1) has become Writer instance.
My application is programmed using Node.js with mysql plugin and using connection pool. How can I avoid amazon RDS switch the Writer instance and thus not able to write data?