Skip to main content

Command Palette

Search for a command to run...

IAM Programmatic access and AWS CLI

Published
โ€ข3 min read
IAM Programmatic access and AWS CLI
U

๐Ÿš€ Hi everyone! I'm Utkarsh Gupta, IAM Consultant. I am very passionate for all things DevOps. Right now, I'm learning and working on some cool projects and I can't wait to share what I'm learning with you all!

๐Ÿ› ๏ธ Here's what's in my toolbox:

Linux Docker Kubernetes Jenkins AWS Python Prometheus Grafana Ansible Terraform

Join me as we explore AWS DevOps together. Let's learn and grow together in this ever-changing field!

๐Ÿค Feel free to connect with me for: Sharing experiences Friendly chats Learning together

Follow my journey on Hashnode and LinkedIn for daily updates. Let's dive into the world of DevOps together! ๐Ÿš€

#DevOps #AWS #DevOpsJourney #90DaysOfDevOps

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 1: Create AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from AWS Console

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

Create AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from AWS Console.

Go to AWS Management console and search for IAM and click on it

  • Click on Users in IAM resource and click on Create user.

  • Specify your User name and click on Next.

    • Now Set permission page will open in that select Attach policies directly and select Administrator Access and scroll down and click on Next.

      • Now Review and create page will open keep it default and click on Create user.

        • Now click on you User name and got Security credentials there you will see Access keys in that click on create access key

          Now Access key best practices & alternatives page will open in that Click on Command Line Interface (CLI) and select Confirmation and click on Next.

  • Now Set description tag - optional page will open keep it as default and click on Create access key and click on Download .csv file or Copy your Access key and Secret access key separately in notepad.

Setup and install AWS CLI and configure your account credentials

  • Open your system terminal and update and upgrade them using this commands.

  • sudo apt-get update && sudo apt-get upgrade -y

    To install the AWS CLI, run the following commands.

  • $ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

  • unzip awscliv2.zip

  • sudo ./aws/install

  • or

  • sudo ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update

  • Check the version of your AWS CLI

    aws --version

    To Setup your AWS CLI execute this command given below after that it will ask AWS Access Key ID [None] and AWS Security access key there you have to past your Access and Security key which you have downloaded or Copied and click on Enter 2times.

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

Happy Learning

Thanks For Reading! :)

More from this blog

Utkarsh Gupta's blog

27 posts