AWS Web Server Failed to Connect Database

The solution was to run

setsebool -P httpd_can_network_connect=1