Skip to content

A Duh moment with DNS

  • by

So recently Amazon told me our database server version is deprecated and we’ll soon need to upgrade. No problem, spin up a test server from a snapshot, test and when happy rename the test database server to the live name, right?

No. Amazon do not let you restore a snapshot into an existing instance, and they do not let you rename one instance to another.

Enter Google > stack overflow thread.

Not the suggested answer, which was basically tough luck, change the database connection path everywhere it appears. No, in the tiny comments around it was the true gem – replace the database path everywhere it appears with a DNS CNAME lookup. So simple it never occurred to me πŸ˜›