Skip to main content

Command Palette

Search for a command to run...

Installing and Configuring AWS CLI

Updated
2 min read
Installing and Configuring AWS CLI
S

As a DevOps Engineer, I thrive in the cloud and command a vast arsenal of tools and technologies: ☁️ AWS and Azure Cloud: Where the sky is the limit, I ensure applications soar. 🔨 DevOps Toolbelt: Git, GitHub, GitLab – I master them all for smooth development workflows. 🧱 Infrastructure as Code: Terraform and Ansible sculpt infrastructure like a masterpiece. 🐳 Containerization: With Docker, I package applications for effortless deployment. 🚀 Orchestration: Kubernetes conducts my application symphonies. 🌐 Web Servers: Nginx and Apache, my trusted gatekeepers of the web.

Introduction

The AWS CLI (Command Line Interface) empowers users to interact with AWS services directly from their terminal or command prompt. This article provides a detailed guide on how to install and configure the AWS CLI on various operating systems.

Installing the AWS CLI

1. Prerequisites

Ensure the following prerequisites are met before starting the installation process:

  • An AWS account: Access to AWS services is required.

  • Administrative access: Ensure administrative access to the local machine for software installation.

2. Installation Steps

Follow these steps to install the AWS CLI on different platforms:

For Windows:

  • Download the AWS CLI installer for Windows from the official AWS documentation.

  • Execute the installer and follow the on-screen instructions.

  • After installation, open Command Prompt or PowerShell and verify the installation by running:

      aws --version
    

For macOS:

  • Utilize Homebrew to install the AWS CLI by executing the following command in Terminal:

      brew install awscli
    
  • Verify the installation by running:

      aws --version
    

For Linux:

  • Use the package manager specific to your Linux distribution or the bundled installer to install the AWS CLI.

  • After installation, verify by running:

      aws --version
    

Configuring the AWS CLI

1. Access Key ID and Secret Access Key

Obtain your AWS access key ID and secret access key from the AWS Management Console:

  • Sign in to the AWS Management Console.

  • Navigate to IAM > Users > Your User > Security credentials.

  • Create a new access key if not already available.

2. Configuration Steps

Configure the AWS CLI by following these steps:

  • Open a terminal or command prompt.

  • Run the following command:

      aws configure
    
  • Provide your AWS access key ID and secret access key when prompted.

  • Specify the default region and output format.

  • After configuration, credentials are stored in ~/.aws/credentials, and configuration settings in ~/.aws/config.

3. Verification

To verify the AWS CLI configuration, execute the following command:

aws sts get-caller-identity

This command should return information about your AWS account, confirming correct configuration.

Conclusion

With the completion of these steps, the AWS CLI is successfully installed and configured on your local machine. You are now equipped to interact with AWS services directly from the command line, streamlining your AWS management tasks.

More from this blog

devopsvoyager

415 posts