title: How to connect AWS ECS Service to database in EC2 instance?
body: <p>I have a SQL Server database running on Windows Server EC2 instance. I also have Web API (ASP.NET Core WebAPI) deployed as a Service in ECS cluster (Fargate launch type).</p>
  
  <p>What connection string should I use to access this database from my web API?</p>
  
  <p>Right now I'm trying:</p>
  
  <blockquote>
    <p>data source=NAME_OF_THE_EC2_INSTANCE;initial
    catalog=DATABASE_NAME;User
    Id=USER_NAME;Password=PASSWORD;MultipleActiveResultSets=True;App=EntityFramework;Connection Timeout=10;</p>
  </blockquote>
  
  <p>But it doesn't work. The error returned suggests that the app doesn't even see the database at all. </p>