AWS compute - from zero management to full control
Four ways to run code on AWS, from fully serverless (Lambda) to fully managed Kubernetes (EKS). The right choice depends on your team size, operational maturity, workload patterns, and security requirements. We include the security implications most comparison articles ignore.
Simple container orchestration with deep AWS integration
Full Kubernetes API - portable, ecosystem, community
Zero infrastructure, sub-second scaling, pay per invocation
Simplest option - push code or image, get a URL
| Criteria | ECS | EKS | Lambda | App Runner |
|---|---|---|---|---|
| Operational Complexity | Medium | High | Low | Very Low |
| Max Execution Time | Unlimited | Unlimited | 15 minutes | Unlimited |
| Cold Start | ~5-30s (Fargate) | ~5-30s (Fargate) | ~100ms-10s (varies by runtime) | ~5-15s |
| Auto-Scaling | ECS Service Auto Scaling | Karpenter / HPA / VPA | Instant (concurrent invocations) | Automatic (built-in) |
| VPC Support | Yes | Yes | Optional (minimal cold start impact since Hyperplane ENI) | Yes (limited) |
| GPU Support | Yes (EC2) | Yes (EC2) | No | No |
| Cloud Portability | No (AWS-native) | Yes (Kubernetes) | No (AWS-native) | No (AWS-native) |
| Team Size Needed | 2-5 engineers | 5+ engineers (Kubernetes expertise) | 1-2 engineers | 1 engineer |
No SSH, no OS patches, no container images to scan. AWS manages the runtime. The attack surface is limited to your function code, dependencies, and IAM execution role.
RBAC misconfigurations, pod security standards, service account token abuse, and OIDC federation attacks are all EKS-specific risks. Do not run EKS without dedicated Kubernetes security knowledge.
If you use EC2 launch type, enforce IMDSv2 to prevent SSRF-based credential theft from the instance metadata service. This is the most exploited attack vector in AWS.
Never use EC2 instance roles for containers. Use ECS task roles or EKS IRSA (IAM Roles for Service Accounts) to scope permissions per workload, not per instance.
These comparisons are a starting point. Every architecture is different. Contact us for tailored AWS security assessments and architectural guidance.