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
$ aws help
Environment Variables –
Step 5: Get a key aws_access_key_id, aws_secret_access_key, region from AWS website, under your
$ aws configure
Step 6: Setup AWS with key
$ 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
Step 7: Verify details in ~/.aws/credentials and ~/.aws/config
$ 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
Step 8: Verify AWS CLI setup
$ aws ec2 describe-instances --output table --region us-west-2
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.
- Use of runtime variables to save into another variable using register in Ansible - September 6, 2018
- Ansible & Ansible Tower Variable Precedence Hierarchy - September 6, 2018
- How to use template in Ansible? - September 6, 2018