Installing and setting up AWS CLI on macOS

Installing and setting up AWS CLI on macOS




Introduction

The AWS Command Line Interface (AWS CLI) is a uniform platform for managing your AWS resources. With just one tool to download and configure, you can control and automate various AWS services from the command line using scripts.



Prerequisite



Installing AWS CLI

Run this command to install AWS CLI on your local machine.

curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg”
Enter fullscreen mode

Exit fullscreen mode

sudo installer -pkg AWSCLIV2.pkg -target /
Enter fullscreen mode

Exit fullscreen mode



Verification

To verify that the shell can find and run the AWS command in your $PATH, use the following commands.

which aws
Enter fullscreen mode

Exit fullscreen mode

You will get the output: /usr/local/bin/aws



Setup locally

Run this command to quickly set and view your credentials, Region, and output format. The following example shows sample values.

aws configure
Enter fullscreen mode

Exit fullscreen mode

Note: Make sure to download your account credentials and input them after running this command.

This output will look like this if you successfully configure the CLI.

AWS Access Key ID [None]: ***AIO***DN**7EX****

AWS Secret Access Key [None]: w***rXU***MI/****G/**MP***Y

Default region name [None]: us-****-2

Default output format [None]: json



Source link
lol

By stp2y

Leave a Reply

Your email address will not be published. Required fields are marked *

No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.