IAM Programmatic access and AWS CLI

IAM Programmatic access and AWS CLI

ยท

5 min read

Introduction

Welcome to Day42 of 90DaysofDevOps! Today, we're diving into two essential components of AWS: IAM Programmatic Access and AWS CLI. These tools empower users and applications to interact with AWS services efficiently. IAM Programmatic access allows for seamless interaction with AWS resources using APIs, SDKs, or command-line tools. On the other hand, the AWS CLI provides a robust command-line interface to manage resources, automate tasks, and integrate AWS services into scripts and workflows. Let's explore these powerful tools!

IAM Programmatic access

Programmatic access in AWS Identity and Access Management (IAM) allows users or applications to interact with AWS services using APIs, SDKs, or command-line tools. When you enable programmatic access for a user, it means that the user can perform actions on AWS resources using tools like AWS CLI, SDKs for various programming languages, or scripts.

Go through this video for more clarification:

AWS CLI

New feature: AWS CLI | Buddy: The DevOps Automation Platform

The AWS Command Line Interface (CLI) is a powerful tool that allows users to interact with various AWS services through a command-line interface. It provides a unified way to manage resources, automate tasks, and integrate AWS services into scripts and workflows. With support for multiple profiles, structured output formats, and role-based access control, the AWS CLI offers flexibility and efficiency for developers, sysadmins, and DevOps professionals. Additionally, it seamlessly integrates with a wide range of AWS services, making it an essential tool in cloud computing environments.

Tasks:)

Task 1: Create AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from AWS Console.

  1. Log in to AWS Console:

  2. Navigate to IAM:

    • In the AWS Management Console, search for and select "IAM" to open the IAM dashboard.

  3. Access Users:

    • In the left-hand menu, click on "Users" to view the list of IAM users in your account.

  4. Select User:

    • Select the IAM user for whom you want to create access keys by clicking on their username.

  5. Access Security Credentials:

    • Go to the "Security credentials" tab. Here, you can manage the security credentials for the selected user.

  6. Create Access Key:

    • In the "Access keys" section, click on the "Create access key" button.

    • Choose the CLI option or as per your requirement

    • Now click next then the name or description

    • Now click create the access key

  7. View Access Key Details:

    • Once you click, a pop-up window will appear displaying the newly created access key details.

  8. Download Credentials:

    • Click on the "Download .csv file" button to download the access key details. This CSV file contains the access key ID and secret access key.

Task 2: Setup and install AWS CLI and configure your account credentials

Here are the steps to set up and install AWS CLI (Command Line Interface) and configure your account credentials:

  1. Download and Install AWS CLI:

    • Visit the AWS CLI official website: AWS CLI Official Website

    • Follow the installation instructions provided for your operating system (Windows, macOS, or Linux).

    • Or for linux paste these command to your terminal

         sudo apt-get update
         sudo apt-get install awscli -y
      

  2. Verify AWS CLI Installation:

    • Open a command prompt or terminal window.

    • Type aws --version and press Enter.

        aws --version
      
    • You should see the installed AWS CLI version if the installation was successful.

  3. Configure AWS CLI:

    • In the command prompt or terminal, type aws configure and press Enter.

        aws configure
      
  4. Enter AWS Access Key ID and Secret Access Key:

    • You will be prompted to enter your AWS Access Key ID and Secret Access Key.

    • These are the credentials you obtained in Task 1.

    • You'll also be asked for your default region and output format. You can leave the output format as JSON.

  5. Verify Configuration:

    • Once you've entered your credentials and region, AWS CLI is configured on your system.
  6. Verify Configuration:

    • You can verify the configuration by running the command aws configure list.

Conclusion

In today's journey, we've delved into the crucial realms of IAM Programmatic Access and AWS CLI. By enabling programmatic access, users gain the ability to interact with AWS services effortlessly. The AWS CLI, a versatile command-line tool, offers a unified approach to manage resources and automate tasks. With support for profiles, structured output formats, and role-based access, it's an indispensable asset for developers, sysadmins, and DevOps professionals. By integrating seamlessly with various AWS services, it proves invaluable in cloud computing environments. Keep exploring, and stay tuned for more DevOps insights!


Thank you for diving into this blog with me! I trust you found the information both helpful and enlightening. To stay updated on the latest in DevOps ๐Ÿš€, make sure to follow me. Remember, staying informed means staying ahead in the dynamic world of DevOps!

Feel free to connect with me on:

LinkedIn

Twitter

GitHub

For more updates and engaging discussions on DevOps, let's connect! ๐Ÿš€ #DevOpsCommunity

Happy Learning! Keep pushing those boundaries! ๐Ÿ˜Š

ย