Currently working on migrating from Azure to AWS. I've got everything setup and running (Elastic Beanstalk with Classic Load Balancer, SSL via Certificate Manager, and subdomain via Route 53), however I can currently only deploy, using AWS Toolkit for Visual Studio, when I select Debug as Project Build Configuration. If I choose Release (which I've renamed Production) it builds successfully, but fails to deploy.
I get the following error:
....packaging - project build completed successfully.
....packaging - CreateProviderList: build error: 'E:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Web\Deploy\Microsoft.Web.Publishing.MSDeploy.Common.targets' at (55,5): Web deployment task failed. (A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified))
....packaging - project build completed with errors.
..build of project archive failed, abandoning deployment
Not sure what exactly is going wrong, it mentions SQL error and the only things I have are my entity and other connection string to RDS in web.config. If it would help for me to provide my web config, I can add a redacted version here upon request.
The MS SQL RDS instance is not part of Elastic Beanstalk. It's in a VPC and the proper security has been configured. As I said, it connects and works just fine when building and deploying Debug build, it just won't work when creating Release build.
Figured it out. I had somehow added entries under Package/Publish SQL for the Release build. I removed that and it deployed and works without issue. (To find, right click on project->properties->Package/Publish SQL).