Skip to main content

Command Palette

Search for a command to run...

Day 42: IAM Programmatic access and AWS CLI 🚀 ☁

Updated
2 min read

Let's get started with two important tasks: creating AWS access keys and setting up the AWS CLI.

Task 1: Create AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY

To begin, we need to generate the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, which will serve as your credentials for programmatic access to AWS services. Follow these steps:

  1. Login to the AWS Management Console.

  2. Navigate to the IAM service.

  3. Click on "Users" and select the user for whom you want to create the access keys.

  4. Go to the "Security credentials" tab.

  5. Scroll down to the "Access keys" section and click on "Create access key".

    Select Command Line Interface(CLI) the click Next

  1. Take note of the generated access key ID and secret access key. These will be used in the next task.

Task 2: Setup and Install AWS CLI

The AWS CLI provides a powerful command-line interface for managing AWS resources and automating tasks. Let's set it up:

  1. Install the AWS CLI on your local machine by following the installation instructions for your operating system. You can find the installation guide in the AWS CLI User Guide.

  2. Open a terminal or command prompt and run the command "aws configure" to configure your AWS account credentials.

  3. Enter the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY obtained from Task 1 when prompted.

  4. Provide a default region for your AWS CLI operations. You can choose the region that aligns with your use case.

  5. Optionally, specify an output format for the CLI responses. The default is JSON.

Once you have successfully set up the AWS CLI, get ready to tap into its full potential! With the CLI, you can now easily interact with AWS services, efficiently manage your resources, and automate tasks right from the command line.

That was it for today. If you have any queries/suggestion please comment below. See you another day with another challenge.

More from this blog

Ajay Patel

116 posts

Day 42: IAM Programmatic access and AWS CLI 🚀 ☁