Skip to content

Instantly share code, notes, and snippets.

@cdimascio
Last active April 16, 2021 00:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdimascio/33506169ce1df3f9ac1332050fea7db8 to your computer and use it in GitHub Desktop.
Save cdimascio/33506169ce1df3f9ac1332050fea7db8 to your computer and use it in GitHub Desktop.
ECS execute-command
# Execute onto container
aws ecs execute-command \
--region us-west-2 \
--cluster PeprServiceStackDev-EcsDefaultClusterMnL3mNNYNVpc18E0451A-dn35gqXUjrhi \
--task e575d819e2e04dac99387d22a5219576 \
--command /bin/bash --interactive
# Run task with execute enable
aws ecs run-task \
--cluster PeprServiceStackDev-EcsDefaultClusterMnL3mNNYNVpc18E0451A-dn35gqXUjrhi \
--task-definition flags \
--network-configuration awsvpcConfiguration="{subnets=[subnet-000e7f34bc0669e3f, subnet-023fb98b26c134cb8, subnet-051df8feac8231df7],securityGroups=[sg-0817dd11379898f28],assignPublicIp=ENABLED}" \
--enable-execute-command \
--launch-type FARGATE \
--platform-version '1.4.0' \
--region us-west-2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment