Skip to content

Latest commit

 

History

History
36 lines (31 loc) · 1007 Bytes

AWS cli.md

File metadata and controls

36 lines (31 loc) · 1007 Bytes

Installation aws cli

aws cli installation linux

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
  • setup autocomplete
sudo apt install -y bash-completion;
complete -C "$(command -v aws_completer)" aws; 
echo 'complete -C "$(command -v aws_completer)" aws' >> ~/.bashrc
aws configure; # start configuring access key, secret, region
  • output format to one of the following json, table, text, yaml
aws configure get output;
aws configure set output table;

[!INFO] AWS does not allow direct viewing of stored secrets for security reasons.

  • you can retrieve them if they are stored in AWS secret manager or your local AWS credentials file.
cat ~/.aws/credentials;
aws configure get aws_secret_access_key;

Query

aws ec2 descripbe-regions --query "Regions[].RegionName"