Day 42: IAM Programmatic access and AWS CLI 🚀 ☁

Day 42: IAM Programmatic access and AWS CLI 🚀 ☁

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.

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.

Log in to your AWS Management Console.

Click on your username in the top right corner of the console and select "Security Credentials" from the drop-down menu.

Click on the "Access keys (access key ID and secret access key)" section.

Click on "Create Access Key."

Your access key ID and secret access key will be displayed. Make sure to download the CSV file with your access key information and store it in a secure location.

Task-02

Setup and install AWS CLI and configure your account credentials

Install the AWS CLI by following the instructions for your operating system: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html

Check aws-cli version

Once you have installed the AWS CLI, open a terminal or command prompt and run the following command to configure your account credentials:

You will be prompted to enter your AWS Access Key ID and Secret Access Key. Copy and paste access key and secret key from downloaded csv file. You will also be prompted to enter your default region and output format. Choose the region that is closest to your location and select a suitable output format.

Once you have entered your credentials and configured your default settings, you can test that the CLI is working by running the following command. This command should list the contents of your default S3 bucket.

You have now set up and installed the AWS CLI and configured your account credentials.

Thank you for reading!! I hope you find this article helpful!!

Happy Learning!!

Sayali✨

Did you find this article valuable?

Support Sayali Jadhav by becoming a sponsor. Any amount is appreciated!