Skip to content
AW

AWS CLI

S3 transfers, EC2 lifecycle, IAM, and infrastructure automation.

12 commandsclouds3ec2iam

Command catalog

S3 object opsAWS CLI

aws s3 cp

Copy a single file or entire directory to and from S3 buckets.

aws s3 cp <local_path> s3://<bucket>/<key>
S3 object opsAWS CLI

aws s3 sync

Synchronize directories while preserving differential changes.

aws s3 sync <local_dir> s3://<bucket>/<prefix>
S3 object opsAWS CLI

aws s3 ls

List buckets or objects with optional filtering.

aws s3 ls
EC2 managementAWS CLI

aws ec2 describe-instances

Retrieve instance metadata, tags, and state.

aws ec2 describe-instances --instance-ids <instance_id>
EC2 managementAWS CLI

aws ec2 start-instances

aws ec2 stop-instances

Control instance lifecycle by starting or stopping resources.

aws ec2 stop-instances --instance-ids <instance_id>
EC2 managementAWS CLI

aws ec2 create-image

Create AMIs from existing instances.

aws ec2 create-image --instance-id <instance_id> --name "<image_name>" --no-reboot
IAM and identityAWS CLI

aws iam list-users

Enumerate IAM users with associated metadata.

aws iam list-users
IAM and identityAWS CLI

aws iam attach-user-policy

aws iam detach-user-policy

Manage attached policies for IAM principals.

aws iam attach-user-policy --user-name <user> --policy-arn <policy_arn>
IAM and identityAWS CLI

aws sts assume-role

Obtain temporary credentials for a target role.

aws sts assume-role --role-arn <role_arn> --role-session-name <session>
Infrastructure automationAWS CLI

aws cloudformation deploy

Deploy or update CloudFormation stacks from templates.

aws cloudformation deploy --stack-name <stack_name> --template-file template.yaml --capabilities CAPABILITY_NAMED_IAM
Infrastructure automationAWS CLI

aws lambda update-function-code

Publish new Lambda deployments from zip archives or S3.

aws lambda update-function-code --function-name <fn_name> --zip-file fileb://build.zip
Infrastructure automationAWS CLI

aws logs tail

Stream CloudWatch Logs for debugging and observability.

aws logs tail /aws/lambda/<fn_name> --follow