AWS CLI install in Ubuntu 20.04

Introduction

A memo note of the steps to deploy the AWS CLI on Ubuntu 20.04.

EC2 preparation

Create Ubuntu 20.04 and connect with SSH

AWS CLI Install

Create working directory

mkdir ~/temp
cd ~/temp

AWS CLI Install

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

AWS CLI settings

Generate an Access Key ID and Secret Access Key in AWS IAM and configure them with the aws configure command

region : ap-northeast-1

aws configure

Fish completion settings

In my environment, I use fish instead of bash. Complete the fish CLI for AWS CLI

vim ~/.config/fish/completions/aws.fish

The contents of the file

complete -c aws -f -a '(
    begin
        set -lx COMP_SHELL fish
        set -lx COMP_LINE (commandline)
        aws_completer
    end
)'

Operation check

List of EC2

aws ec2 describe-instances --query "Reservations[].Instances[].Tags[?Key==`Name`].Value[]"

Execution example

> aws ec2 describe-instances --query "Reservations[].Instances[].Tags[?Key==`Name`].Value[]"
[
    "StepBox"
]

Reference URL

Document https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/install-cliv2-linux.html

Recommended Posts

AWS CLI install in Ubuntu 20.04
[CentOS7] Install aws cli
Install Oracle JDK 8 via PPA in AWS Ubuntu Server 16.04
Run AWS CLI commands in Ansible
Install AWS IoT Greengrass on Ubuntu
ubuntu (AWS) LEMP
Install the IBM Cloud CLI in the container
[CentOS7] Install aws cli regardless of python version
How to Install Oracle JDK 1.8 in Ubuntu 18.04 LTS?
Install pyqt5 on ubuntu
Install ROS Noetic ubuntu20.04
Install Ruby on Ubuntu 20.04
Install Gradle with ubuntu16.04
Install Autoware on Ubuntu 18.04.5
Install Homebrew on Ubuntu 20.04
Set JAVA_HOME for root user in AWS Ubuntu16.04 Server
Command memo to install xeyes in ubuntu docker environment
Install Rust in WSL2 Ubuntu environment and build WASM build environment
Install OpenJDK7 (JAVA) on ubuntu 14.04
Install Cybozu Office 10 on Ubuntu 20.4
Introducing AWS CLI to CentOS 7
Install yarn in docker image
Install CentOS Stream8 in VirtualBox
Install zabbix agent (5.0) on Ubuntu 18.04
Install MAV Proxy on Ubuntu 18.04
Install the plugin in Eclipse
Install docker and docker-compose on ubuntu in the shortest process
Install Arudino IDE on Ubuntu 20
Install Java on WSL Ubuntu 18.04
Install Ubuntu Desktop 20.10 on RaspberryPi4
Install Arduino IDE on Ubuntu 20.04
Install raspi-config on Ubuntu 20.04 (LTS)
Install docker on AWS EC2
Install WordPress 5.5 on Ubuntu 20.04 LTS
Install PlantUML on Intellij on Ubuntu
Install Ubuntu Server 20.04 on Btrfs
Note: Install PostgreSQL 9.5 on Ubuntu 18.04
Install tomcat plugin in eclipse
Ubuntu unable to log in
Install gem in Serverless Framework and AWS Lambda with Ruby environment
How to install the language used in Ubuntu and how to build the environment
Install Ubuntu Server 20.04 in VirtualBox on Mac and connect with SSH
[Virtualization] Install VMware and build Ubuntu (20.04)
Install Docker on AWS Ubunt 20.04 LTS
Install java with Ubuntu 16.04 based Docker
Exceptions encountered in the AWS SDK
Install JDK and JRE on Ubuntu 16.10
Install ngrok on ubuntu16.04 using Vagrant
Install CentOS Stream 8 in Hyper-V environment
Install a CA certificate in ColdFusion
Run the AWS CLI on Docker
How to install Bootstrap in Ruby
Install laravel/Dusk in docker environment (laravel6)
Deleting AWS S3 Objects in Java
Install Linux Mint 20 after Ubuntu 18.04 LTS
How to install WildFly on Ubuntu 18.04
Renamed folders in AWS S3 (Java)
Install MQTT broker Mosquitto on Ubuntu 18.04
Try running AWS X-Ray in Java
Install SonarQube on ECS instance on Ubuntu 16.04
Error summary in bundle install. memorandum