Amazon CLI for ECS Notes - tooltwist/documentation GitHub Wiki
Beware of old documentation
The ecs-cli commands are now obsolete - use the ecs commands within the regular aws CLI.
Getting started
See http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html
Useful commands
Installing the AWS CLI:
$ sudo pip install awscli
If you get an error message about uninstalling a package named 'six', you can probably ignore it.
Enter your credentials:
$ aws configure
AWS Access Key ID [****************5EPQ]: xxxxxxxxxxxxxxxx5EPQ
AWS Secret Access Key [****************tqPc]: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxtqPc
Default region name [us-west-1]: ap-southeast-1
Default output format [None]: json
CLI Reference:
http://docs.aws.amazon.com/cli/latest/reference/ecs/index.html
Clusters
$ aws ecs list-clusters
Tasks
List running tasks:
$ aws ecs list-tasks --cluster dc-practise
Register a task:
$ aws ecs register-task-definition --cli-input-json file://`pwd`/t1.json ; echo $?
Latest version:
$ aws ecs list-task-definitions | grep mininal-junk | tail +1