Let's think about this for a second
An EC2 Instance represents a single virtual server — to launch one, you choose an AMI (Amazon Machine Image, a template containing an operating system plus pre-installed software), such as Ubuntu, Amazon Linux, or Windows Server. The Instance Type (t2.micro, t3.large) determines the CPU/memory size — t2.micro is Free Tier eligible and works well for learning. The Key Pair is the authentication method used to SSH into the instance (public/private key encryption) — if you don't create or select a key pair at launch time, you won't be able to get into the instance at all.
Let's connect this to a real scenario
In the EC2 launch wizard, configure the AMI (something like Amazon Linux 2023), Instance Type (t2.micro), Key Pair (create a new one), and Security Group (only allow SSH port 22 from your own IP), then hit Launch — within minutes your server is up and running, and you can connect with `ssh -i my-key.pem ec2-user@<public-ip>`.
Let's look at it together
# Launch an EC2 instance via CLI (t2.micro, Amazon Linux)
aws ec2 run-instances \
--image-id ami-0abcdef1234567890 \
--instance-type t2.micro \
--key-name my-key \
--security-group-ids sg-0123456789abcdef0
# SSH into it once running
ssh -i my-key.pem ec2-user@<public-ip>$ aws ec2 describe-instances --query 'Reservations[].Instances[].State.Name'
["running"]5-minute try-it
Launch a t2.micro EC2 instance from the AWS Console (or the CLI) — try SSHing into it, and once you're done practicing, terminate (delete) the instance to avoid costs.
A quick word of caution
If you leave an EC2 instance running without terminating it after practice (and go past the Free Tier limit), you'll start racking up hourly costs — double-check your instance status after every lesson.