AWS Elastic Beanstalk environment variables in ASP.NET Core 1.0
<p>How do I get environment variables from elastic beanstalk into an asp.net core mvc application? I have added a .ebextensions folder with app.config file in it with the following:</p>

<pre><code>option_settings:
- option_name: HelloWorld
  value: placeholder

- option_name: ASPNETCORE_ENVIRONMENT
  value: placeholder
</code></pre>

<p>The .ebextensions folder is included in the publish package.</p>

<p>On deployment, both the variables are visible in the aws elasticbeanstalk console at Configuration > Software Configuration > Environment Variables</p>

<p>However, when I try to read the variables in the application, none of the below options are working:</p>

<pre><code>Environment.GetEnvironmentVariable("HelloWorld") // In controller
Configuration["HelloWorld"] // In startup.cs
</code></pre>

<p>Any ideas on what I could be missing? Thanks.</p>