Back to technologies

/aws

AWS CLI command reference

Useful AWS CLI commands for inspecting resources and automating deployments.

12 matches

Configuration & Identity

4 commands

aws configure

Set up access key, secret, region, and output format.

aws configure list

Inspect the current AWS CLI configuration values.

aws sts get-caller-identity

Verify which IAM identity the CLI is using.

aws sso login --profile dev

Authenticate using AWS IAM Identity Center (SSO).

S3 Operations

4 commands

aws s3 ls

List all accessible S3 buckets.

aws s3 cp file.txt s3://my-bucket/

Upload a single file to S3.

aws s3 sync ./dist s3://my-bucket/site/

Synchronize a local folder to an S3 prefix.

aws s3 rm s3://my-bucket/file.txt

Delete an object from S3.

Cloud Operations

4 commands

aws ec2 describe-instances

List EC2 instance details in the current region.

aws logs tail /aws/lambda/my-function --follow

Stream CloudWatch logs for a Lambda function.

aws cloudformation deploy --template-file template.yml --stack-name my-stack --capabilities CAPABILITY_NAMED_IAM

Deploy a CloudFormation stack from the terminal.

aws ecr get-login-password | docker login --username AWS --password-stdin <account>.dkr.ecr.<region>.amazonaws.com

Authenticate Docker with Amazon ECR.