I am new to AWS Aurora.
When reading this paragraph below in this link:
To increase availability, you can use Aurora Replicas as failover targets. That is, if the primary instance fails, an Aurora Replica is promoted to the primary instance
If the failed Primary Instance can recover, which role will it be? I guess it will become a Replica?
I ask this question because I guess the server code that is connecting the Aurora DB Cluster must specify Primary Instance's and Replica's endpoint? Since Replica only serves read-only query, the code must have the endpoints corrected after a Replica is promoted to Primary Instance in order to make write-operation query?
How does my code know which endpoint is now Primary Instance's (i.e. write-operation query can be made)?