InterviewHubPRO
Section Overview
Q32

Question 32 of 65

Part 3: Compute, Containers & Serverless (21 - 35)

49%
AWS Cloud Architecture•Part 3: Compute, Containers & Serverless (21 - 35)

AWS Fargate trade-offs.

In Simple Words:

  • Pros: Serverless containers; no EC2 instances to provision, scale, patch, or secure.
  • Cons: Slightly higher per-hour compute cost than reserved EC2 instances; does not support privileged Docker containers.
hcl
resource "aws_ecs_service" "fargate_service" {
  name            = "my-service"
  cluster         = aws_ecs_cluster.main.id
  task_definition = aws_ecs_task_definition.app.arn
  desired_count   = 3
  launch_type     = "FARGATE"
}