Cloud & Software Development

EC2 (cloud compute)

Also known as: Elastic Compute Cloud, EC2 instance, AWS virtual machine

EC2 (Elastic Compute Cloud) is AWS's virtual machine service.

You choose a CPU/RAM configuration, pick an operating system, and get a server running in the cloud within minutes. You can scale from one instance to thousands and only pay for the time they run.

EC2 (cloud compute), explained at three levels

At home

Imagine renting a computer that lives in Amazon's data center. You can install whatever software you want, run it 24/7, and turn it off when you're done -- paying only for the hours it was on. That's EC2.

At work

EC2 lets companies run servers without buying hardware. Need a web server? Launch an EC2 instance. Need 500 servers for a Black Friday sale? Launch 500, then terminate them when the rush is over.

Real-world examples

At home

Thomas spun up a t3.micro EC2 instance (free tier eligible) to host a personal project. He SSH'd in, installed Node.js, and deployed his app -- the whole thing cost less than $10/month.

At work

Nadia's team uses an Auto Scaling Group of c5.2xlarge EC2 instances behind an ALB for their image processing API. At night, the group scales down to 2 instances; during daytime peak hours, it automatically expands to 20.

Common confusions

  • EC2 is just a basic virtual machine with no cloud benefits — EC2 integrates deeply with AWS -- auto-scaling, load balancing, IAM roles, VPC networking, CloudWatch monitoring, and hundreds of other services are all natively connected.
  • You need to keep EC2 running even when your app isn't being used — You can stop instances (halting charges) or use AWS Lambda/Fargate for workloads that should run only on demand, with no idle cost.

For analysts

BAs and data analysts sometimes use EC2 to run heavy data processing jobs -- a large r5 instance with 256 GB RAM can process datasets that would crash a laptop, and you can terminate it when the job is done.

History & origin

Amazon launched EC2 as one of AWS's first two services in August 2006. Early instances were slow by modern standards -- the smallest had 1.7 GB RAM -- but the concept of renting a server by the hour was revolutionary. EC2 helped launch the cloud computing era and has since expanded to hundreds of instance types covering general purpose, memory-optimized, GPU-accelerated, and ARM-based workloads.