AWS CLI 2 cheatsheet
AWS CLI 2: Output and queries
5 common AWS CLI 2 tasks.
Choose the output format
Print results as a table. Other formats are json, yaml and text.
aws iam list-users --output table
Filter results with JMESPath
Select only the fields you need.
aws iam list-users --query "Users[].UserName"
Limit the results
Return at most 20 items per call.
aws s3api list-objects-v2 --bucket my-bucket --max-items 20
Get help for any command
Show the documentation for a service or command without leaving the terminal.
aws s3 cp help
See the underlying API calls
Print a detailed log of requests, useful for permission errors.
aws s3 ls --debug