Launching Your First EC2 Instance: A Beginner's Guide 🚀
If you're just getting started with AWS, one of the first services you'll use is Amazon EC2 (Elastic Compute Cloud).
EC2 lets you create virtual machines (called instances) that you can access and run just like real computers.
In this guide, I'll walk you through the simple steps to create your very first EC2 instance — no complicated jargon!
Step 1: Open the EC2 Dashboard
- Log in to your AWS Management Console.
- At the top of the page, type EC2 into the search bar and click on the EC2 service.
- On the left-hand menu, click Instances, then click Launch Instance to start the creation process.
Step 2: Name Your Instance
- Give your instance a name.
- It can be anything you want — something that makes it easy to recognize, especially when you have multiple instances later on.
Step 3: Choose an Amazon Machine Image (AMI)
- Select an Amazon Machine Image (AMI).
- The AMI includes:
- An Operating System (like Ubuntu, Amazon Linux, or Windows)
- Optional application software
- Custom configurations
Think of the AMI as the "template" for your virtual machine.
Step 4: Select the Instance Type
- Choose your instance type.
- For beginners and those using the AWS Free Tier, the best choice is t2.micro — it gives you enough resources without any cost.
Step 5: Create a Key Pair
You need a key pair to securely connect (SSH) to your instance.
- Create a new key pair and give it a name.
- AWS will generate:
- A public key (AWS stores this)
- A private key (you download as a
.pem
file)
⚠️ Important:
Download the.pem
file immediately! AWS will not allow you to download it again.
Keep the file safe — you’ll need it when connecting to your instance.
Step 6: Configure Network Settings
- Under Network Settings, click Edit.
- AWS automatically assigns you a VPC and Subnet — you can leave the default options.
Then, configure your Security Group:
- Allow SSH traffic (port 22) — to connect to your instance.
- Allow HTTP (port 80) and HTTPS (port 443) traffic — if you plan to host a website.
Step 7: Configure Storage
- AWS offers 8 GiB of storage by default with the Free Tier.
- This is usually enough to get started, but you can adjust it based on your needs.
Step 8: Review and Launch
- Take a moment to review all your settings.
- If everything looks good, click Launch!
Your instance will move to the Running state.
Wait until you see Status Checks: 2/2 passed before connecting.
Step 9: Connect to Your Instance
Once your instance is running:
- Click Connect in the AWS Console and follow the provided instructions.
Or manually SSH from your terminal or PowerShell:
bash
ssh -i /path/to/your-keypair.pem ubuntu@your-ec2-public-ip
Final Thoughts 🎉
Congratulations!
You've just launched and connected to your very first EC2 instance!
This skill lays the foundation for everything else you’ll build in the cloud.
Keep exploring, try different instance types, set up a basic web server — and most importantly — enjoy the learning journey! 🚀
💬 Got questions or stuck on a step? Drop a comment below — I’d love to help!
Originally published on my blog at Hashnode
(https://follow-my-journey-in-devops.hashnode.dev/launching-your-first-ec2-instance-a-beginners-guide)