AWSCLI


The AWS Command Line Interface (AWS CLI) is an open source tool that enables you to interact with AWS services using commands in your command-line shell.

AWS CLI using PowerShell

Install-Module -Name AWSPowerShell

Import-Module AWSPowerShell

Get-Command -Module AWSPowerShell

Get-AWSCredential -ListProfileDetail

New-AWSCredential -AccessKey xxxx -SecretKey yyyy -ProfileName aws-acct-prod

Set-AWSCredential -StoreAs aws-acct-prod -AccessKey '' -SecretKey ''  -ProfileLocation C:\Users\UserName\.aws\credentials

AWS CLI using Python

pip install awscli

AWS CLI using Linux install tools

apt-get install awscli

yum install awscli

AWS CLI stores credentials that you specify with aws configure in a local file named credentials in a folder named .aws in the home directory.

aws configure

$ls ~/.aws

C:\> dir "%UserProfle%\.aws"

aws configure command creates 2 files one is a credentials file and the other is a config file

The file is located at ~/.aws/credentials on Linux or macOS, or at C:.awson Windows

The file is located at ~/.aws/config on Linux or macOS, or at C:.awson Windows.

We can specify a profile is no profile is specified then it is stored under the default profile, in the below example we specify a produser profile

aws configure --profile produser

These writings represent my own personal views alone.
Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.