/
AWS: aws cli

AWS: aws cli

1- download the awscli 

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


aws  --version




3- aws configure ( add credential and default zone )

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



Related content

1b- AWS AMI or Amazon Machine Image
1b- AWS AMI or Amazon Machine Image
More like this
aws cli using --filter #grep
aws cli using --filter #grep
More like this
aws cli using --queries
aws cli using --queries
More like this
AWS AMI information
AWS AMI information
More like this
get instance id and reboot instance
get instance id and reboot instance
More like this
order in mode and depends_on
order in mode and depends_on
More like this