Day 42: IAM Programmatic access and AWS CLI

Radheya Zunjur
3 min readAug 8, 2023

--

Welcome to the 42nd installment of our 90-day exploration into the dynamic realm of AWS. In this leg of our journey, we delve into the critical intersection of IAM programmatic access and the AWS Command Line Interface (CLI). With the rising demand for automation and streamlined cloud operations, mastering the art of IAM programmatic access and the AWS CLI is an essential skill for any cloud practitioner.. Today is more of a reading exercise and getting some programmatic access for your AWS account

What is IAM Programmatic access?

In order to access your AWS account from a terminal or system, you can use AWS Access keys and AWS Secret Access keys.

IAM programmatic access involves the use of access keys (Access Key ID and Secret Access Key) that are associated with an IAM user or role. These access keys are used to authenticate and authorize requests made to AWS services. When programmatic access is enabled for an IAM user or role, they can generate and use access keys to sign API requests, which are then sent to AWS services for processing.

What is 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.

Tasks -

Task 1) Create AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from AWS Console.

Open AWS console, Click on your profile name > Security Credential

Scroll down to Access Keys > Select Create Access Key

The Access key has been created. Download the .csv file to your desktop.

Task 2) Setup and install AWS CLI and configure your account credentials.

I’m using windows so to download AWS CLI on windows run in powershell

msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi

AWS CLI has been installed on your device.

Configure your account credentials by using:

aws configure

Give the Access Key ID, Secret Access Key that you’ve downloaded in .csv file and pass the region name and output format as given below.

You can check if the AWS CLI is working or not. To check the S3 bucket details:

aws s3 ls

--

--

Radheya Zunjur
Radheya Zunjur

Written by Radheya Zunjur

Database Engineer At Harbinger | DevOps | Cloud Ops | Technical Writer

No responses yet