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 centre. You pick how powerful it is, install whatever software you want, and reach it over the internet. When you're done, you turn it off and stop paying. Under the hood it's a virtual machine: one big physical server is sliced into several private computers, and you rent one slice. That's EC2.

At work

EC2 (Elastic Compute Cloud) rents virtual servers by the second or hour. A business picks a size, an operating system, and a network, and the server is running within minutes. The 'elastic' part is what matters commercially: a retailer can run five servers on a quiet Tuesday and five hundred during a Black Friday rush, paying only for what actually ran instead of buying for the peak.

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.