1- download the awscliawscli
2- install aws-cli on
...
Ubuntu ( or upgrade: pip install --upgrade awscli )
3- aws configure ( add credential and default zone )
4- Installation for Windows ( https://awscli.amazonaws.com/AWSCLIV2.msi )
https://docs.aws.amazon.com/cli/latest/userguide/installing.html
2- install aws-cli on Ubuntu ( or upgrade: pip install --upgrade awscli )
# install python 2.7.15 ( to avoid SSL issue)
# add PATH c:\python27\scripts
pip install awscli --upgrade --user
...
c:\> aws configure
AWS Access Key ID [****************?????]:
AWS Secret Access Key [****************?????]:
Default region name [eu-west-2]: us-west-2
Default output format [text]: table
Filter the list of ami
aws ec2 describe-images \
--owners 'aws-marketplace' \
--filters 'Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce' \
--query 'sort_by(Images, &CreationDate)[-1].[ImageId]' \
Filter the list of instances
aws ec2 describe-instances