⚡ 100% In-Browser & Private: Your data never leaves your computer. Powered by Cloudflare Edge CDN.
ProWebTools PRO
Developer & SEO Utilities
25+ Commands

AWS CLI Cloud Infrastructure Commands Cheat Sheet

Production AWS CLI reference: credentials configuration, S3 sync & presigned URLs, EC2 instance states, Lambda invocations, and live CloudWatch log streaming with 1-click copy.

Configuration & Auth (3 commands)

Configuration & Auth
aws configure

Interactively configures AWS Access Key, Secret Key, default region, and output format.

PRO TIP Stores credentials securely in ~/.aws/credentials and config in ~/.aws/config.
Configuration & Auth
aws sts get-caller-identity

Verifies the currently active IAM user or assumed role ARN and AWS account ID.

PRO TIP Essential command to verify which credentials and permissions are in effect.
Configuration & Auth
export AWS_PROFILE="production"

Switches the active CLI session to a named profile defined in ~/.aws/config.

PRO TIP Avoids accidentally executing commands against production cloud environments.

Amazon S3 Storage (4 commands)

Amazon S3 Storage
aws s3 ls

Lists all S3 buckets associated with your AWS account.

PRO TIP Run aws s3 ls s3://my-bucket/path/ to inspect objects in a bucket prefix.
Amazon S3 Storage
aws s3 cp ./build/ s3://my-bucket/ --recursive

Uploads all local files in build/ to the destination S3 bucket.

PRO TIP Use --exclude "*.map" to omit source maps from static website deployments.
Amazon S3 Storage
aws s3 sync ./dist/ s3://my-website-bucket/ --delete

Synchronizes local files to S3, uploading only changed files and deleting obsolete keys.

PRO TIP Standard command for deploying React, Vue, and SSG web applications.
Amazon S3 Storage
aws s3 presign s3://my-bucket/reports/q4.pdf --expires-in 3600

Generates a secure, time-limited presigned URL granting temporary read access.

PRO TIP Expires in 1 hour (3600 seconds) without requiring public bucket policies.

Amazon EC2 Compute (3 commands)

Amazon EC2 Compute
aws ec2 describe-instances --filters "Name=instance-state-name,Values=running"

Lists all currently running EC2 virtual machines with IP addresses and tags.

PRO TIP Combine with --query "Reservations[*].Instances[*].[InstanceId,PublicIpAddress]" for clean tabular output.
Amazon EC2 Compute
aws ec2 start-instances --instance-ids i-0123456789abcdef0

Starts a stopped EBS-backed virtual machine instance.

PRO TIP Use stop-instances to power off instances and reduce hourly compute billing.
Amazon EC2 Compute
aws ec2 reboot-instances --instance-ids i-0123456789abcdef0

Requests an orderly operating system reboot of the targeted virtual machine.

PRO TIP Rebooting maintains the public and private IP addresses without reallocation.

AWS Lambda Functions (2 commands)

AWS Lambda Functions
aws lambda list-functions --max-items 50

Lists deployed serverless Lambda functions, memory allocations, and runtime versions.

PRO TIP Shows runtimes (e.g. nodejs20.x, python3.11, provided.al2023).
AWS Lambda Functions
aws lambda invoke --function-name MyHandler --payload '{"action":"test"}' response.json

Synchronously executes a Lambda function payload and writes response to a local file.

PRO TIP Check response.json and terminal exit code to inspect return status.

CloudWatch Logs (2 commands)

CloudWatch Logs
aws logs tail /aws/lambda/MyFunction --follow

Streams live log events emitted by Lambda or EC2 CloudWatch log groups in real time.

PRO TIP Use --since 15m to inspect events that occurred within the past fifteen minutes.
CloudWatch Logs
aws logs filter-log-events --log-group-name "/aws/lambda/MyFunction" --filter-pattern "ERROR"

Searches CloudWatch log events matching a specific term or metric pattern.

PRO TIP Drastically faster than navigating through the AWS Management Console UI.