How to get environment variables in ECS container?
11,473
Environment variables are defined inside the container and some are passed in the task definition. So you can use describe-task-definition to see the extra variables.
To get the default environment of the container image, you can register-task-definition for task with command 'env' and the specific container image for which you want to find out and then run-task this task.
Related videos on Youtube
Author by
Alex
Updated on September 18, 2022Comments
-
Alex over 1 year
What AWS CLI command should I be using to access the environment variables in an AWS ECS cluster's task's container?
I've seen
describe-cluster
,list-tasks
,describe-tasks
,describe-container-instances
, etc... I can't seem to find one that lets me look at environment variables.Is this doable via the AWS CLI?