How to Setup AWS Credentials using AWS Command Line Interface?

Setup AWS Credentails using AWS Command Line Interface
Install the AWS CLI Using Pip
Please click here complete installation guide.
Test the AWS CLI Installation
[code] $ aws help[/code]
Environment Variables –
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
Step 5: Get a key aws_access_key_id, aws_secret_access_key, region from AWS website, under your
[code]$ aws configure[/code]
Step 6: Setup AWS with key
[code]$ aws configure
AWS Access Key ID [None]: AKIAJB6WCXXXXRKRT5SQ
AWS Secret Access Key [None]: fDBVPhlHzMk70ip5FGHDl/AcmEyMnylwOllc+n4s
Default region name [None]: us-east-1
Default output format [None]:
$ aws s3 list[/code]
Step 7: Verify details in ~/.aws/credentials and ~/.aws/config
[code]$ more ~/.aws/credentials
[default]
aws_access_key_id = AKIAJB6WCXXXXRKRT5SQ
aws_secret_access_key = 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
$ more ~/.aws/config
[default]
region = us-east-1[/code]
Step 8: Verify AWS CLI setup
[code]$ aws ec2 describe-instances –output table –region us-west-2[/code]
The AWS credentials file –
Located at ~/.aws/credentials on Linux, OS X, or Unix, or at C:\Users\USERNAME \.aws\credentials on Windows. This file can contain multiple named profiles in addition to a default profile.
The CLI configuration file –
Typically located at ~/.aws/config on Linux, OS X, or Unix, or at C:\Users\USERNAME \.aws\config on Windows. This file can contain a default profile, named profiles, and CLI specific configuration parameters for each.
Reference
http://docs.aws.amazon.com/cli/latest/userguide/installing.html
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow , and SEO strategies at Wizbrand.
Do you want to learn Quantum Computing?
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at WIZBRAND
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals