contentintech
Cheatsheets/AWS CLI
DevOps

AWS CLI

Identity, profiles and read-first cloud inspection commands.

Identity and profiles

aws --versionInspect the installed CLI
aws configure ssoSet up IAM Identity Center authentication
aws sso login --profile workSign into a configured SSO profile
aws sts get-caller-identity --profile workVerify the account and role before any operation

S3

aws s3 lsList buckets visible to your identity
aws s3 ls s3://my-bucket/List objects under a bucket prefix
aws s3 cp ./report.txt s3://my-bucket/reports/Upload one local file
aws s3 sync ./reports s3://my-bucket/reports --dryrunPreview synchronization changes

Query output

aws ec2 describe-instances --region ap-south-1Inspect instances in a chosen region
aws ec2 describe-instances --query 'Reservations[].Instances[].InstanceId' --output textSelect instance IDs
aws logs describe-log-groups --region ap-south-1Inspect log-group names
aws configure list-profilesList available named profiles

Section navigation