One of the first confusing things about AWS is realizing there are multiple ways to run your code.
EC2, Lambda, containers (ECS/EKS)… they all “run applications,” but they come with very different trade-offs. If you’ve ever wondered why AWS offers so many options—or when to use which—this quick mental model might help.
EC2 is closest to a traditional server. You get full control, but you also own scaling, patching, and uptime (usually via Auto Scaling).
Containers sit in the middle. You package your app once and run it consistently across environments, letting AWS handle a lot of the orchestration.
Lambda removes servers entirely from your mental model. You write functions, AWS runs them on demand, and you pay only for execution time.
There’s no single “best” option. Most real-world systems use a mix of all three depending on the workload.
I wrote a detailed, beginner-friendly breakdown explaining how I think about these choices in practice—without turning it into documentation.
👉 Read the full article here:
EC2 vs Lambda vs Containers: How I Think About AWS Compute
https://ravindrasinghshah.substack.com/p/ec2-vs-containers-vs-lambda-how-i
Top comments (0)