AWS CLI : We are going to cover below topic during this session
Ec2, S3, IAM ,ELB, SNS SQS, ECS, Shell scripting To install CLI on linux sudo apt-get install python-pip sudo pip install awscli aws --version Configure AWS CLI Before using CLI , we must configure our access key and secret key, region on CLI. These detail can be available on console on IAM section . ->aws configure
CLI outputformats: The output format on CLI is JSON ,text or table (JSON is the default output format) ->aws ec2 describe-instances Issue1 After firining above the above command you may get below error
To fix above issue we should follow below steps
Issue2 : If the user does not have admin access you may get below error.
To Fix above issue you need to give admin access to the user. --> aws ec2 describe-instances --output table (or)text
CLI Configurations : CLI config details can be stored on .aws folder. If you are working on windows the config details will be stored on below path.
The config file contains region and output format details. The credential file contains access key and secret key details. If you are using Linux the path as below. Vim ~/.aws/credentials (or) nano ~/.aws/config AWS CLI help and document : Aws cli provides huge CLI commands which is very difficult to remember all commands. So we have to find out the commands with help command. Aws<space> any type of services<space> help Ex: aws ec2 describe-instances help To come out form the help we have press ctl+c in windows where as in linux pres ctrl+q
AWS CLI setup : command auto-completion set up by default aws cli won’t enabled , we have to enable them manually. Filtering CLI command output – query vs filter option Testing permissions – dry-run option Testing functionality -JMES PATh Setting up james path terminal AWS CLI auto completion