Paths/DevOps Engineer/AWS / EC2 — Virtual Machines
Launch an EC2 Instance
EC2 is AWS's virtual machine service. Launch an instance from an AMI, confirm it's running, then terminate it — the full lifecycle in one task.
Validator
IDLE — checks run live as you type commands; submit when done
01Requirements
live checks- An EC2 instance from ami-0abcdef1234567890 is running○
02Walkthrough
5 steps- 01
Launch an instance
aws ec2 run-instances starts a VM. --image-id picks the AMI (the machine image); in this lab, t2.micro is the default instance type — the free-tier classic.
aws ec2 run-instances --image-id ami-0abcdef1234567890 - 02
Read the response
The JSON contains InstanceId (i-...) and State: running. Note the ID — you'll need it to terminate this exact machine later.
- 03
Describe your instances
aws ec2 describe-instances lists everything. Filtering is a big part of real AWS CLI usage: --filters 'Name=instance-state-name,Values=running'.
aws ec2 describe-instances - 04
Submit for validation
The validator checks for a running instance from the AMI you launched.
- 05
Terminate it (after the validator passes)
Termination is the bill-safety habit to build — a forgotten instance is a forgotten monthly invoice. Once the validator has passed, run 'aws ec2 terminate-instances --instance-ids <the id from step 2>' yourself and verify with describe-instances.
03Stuck?
0 of 3 revealedTake a hint without losing the lab — each one points at the thing to look at, not at the answer.
04AI Tutor
guides, never solvesTell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?
04Notebook
saved locally in this browserlearner@lab — aws-cli (lab profile)
Session is disposable
↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list