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 oncreate 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]
andAWS 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! :)