Answer framework
Explain runtime and control plane → scaling → state location → health and replacement → cost and limits, then map constraints to a service.
Frequent questions
| Question | Strong answer |
|---|---|
| EC2 vs Lambda vs Fargate | OS control and long-running process / short event function / containers without node operations |
| ECS vs EKS | AWS-native orchestration / Kubernetes API and ecosystem; both can use EC2 or Fargate |
| Task role vs execution role | Application AWS API access / ECS agent image pull, logs, and startup secrets |
| How an ASG self-heals | A launch template defines instances; the ASG maintains capacity and replaces unhealthy instances |
| Reserved vs provisioned concurrency | Reserve and cap concurrency / keep environments initialized to reduce cold starts |
| EC2 login vs API access | SSH or SSM enters the OS; the instance-profile role authorizes AWS API calls |
Decision cues
- Full OS, specialized hardware, or long-running process → EC2.
- Event-driven execution of at most 15 minutes → Lambda.
- Containers without node management → ECS/EKS + Fargate.
- Kubernetes compatibility and ecosystem → EKS.
- Predictable time-based load → scheduled/predictive scaling; maintain a metric target → target tracking.
Remember
Explain who manages what, where state lives, and who replaces failures before discussing performance and price.