AWS CLI Installation and Configuration
Table of contents
The AWS CLI is needed to interact with AWS services from your terminal. Here’s how to install it:
Download AWS CLI:
Visit the Install or update to the latest version of the AWS CLI - AWS Command Line Interface (amazon.com)
Download the Windows installer (
.msi
file) as shown below.Run the installer and follow the on-screen instructions.
After installation, open a new Command Prompt and type
aws --version
to check if AWS CLI is installed.
Installing in Linux environment
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Configure AWS CLI
Run
aws configure
in the Command Prompt.Enter your AWS credentials (Access Key ID and Secret Access Key), along with the default region (e.g.,
us-east-1
).aws configure AWS Access Key ID [None]: YOUR_ACCESS_KEY AWS Secret Access Key [None]: YOUR_SECRET_KEY Default region name [None]: us-east-1 Default output format [None]: json
For Access key and secret key ,
Navigate to the IAM (Identity and Access Management) Dashboard.
Create a New IAM User (if needed).
Attach Permissions.
In the next step, you will need to attach permissions to the new user. Choose one of the following options:
Select Attach policies directly and choose AmazonS3FullAccess (for S3 access) and any other required policies.
Alternatively, select AdministratorAccess if you want the user to have full AWS account permissions.
Get the Access Key and Secret Key under security credentials.
-
Important: Save these keys! You will only be shown the Secret Access Key once, so copy and store them in a secure place.
You can also download the credentials as a
.csv
file by clicking the Download .csv button. Enter the following details when prompted:
AWS Access Key ID: Your Access Key ID from the IAM Dashboard.
AWS Secret Access Key: Your Secret Access Key from the IAM Dashboard.
Default region name: e.g.,
us-east-1
(or whichever region you prefer).Default output format: You can choose
json
,text
, ortable
(default isjson
).AWS Configuration is done. 💁♀️
Subscribe to my newsletter
Read articles from Aasifa Shaik directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Aasifa Shaik
Aasifa Shaik
I am a DevSecOps Engineer at Renesas, where I specialize in integrating security practices within the DevOps pipeline. My work focuses on automating security, ensuring compliance, and securing applications throughout their lifecycle.