A Beginner's Guide To Understanding EC2 (Elastic Compute Cloud) in AWS.
When I began learning cloud computing, one of the first services I encountered was EC2 (Elastic Compute Cloud) by Amazon Web Services (AWS). It is a core service and a great starting point for anyone trying to understand how the cloud works.
In this article, I’ll explain EC2 in the simplest way possible and share what I’ve learned.
What is EC2?
Amazon EC2 (Elastic Compute Cloud) is a core service provided by Amazon Web Services (AWS) that offers scalable virtual servers (instances) in the cloud. Think of EC2 as renting a virtual computer in the cloud. Instead of buying and maintaining physical servers, you can quickly spin up a virtual server (called an EC2 instance) and use it to:
Run applications
Host websites
Store and process data
Test and deploy code
You only pay for what you use, and you can shut it down at any time. That’s part of the flexibility cloud computing is known for.
Key EC2 Concepts You Should Know.
Here are some important terms and settings to understand when launching an EC2 instance:
AMI (Amazon Machine Image): This is the blueprint of your virtual server. It defines your operating system (e.g., Ubuntu, Windows) and some default configurations.
Instance Type: This determines the computing power (CPU, RAM, etc.) of your server. For beginners or personal projects, t2.micro is often used, and it’s part of the AWS free tier.
Key Pair: You will use this to securely connect (SSH) to your server. AWS allows you to create a key pair when launching your instance. Security Group: Think of this as your firewall. It controls which ports are open to the internet. For example:
Port 22 for SSH access
Port 80 for HTTP (web traffic)
Port 443 for HTTPS is one area I initially overlooked, and my website didn’t load because port 80 wasn’t open.
Elastic IP (Optional): If you want a fixed IP address that doesn't change every time you stop and start your instance, AWS lets you associate an Elastic IP.
My First Hands-on EC2 Experience.
When I deployed my first WordPress website on EC2 using Docker, I went through all these steps:
Launched an Ubuntu instance
Installed Docker & Docker Compose
Opened the necessary ports
Deployed the website containers. It wasn’t smooth at first. I ran into issues like
Incorrect port settings
Forgot to start Docker containers
MySQL container crashing
But each mistake taught me something valuable, and it all started with EC2.
Steps to Launch an EC2 Instance in AWS
Log in to AWS Console - Go to AWS Management Console and sign in.
Navigate to EC2 - Search for EC2 in AWS Services and click "Launch Instance."
Configure Instance: Name.- Give your instance a name (e.g., MyEC2). AMI (OS): Choose an Amazon Machine Image (e.g., Amazon Linux 2023, Ubuntu, Windows). Instance Type: Select (e.g., t2.micro - Free Tier eligible).
Key Pair (SSH Access): Create/download a key pair (.pem file) for secure login (required for Linux).
Network Settings: Keep the default VPC or create a new one. Enable Auto-assign Public IP (for internet access). Configure Security Group (allow SSH (22), HTTP (80), and HTTPS (443) as needed).
Storage (EBS Volume): Default 8GB SSD (Free Tier)—increase if needed.
Launch Instance. Click "Launch Instance" and wait for the status "Running.”
Connect to Your Instance Linux/macOS: Use SSH with the downloaded .pemkey
Lessons I’ve Learned
Security groups are crucial—always check port access.
Start small—free-tier EC2 instances are perfect for testing and learning.
Documentation is your friend—AWS has great beginner docs.
Logistics don't lie—learn to read logs to troubleshoot.
Conclusion:
Understanding EC2 gave me a practical start to cloud computing. It’s amazing how you can launch a powerful server with just a few clicks or terminal commands.
Aspiring Cloud Engineer | Building Real Projects with AWS (S3, EC2, IAM) | Supply Chain & SOP Documentation Experience | Sharing Projects on GitHub | Open to Cloud Internship Opportunities
1moThanks for sharing this and explaining it in a way that's easy for a beginner like me to understand. I'd love to learn more about cloud computing from you to enhance my learning experience.
Tech Content Writer | SEO Writing for Tech Brands | Turning Complex Ideas into Clear, Searchable Stories
2moOh wow, thank you so much for breaking into a simpler form. I am still at my foundation level. I would like us to connect 🤝
Helping Direct Response Marketers Profit, Grow & Scale | Promo Copywriter.
2moThis is such a great article. You’ve clearly walked the path and made it less intimidating for beginners. Bravo, Yetunde!