AWS EC2 (Elastic Compute Cloud)
Understanding the concept of virtual servers

Hi, I'm Rojarani Daasari. I'm a Devops Engineer with 2.9 years of experience in automated deployments, CI/CD Pipelines, cloud infrastructure and configuration management.
In this article, weโll understand all about EC2 instances in this day-2 of AWS Series.
If you are starting your AWS journey, EC2 (Elastic Compute Cloud) is one of the most important services you must understand.
By the end of this blog, you will:
Understand what EC2 is and why itโs used
Learn regions & availability zones
Create an EC2 instance
Connect to it using SSH
Deploy your first application (Jenkins) on AWS
Access it from the internet ๐
๐น What is EC2?
- EC2 stands for Elastic Compute Cloud
It provides virtual servers (virtual machines) on AWS cloud
When you launch an EC2 instance, AWS gives you combination of:
CPU
RAM
Storage
Network
This virtual server behaves just like a real physical server โ but without hardware headaches.
๐น Why is it called Elastic Compute Cloud?
Elastic โ Can scale up/down (CPU, RAM, storage)
Cloud โ Runs on AWS public cloud
Compute โ Provides computing power (virtual server)
In short:
EC2 = Scalable virtual server on cloud.
EC2 vs Physical Servers:
Physical Servers:
โ High upfront cost
โ Manual maintenance
โ Fixed capacity
โ Difficult to manage
EC2:
โ No upfront cost
โ AWS manages infra
โ Elastic scaling
โ Easy & fast
๐น Why Should We Use EC2?
Before cloud, companies had to:
Buy physical servers
Maintain hardware
Handle failures
Pay full cost even when servers were idle
With EC2:
No hardware purchase
No maintenance
Pay only when server runs
Stop instance โ No compute charges
This is why companies prefer EC2 over traditional servers
Why EC2 is Popular?
No physical server management
No hardware purchase
No manual upgrades
AWS handles:
โ hardware failure
โ maintenance
โ security patches
โ Pay-as-you-go pricing
โ Stop instance - No compute cost
โ Start instance - Pay only when running
๐น Types of EC2 Instances:
AWS provides multiple EC2 types based on workloads:
General Purpose :
โ Balanced CPU, RAM, storage
โ Used for demos, web apps, learning
Compute Optimized :
โ CPU heavy workloads.
โ Gaming servers, ML workloads
Memory Optimized :
โ High RAM applications.
โ Big data, analytics
Storage Optimized:
โ Disk intensive app.
โ Databases, data warehousing.
Accelerated Computing:
โ GPU-based workloads.
โ AI, ML, graphics processing
๐ Instance/instance type selection depends on application requirement, not random choice.
๐น AWS Regions & Availability Zones
Regions
Regions are geographical locations where AWS has data centers.
Example:
Mumbai
North Virginia
Frankfurt
Used for:
Low latency
Data compliance
Security requirements
Customer proximity
Availability Zones
Each region has multiple Availability Zones (AZs) (or) Multiple data centers inside a region.
Example:
us-east-1a
us-east-1b
Used for:
Independent data centers
Used for high availability
Protects against downtime
๐ if one AZ fails โ app still works
๐น Creating an EC2 Instance (Hands-On)
Login to AWS Console
Go to EC2 โ Launch Instance
Select OS (Ubuntu โ Free Tier)
Choose instance type: t2.micro
Create or select Key Pair (Very Important)
Used for SSH login
Password login is disabled
Contains:
Public key (AWS)
Private key (.pem file โ YOU)
Never share private key
Keep default networking
Launch instance ๐
Specs:
1 vCPU
1 GB RAM
Limit:
- 750 hours/month
๐ Always stop instance after practice
๐น Connecting to EC2 Using SSH
chmod 600 aws-login.pem
ssh -i aws-login.pem ubuntu@<PUBLIC_IP>
Once connected, you are inside your cloud server.
๐น Deploying First Application on EC2 (Jenkins)
Update system
sudo apt update
Install Java
sudo apt install openjdk-11-jdk
Install Jenkins
sudo apt install jenkins
Verify Jenkins
sudo systemctl status jenkins
๐น Access Jenkins from Browser
Open EC2 Security Group
Allow inbound traffic on port 8080
Open browser:
http://<PUBLIC_IP>:8080
๐ Jenkins is live on AWS!
๐ฏ Final Thoughts
EC2 is the foundation of AWS compute services.
Once you master EC2, learning advanced services like Load Balancer, Auto Scaling, Kubernetes (EKS), CI/CD pipelines becomes much easier.
๐ First application deployed successfully!


