4

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?

8

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.