You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
We want to use environment variables inside of Windows containers for non-sensitive configuration values.
Passing a reference to an S3-hosted .env file is more convenient than specifying an array of "inline" environment variable objects. This is particularly the case when using CFN, where we try to reuse a single template to create many stacks, and therefore need to "parameterize" aspects that vary among stacks. There is no straightforward means of parameterizing an array of key/value pairs, as is required by the Environment property. Frankly, the EnvironmentFile property has the same issue (it's an array of key/value pairs), but we can get away with parameterizing a reference to a single S3 location, given that single location can contain all needed environment variables (see the example snippet below).
Are you currently working around this issue?
We're not yet using environment variables with Windows containers. If we must do so, we'll likely have to create service-specific CFN templates, rather than reusing a common CFN template.
Additional context
Though there are 2 existing issues about this (#1626 and #1627), discrepancies remain in the documentation.
Here is a CFN snippet we're using with Linux containers on Fargate, where a reference to an S3-hosted .env file is "parameterized".
Community Note
Tell us about your request
Support environment files for Windows containers on Fargate, as described in: Pass environment variables to an Amazon ECS container.
Which service(s) is this request for?
Fargate
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
We want to use environment variables inside of Windows containers for non-sensitive configuration values.
Passing a reference to an S3-hosted
.env
file is more convenient than specifying an array of "inline" environment variable objects. This is particularly the case when using CFN, where we try to reuse a single template to create many stacks, and therefore need to "parameterize" aspects that vary among stacks. There is no straightforward means of parameterizing an array of key/value pairs, as is required by the Environment property. Frankly, the EnvironmentFile property has the same issue (it's an array of key/value pairs), but we can get away with parameterizing a reference to a single S3 location, given that single location can contain all needed environment variables (see the example snippet below).Are you currently working around this issue?
We're not yet using environment variables with Windows containers. If we must do so, we'll likely have to create service-specific CFN templates, rather than reusing a common CFN template.
Additional context
Though there are 2 existing issues about this (#1626 and #1627), discrepancies remain in the documentation.
Here is a CFN snippet we're using with Linux containers on Fargate, where a reference to an S3-hosted
.env
file is "parameterized".The text was updated successfully, but these errors were encountered: