IAM Programmatic access and AWS CLI

2 min read

IAM Programmatic access

Programmatic access allows you to invoke actions on your AWS resources through an application you write in any language.

AWS CLI

The AWS Command Line Interface (AWS CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.

The AWS CLI v2 offers several new features including improved installers, new configuration options such as AWS IAM Identity Center (successor to AWS SSO), and various interactive features.

Task-01

  • Create AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from AWS Console.
  1. Login to your AWS console.

  2. Search for IAM

  3. Click on manage access keys on IAM Dashboard

  4. Click on Create Secret Access Key.

  5. Done!!. Make sure to save the access key and secret access key in a safe place. It will be needed to configure the AWS CLI

Task-02

  • Setup and install AWS CLI and configure your account credentials
  1. Go to the official documentation of the AWS CLI installation

    https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

  2. Click on OS type(in my case it's Linux)

  3. Run command in terminal

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

  4. run aws configure command and add an access key and secret access key. run aws iam list-users to see the list of users.

Happy Learning :)