
Day 3: Amazon EC2 – Launching My First Virtual Server
Day 3 of my 90-day AWS challenge: what Amazon EC2 is, the key concepts behind it (AMIs, instance types, key pairs, security groups), and how I launched and safely shut down my first virtual server.
Recap of Day 2
Yesterday I learned how IAM controls access with users, groups, roles, and policies. Today I'm using that secure setup to launch my first virtual server on Amazon EC2.
What is Amazon EC2?
EC2 (Elastic Compute Cloud) gives you resizable virtual servers, called instances, in the cloud. You choose the operating system, CPU, memory, and storage, and you pay only for the time you run it.
Key concepts
| Concept | What it is |
|---|---|
| AMI | A template with the operating system and software for your instance (e.g., Amazon Linux) |
| Instance type | The hardware size: CPU, memory, network (e.g., t3.micro) |
| Key pair | A public/private key used to log in securely over SSH |
| Security group | A virtual firewall that controls inbound and outbound traffic |
| EBS volume | The disk storage attached to your instance |
EC2 pricing models
- On-Demand: pay per second or hour, no commitment
- Reserved / Savings Plans: lower price for a 1 or 3 year commitment
- Spot: spare capacity at big discounts, but it can be interrupted
How I launched my first instance
- Opened the EC2 console and chose my Region
- Clicked Launch instance and named it
- Selected an Amazon Linux AMI
- Chose a free-tier eligible instance type
- Created a key pair and downloaded the private key file
- Configured the security group to allow SSH only from my IP
- Launched the instance and connected to it
Stop vs. Terminate
- Stop: shuts the instance down, but the EBS volume stays and still costs a little
- Terminate: deletes the instance permanently
I terminated my instance after practicing so I wouldn't be charged for it.
Key takeaways
- Never open SSH to the whole internet (0.0.0.0/0); restrict it to your own IP
- Keep your private key file safe and never share or upload it
- Always stop or terminate practice instances, and keep your billing alert on
Up next: Day 4
Amazon S3: storing and serving files in the cloud.
Learning AWS too? Follow along and share what you're building. #90DaysOfAWS
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article