Skip to content

Instantly share code, notes, and snippets.

@rilutham
Created June 8, 2020 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rilutham/d508d99b73a5b450723726699950ef48 to your computer and use it in GitHub Desktop.
Save rilutham/d508d99b73a5b450723726699950ef48 to your computer and use it in GitHub Desktop.
Export AWS ECS task definition environment key
  • Install jq
  • Run the following command
aws ecs describe-task-definition \
	--task-definition <task_arn> \
	--query "taskDefinition.containerDefinitions[0].environment[]" |
	jq -r '.[] | "-e \(.name)=\"\(.value)\" \\"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment