This article we are going to help you use the AWS Command Line Interface (CLI) installation & configuration to access Amazon S3
- Set up and Configure Pip & Python
- Install awscli using pip
- Set up and configure aws cli tool
- Check and Verify
- AWS console configuration
Install python-pip:
apt-get update
Then let’s install python-pip and any required packages:
apt-get -y install python-pip
OR
We can use curl and python to download and install Pip.
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
pip -V
Install AWS CLI using pip :
pip install awscli
AWS Console Configuration :
Before start to use AWS CLI we need to create user with right permissions. So I created a new user “swtestacademy”
Click on Users on the left side.
Click the Create New Users button.
Click the Download Credentials button and save the credentials.csv file
Click on the Permissions tab and then click on the Attach Policy button.
Open terminal :
aws configure
The AWS CLI will prompt you for four pieces of information. AWS Access Key ID and AWS Secret Access Key are your account credentials
AWS CLI stores credentials specified with aws configure in a local file named credentials in a folder named .aws in your home directory and installation can be verified using below command.
ls ~/.aws
aws help
Now I can create s3 bucket – to create a new bucket named my-first-backup1
aws s3 mb s3://my-first-backup1
AWS-CLI can list s3 buckets which I created before
aws s3 ls
AWS regions & endpoints information
aws ec2 describe-regions
[fusion_builder_container hundred_percent=”yes” overflow=”visible”][fusion_builder_row][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”]

Terminate your instance:
aws ec2 terminate-instances --instance-ids i-636de6ff
for more information about aws-cli visit
Hope you find helpful.
Onur Yazir

Onur YAZIR is a Senior Software Testing & DevOps Engineer 10+ years of experience. He has worked Huawei, Ericsson, Vodafone, Several FinTech companies, Gulf News, and Emirates Airlines. You can find detailed information about him on his linked-in page.