AWS CLI: 50 Most-Used Commands and Parameters

FREE activePremium look & feelResponsiveAWS CLI

AWS CLI: 50 essential commands with FREE cloud emulator

Practice AWS safely with guided challenges, textual output and a visual architecture canvas.

This lab does not create real resources. Commands are prepared for learning and use placeholders such as <VPC_ID>, <INSTANCE_ID> or <ACCOUNT_ID>.

Activa JavaScript para usar el emulador multicloud de Weisewelt.

List of 50 AWS commands to copy and execute

Use Copy to send the command to the clipboard. Use Load to try placing it in the emulator input or trigger the plugin event.

#AreaCommandWhat is it for?Canvas / outputAction
1Basicsaws --versionChecks the installed AWS CLI v2 version.Shows the CLI, version and local runtime.
2Basicsaws configure listLists the active credentials, region and profile configuration.Identifies profile, region and credential source without exposing secrets.
3Basicsaws configure get regionGets the default configured region.Places the regional context where lab resources will be simulated.
4Identityaws sts get-caller-identityValidates the active AWS identity: account, user or role.Draws the active account, ARN, profile and simulated permissions.
5Regionsaws ec2 describe-regions --all-regions --query "Regions[].RegionName" --output tableLists available EC2 regions.Shows the region selector and highlights the lab region.
6VPC Networkaws ec2 create-vpc --cidr-block 10.10.0.0/16 --tag-specifications 'ResourceType=vpc,Tags=[{Key=Name,Value=ww-aws-vpc}]'Creates the base VPC for the lab.Adds the network layer with CIDR 10.10.0.0/16.
7Tagsaws ec2 create-tags --resources <VPC_ID> --tags Key=Project,Value=Weisewelt Key=Environment,Value=FreeLabAdds project and environment tags to the VPC.Updates the visual inventory with governance metadata.
8VPC Networkaws ec2 describe-vpcs --filters "Name=tag:Name,Values=ww-aws-vpc"Queries the VPC created by name.Highlights the discovered VPC and shows a simulated VPC ID.
9Public subnetaws ec2 create-subnet --vpc-id <VPC_ID> --cidr-block 10.10.1.0/24 --availability-zone us-east-1a --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=ww-public-a},{Key=Visibility,Value=public}]'Creates a public subnet in one Availability Zone.Draws a public zone with CIDR, AZ and pending Internet route.
10Private subnetaws ec2 create-subnet --vpc-id <VPC_ID> --cidr-block 10.10.11.0/24 --availability-zone us-east-1a --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=ww-private-a},{Key=Visibility,Value=private}]'Creates a private subnet for databases or internal nodes.Draws a private zone without public IP or direct Internet route.
11Internet Gatewayaws ec2 create-internet-gateway --tag-specifications 'ResourceType=internet-gateway,Tags=[{Key=Name,Value=ww-igw}]'Creates an Internet Gateway for public connectivity.Adds the IGW component outside the VPC.
12Internet Gatewayaws ec2 attach-internet-gateway --internet-gateway-id <IGW_ID> --vpc-id <VPC_ID>Attaches the Internet Gateway to the VPC.Connects the VPC visually to the Internet.
13Routesaws ec2 create-route-table --vpc-id <VPC_ID> --tag-specifications 'ResourceType=route-table,Tags=[{Key=Name,Value=ww-public-rt}]'Creates a public route table.Adds a route table associated with the public zone.
14Routesaws ec2 create-route --route-table-id <ROUTE_TABLE_ID> --destination-cidr-block 0.0.0.0/0 --gateway-id <IGW_ID>Adds the default route to the Internet Gateway.Marks the public subnet route 0.0.0.0/0 through the IGW.
15Routesaws ec2 associate-route-table --subnet-id <PUBLIC_SUBNET_ID> --route-table-id <ROUTE_TABLE_ID>Associates the route table with the public subnet.Activates public connectivity for that subnet.
16Securityaws ec2 create-security-group --group-name ww-web-sg --description "Web access for Weisewelt lab" --vpc-id <VPC_ID>Creates a Security Group for web instances.Draws the logical inbound/outbound firewall.
17Securityaws ec2 authorize-security-group-ingress --group-id <SG_ID> --protocol tcp --port 22 --cidr 203.0.113.10/32Allows SSH only from a controlled example IP.Shows a restrictive administration rule.
18Securityaws ec2 authorize-security-group-ingress --group-id <SG_ID> --protocol tcp --port 80 --cidr 0.0.0.0/0Allows public HTTP traffic.Opens port 80 on the canvas with a public exposure warning.
19Securityaws ec2 authorize-security-group-ingress --group-id <SG_ID> --protocol tcp --port 443 --cidr 0.0.0.0/0Allows public HTTPS traffic.Opens port 443 and marks secure web access.
20Securityaws ec2 describe-security-groups --group-ids <SG_ID> --output tableDisplays Security Group rules.Displays inbound/outbound rules in the security inventory.
21EC2aws ec2 create-key-pair --key-name ww-key --query 'KeyMaterial' --output text > ww-key.pemCreates a key pair for EC2 access.Adds access credentials and warns about secure storage.
22EC2aws ec2 run-instances --image-id ami-0123456789abcdef0 --count 1 --instance-type t3.micro --key-name ww-key --security-group-ids <SG_ID> --subnet-id <PUBLIC_SUBNET_ID> --associate-public-ip-address --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=ww-web-01}]'Launches one EC2 instance in the public subnet.Draws a web server with simulated private and public IPs.
23EC2aws ec2 describe-instances --filters "Name=tag:Name,Values=ww-web-01" --query "Reservations[].Instances[].{Id:InstanceId,State:State.Name,PrivateIP:PrivateIpAddress,PublicIP:PublicIpAddress}" --output tableDisplays instance status and IP addresses.Updates running/stopped state and public/private IPs.
24EC2aws ec2 describe-instance-status --instance-ids <INSTANCE_ID> --include-all-instancesChecks system and instance health.Displays health checks in the monitoring layer.
25Elastic IPaws ec2 allocate-address --domain vpcAllocates an Elastic IP for the VPC.Adds a fixed public IP to the inventory.
26Elastic IPaws ec2 associate-address --instance-id <INSTANCE_ID> --allocation-id <ALLOCATION_ID>Associates the Elastic IP to the EC2 instance.Connects the fixed public IP to the web server.
27EC2aws ec2 stop-instances --instance-ids <INSTANCE_ID>Stops an EC2 instance.Changes the visual state to stopped and preserves configuration.
28EC2aws ec2 start-instances --instance-ids <INSTANCE_ID>Starts a stopped instance.Changes the visual state to running.
29EC2aws ec2 terminate-instances --instance-ids <INSTANCE_ID>Terminates an EC2 instance.Removes the server and keeps the action history.
30EBSaws ec2 create-volume --availability-zone us-east-1a --size 20 --volume-type gp3 --tag-specifications 'ResourceType=volume,Tags=[{Key=Name,Value=ww-data-vol}]'Creates a gp3 EBS volume.Adds persistent storage in the same Availability Zone.
31EBSaws ec2 attach-volume --volume-id <VOLUME_ID> --instance-id <INSTANCE_ID> --device /dev/sdfAttaches an EBS volume to an instance.Connects persistent storage to the server.
32EBS Snapshotaws ec2 create-snapshot --volume-id <VOLUME_ID> --description "Snapshot Weisewelt Free Lab"Creates a snapshot from an EBS volume.Adds an incremental backup in the protection layer.
33S3aws s3 mb s3://ww-free-lab-<ACCOUNT_ID>-demo --region us-east-1Creates an S3 bucket for the lab.Draws an object bucket with region and unique name.
34S3aws s3 cp ./index.html s3://ww-free-lab-<ACCOUNT_ID>-demo/index.htmlCopies a local file to the bucket.Shows the uploaded object inside the bucket.
35S3aws s3 sync ./site s3://ww-free-lab-<ACCOUNT_ID>-demo --deleteSynchronizes a local folder with S3.Simulates static site deployment and incremental changes.
36S3aws s3 ls s3://ww-free-lab-<ACCOUNT_ID>-demo --recursive --human-readable --summarizeLists bucket objects with a summary.Updates object count and total size.
37S3 Versioningaws s3api put-bucket-versioning --bucket ww-free-lab-<ACCOUNT_ID>-demo --versioning-configuration Status=EnabledEnables S3 bucket versioning.Marks protection against accidental overwrites.
38IAMaws iam create-role --role-name ww-lambda-exec --assume-role-policy-document file://trust-policy.jsonCreates an IAM role for Lambda execution.Adds a service identity and trust relationship.
39IAMaws iam attach-role-policy --role-name ww-lambda-exec --policy-arn arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRoleAttaches the managed policy for basic Lambda logs.Updates the role's effective permissions.
40Lambdaaws lambda create-function --function-name ww-hello-free --runtime python3.12 --role arn:aws:iam::<ACCOUNT_ID>:role/ww-lambda-exec --handler app.handler --zip-file fileb://function.zipCreates a Lambda function from a ZIP package.Draws a serverless function connected to IAM and CloudWatch Logs.
41Lambdaaws lambda invoke --function-name ww-hello-free response.jsonInvokes the Lambda function and stores the response.Shows event, execution and simulated response.
42CloudWatch Logsaws logs describe-log-groups --log-group-name-prefix /aws/lambda/ww-hello-freeDisplays Lambda log groups.Opens the observability layer and traces.
43CloudWatchaws cloudwatch put-metric-alarm --alarm-name ww-cpu-high --metric-name CPUUtilization --namespace AWS/EC2 --statistic Average --period 300 --threshold 80 --comparison-operator GreaterThanThreshold --dimensions Name=InstanceId,Value=<INSTANCE_ID> --evaluation-periods 2Creates a high CPU alarm for EC2.Adds a monitoring alert to the instance.
44RDSaws rds create-db-subnet-group --db-subnet-group-name ww-db-subnets --db-subnet-group-description "Weisewelt private DB subnets" --subnet-ids <PRIVATE_SUBNET_ID_A> <PRIVATE_SUBNET_ID_B>Creates a private subnet group for RDS.Places the database inside private networking.
45RDSaws rds create-db-instance --db-instance-identifier ww-mysql-free --db-instance-class db.t4g.micro --engine mysql --master-username admin --master-user-password <STRONG_PASSWORD> --allocated-storage 20 --db-subnet-group-name ww-db-subnets --no-publicly-accessibleCreates a private MySQL RDS instance.Draws a database without public IP and with internal access.
46EKSaws eks create-cluster --name ww-eks-free --role-arn arn:aws:iam::<ACCOUNT_ID>:role/ww-eks-cluster-role --resources-vpc-config subnetIds=<PUBLIC_SUBNET_ID>,<PRIVATE_SUBNET_ID>,securityGroupIds=<SG_ID>Creates the Amazon EKS control plane.Adds a managed Kubernetes control plane with network configuration.
47EKSaws eks describe-cluster --name ww-eks-free --query "cluster.{Name:name,Status:status,Endpoint:endpoint,Version:version}" --output tableDisplays EKS cluster status, endpoint and version.Updates the control plane state.
48EKSaws eks create-nodegroup --cluster-name ww-eks-free --nodegroup-name ww-ng-free --node-role arn:aws:iam::<ACCOUNT_ID>:role/ww-eks-node-role --subnets <PRIVATE_SUBNET_ID_A> <PRIVATE_SUBNET_ID_B> --instance-types t3.medium --scaling-config minSize=1,maxSize=3,desiredSize=1Creates a managed node group for EKS.Draws private nodes and scalable capacity.
49EKSaws eks update-kubeconfig --region us-east-1 --name ww-eks-freeUpdates local kubeconfig for cluster access.Marks administrative access from the terminal.
50CloudFormationaws cloudformation deploy --template-file template.yaml --stack-name ww-free-stack --capabilities CAPABILITY_NAMED_IAM --parameter-overrides Environment=freeDeploys infrastructure as code with CloudFormation.Groups resources into a stack and shows dependencies.
Start with identity, region and VPC before running EC2, RDS or EKS.
Replace placeholders only inside the emulator or in controlled real environments.
In real accounts, validate permissions, costs and security policies before running creation commands.