1. Prerequisites:

  • Have an AWS account.
  • Have permissions to create IAM (Identity and Access Management) users.
  • Python (AWS CLI v1 requires Python 2.6.5 or later. AWS CLI v2 is standalone and doesn’t rely on Python).

2. Installation:


curl "https://d1vvhvl2y92vvt.cloudfront.net/awscli-exe-macos.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install


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

3. Configuration:

  1. Set up IAM User:
    • Log in to the AWS Management Console.
    • Navigate to IAM.
    • Create a new user with programmatic access.
    • Attach necessary permissions (either directly or via groups).
    • Note down the Access Key ID and Secret Access Key generated.
  2. Configure AWS CLI:
aws configure
  1. You’ll be prompted to enter the following:
    • AWS Access Key ID: Enter the access key from the IAM user.
    • AWS Secret Access Key: Enter the secret key from the IAM user.
    • Default region name: Enter your preferred AWS region (e.g., us-west-2).
    • Default output format: Enter your preferred output format (e.g., json).

[Add Image]

4. Verification:

To ensure your AWS CLI is set up correctly, run:

aws sts get-caller-identity

Leave a Reply

Your email address will not be published. Required fields are marked *