Chapter 01 · EC2 setup
Launch an EC2 instance
Create a small Ubuntu virtual machine with a public address and a key pair for secure access.
1
Open EC2
Sign in to the AWS Console, search for EC2, and select Launch instance.
2
Choose the image and size
Use Ubuntu Server 24.04 LTS. For a learning server, choose t2.micro or t3.micro.
3
Create a key pair
Create a new key pair and download the .pem file. Keep it somewhere safe; AWS will not let you download it again.
4
Enable a public address
Use a public subnet and enable Auto-assign public IP. Launch the instance, wait for its status to become running, then copy its Public IPv4 address.
Good to know: Keep port 22 restricted to your current IP. Web ports 80 and 443 can be public.