Back to Compute

AWS Fargate / AWS App Runner

aws

Serverless compute engine for containers on Amazon ECS/EKS, and turnkey automated web app hosting via App Runner.

COMPUTE
Amazon Web Services

Serverless compute engine for containers on Amazon ECS/EKS, and turnkey automated web app hosting via App Runner.

Click any section above to jump directly to it
GCP ➔ AWS Bridge
Fast-Track Mental Model Translation

Coming from Google Cloud?

Compare with Google Cloud Run

Both offer serverless container platforms where developers deploy container images without managing nodes or clusters.

What's Conceptually Identical
  • Deploy standard OCI/Docker container images with zero underlying server maintenance.
  • Pay only for the CPU and memory consumed during task execution.
  • Automatic HTTPS endpoints, health checks, and horizontal autoscaling based on incoming traffic.
Key Architectural Shifts in AWS
  • Scale to Zero: Cloud Run scales down to 0 instances and bills in 100ms increments; Fargate maintains running tasks (App Runner scales to memory-only pause).
  • Ecosystem: Fargate runs as a compute engine under Amazon ECS or EKS; Cloud Run is a standalone managed service based on Knative.
  • Networking: Fargate tasks consume native VPC private IPs directly; Cloud Run uses Serverless VPC Access Connectors.
Syntax & Command Translator
Deploy Container Service
GCP:gcloud run deploy api-service --image gcr.io/my-project/api:v1 --platform managed
AWS:aws ecs create-service --cluster prod-cluster --service-name api-service --task-definition api-task:1 --launch-type FARGATE --desired-count 2

What is AWS Fargate / AWS App Runner?

AWS Fargate is a serverless compute engine for containers that works with both Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes Service (EKS). Fargate allocates exact vCPU and memory per task and runs each container inside an isolated Firecracker microVM. AWS App Runner builds upon this foundation, offering a turnkey fully managed service that automatically builds, deploys, load-balances, and scales web applications directly from code or container images.

Decision Guide: When to Choose This Service

When to Use AWS Fargate / AWS App Runner

Use AWS Fargate when you want to run containerized microservices, event-driven queues, or background workers without managing EC2 instances, patching AMIs, or sizing clusters. Use AWS App Runner for public web applications and APIs needing automatic TLS and load balancing.

When NOT to Use (Recommended Alternatives)

Do NOT use Fargate if you need low-level kernel tuning, custom host daemons (DaemonSets without sidecars), GPU accelerators (use EC2 GPU), or sub-millisecond container startup where cold starts matter.

Core Architectural Pillars

Serverless Container Execution

Eliminates EC2 server provisioning, cluster sizing, and OS security patching.

Firecracker MicroVM Isolation

Hardware-level virtualization isolation between container tasks.

`awsvpc` Networking

Every container task receives its own private VPC IP address and dedicated ENI.

Dual IAM Roles

Task Execution Role (bootstrap, ECR image pull, secrets) vs. Task Role (application runtime S3/DynamoDB permissions).

Fargate Spot

Run interruptible container workloads at up to 70% discount with a 2-minute SIGTERM termination warning.