About AWS CLI
- AWS CLI is a command line tool using which we can connect to AWS services.
- It has direct access to public APIs of AWS Services
- It is alternative of aws management console.
- It is opensource — https://github.com/aws/aws-cli
- AWS CLI needs Access Keys to connect with AWS resources
- Access Keys can be generated through management console — steps are mentioned in this article
Install AWS CLI
- Go to AWS CLI install page -
2. Select your operating system and follow instructions.
In my case I installed aws cli in macOS.
Use AWS CLI
- configure aws cli by using below command
aws configure
It will prompt for Access Key ID and Secret Access Key, provide those details and enter region name.
- if you don’t have access key id and secret key then follow steps mentioned in this article
Now CLI is configured to use.
2. Run your first command to list all iam users.
aws iam list-users
3. Explore other commands that can be used with mentioned in this reference list — https://docs.aws.amazon.com/cli/latest/reference/
4. Access Keys setup in AWS CLI can be seen using command
cat ~/.aws/credentials
In this article we learnt how to connect to AWS via CLI.
Happy Learning.