Opening Scenario

Your team needs to run a backend API service. It needs to handle HTTP requests, connect to a database, run scheduled jobs, and restart automatically if it crashes. You need persistent state between requests, you control the runtime, and you expect moderate but variable traffic. Where does the code actually run?


Question Progression

Concept 1: What is a compute instance and why do you need one?

Question You have an application binary. It needs CPU, memory, and an OS to run. In the cloud, how do you get that?

Reasoning On-premise, you'd buy a physical server or rack. That's slow, expensive, and oversized for uncertain demand. You need something that gives you a server on demand — sized to your workload, running your OS, billed only while in use.

Answer EC2 (Elastic Compute Cloud) gives you virtual machines on demand, called instances. Each instance is a virtualized slice of…

In the full tutorial

  • When to Reach for EC2
  • Interview Follow-Ups

Glossary history

Click dotted jargon to save explanations here.