AWS – CLI

How to set up AWS CLI on your computer

Download and install aws cli

Set up your aws profile.

Run this command to create the default profile

aws configure

If you have multiple aws accounts then you will need to specify a profile.

aws configure [--profile profile-name]

For example:

aws configure --profile company

Then when you make a CLI call you will need to specify the profile like this, (command to login to ECR)

aws ecr get-login --profile company

Load AWS CLI parameters from a file

Sometimes it’s convenient to load a parameter value from a file instead of trying to type it all as a command line parameter value, such as when the parameter is a complex JSON string. To specify a file that contains the value, specify a file URL in the following format.

file://complete/path/to/file
// Read from a file in the current directory
aws ec2 describe-instances --filters file://filter.json

 




Subscribe To Our Newsletter
You will receive our latest post and tutorial.
Thank you for subscribing!

required
required


Leave a Reply

Your email address will not be published.