[ECS/Fargate] [request]: Support environment variables with blank values in S3 environment files
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
**Tell us about your request**
This request is similar to https://github.com/aws/amazon-ecs-cli/pull/167 for ECS/EC2, but for ECS/Fargate instead.
Currently for ECS/Fargate, if a container definition references an environment variable file stored in S3 that contains variables with blank values, those variables will not show up in the container. For example: let's say I create a file with variable `SOMETHING=`, and store it in S3. Next, I set my container definition to use this file inside my task definition, and create a task from the task definition. I'd expect`printenv` in the resulting task's container to display the variable `SOMETHING=`, but instead the variable isn't displayed at all.
I would like for containers to have these variables set regardless of their values.
**Which service(s) is this request for?**
ECS/Fargate
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
We're using a Docker image that runs an application expecting certain environment variables exist, even if they have a blank value. If environment variables with blank values are not set on the container, the application will fail to start.
**Are you currently working around this issue?**
By directly setting environment variables with blank values in the container definition instead of referencing an environment variable file that contains variables with blank values.
**Additional context**
None
**Attachments**
None
Contributor guide
Research direction
The issue describes ECS/Fargate tasks using S3 environment files and the missing behavior for blank-valued variables; no repository files, tests, or implementation entry point are provided. Reproduce the difference between an S3 file containing SOMETHING= and a direct container definition, and consider the work done when the resulting container exposes SOMETHING=.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100