It seems that my database instance had a failover in the middle of the night and changed IP address. My webserver connects to it remotely. The IP address, which is found from Amazons DNS service that contains its internal IP, doesn't seem to have updated with that new address. However if I connect from my local machine the correct IP is returned and I can connect and also if I use that IP from my webserver rather than the host name it also connects okay.
How can I get Amazon's DNS to return the correct external IP to my webserver?