Amazon EC2 SQL Server Connection
- by cnxmax
I have two instances running on Amazon AWS EC2. One is running MSSQL Server 2005, the other is running a web application.
I CAN connect to the database in my app using a connection string that references the Public IP of my EC2 instance running SQL Server.
I CANNOT connect from the web app server if I change the connection string to reference the database servers Private IP Address. But I can connect if I run that same code on the database server itself.
I can remote desktop from the app server to the database server using the private IP.
I have a feeling there is something in my SQL Sever configuration that is preventing this remote connection. I have remote connections enabled, I have it set to listen on all IP addresses.
Any ideas?
Other things I've done:
- Added exceptions to Windows Firewall
- Tried connecting to using EC2 DNS Names