title: Seeing differing docker container behavior on AWS ECS (Fargate) to local (.NET Core application)
body: <p>Update: The issue was nothing to do with running on ECS / docker / linux, rather .NET service validation where environment is &quot;Development&quot; where other test environments used another environment name. A useful article on this was:</p>
  <p><a href="https://andrewlock.net/new-in-asp-net-core-3-service-provider-validation/" rel="nofollow noreferrer">https://andrewlock.net/new-in-asp-net-core-3-service-provider-validation/</a></p>
  <hr />
  <p>On AWS ECS, I'm seeing stopped tasks, and failures in the logs that show that some DI registrations have failed for a .NET core app.</p>
  <p>While it is correct that the DI registration failures are missing, what is unexpected is that the application behaves differently under AWS ECS (Fargate). <strong>These issues DO NOT prevent the docker container (and application) starting up when running from the same image and environment variables locally</strong>. Also running the app from my IDE works fine. The missed DI registrations present themselves as runtime errors. I have confirmed that these runtime issues are not present when hitting the health check endpoint.</p>
  <p>Under ECS (Fargate) however, I see the following exception immediately after the service starts:</p>
  <pre><code>Unhandled exception. System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType:
  </code></pre>
  <p>I don't see what it could be about ECS that could cause the DI registrations to be verified immediately. Is there any known ECS behavior that I'm unaware of?</p>