Amazon DOP-C02: Containers and Serverless Operations — Study Guide

Part of the AWS DevOps Engineer Professional DOP-C02 — Study Guide. Practice with verified answers in the Amazon exam hub, or take timed practice tests on ExamRoll.io.

Overview

Containers and serverless change how you operate, scale, and release applications on AWS. This section connects the operational primitives across Amazon ECS, AWS Fargate, Amazon EKS, Amazon ECR, AWS Lambda, and Amazon API Gateway so you can design safe deployments, enforce image governance, tune concurrency, and make consistent choices between EC2- and Fargate-based capacity. It focuses on task and pod scheduling models, health checks and deployment controls, traffic shifting, cross-account image distribution, and performance features such as API caching and Lambda provisioned concurrency.

Amazon ECS and AWS Fargate

ECS task definitions declare one or more containers and all the runtime configuration needed by the scheduler. Key elements include CPU/memory reservations and limits, portMappings, environment variables and secrets (from AWS Secrets Manager or Systems Manager Parameter Store), Linux parameters and ulimits, logConfiguration (awslogs, firelens, etc.), ephemeralStorage size (for Fargate, 20–200 GB), and volumes (including EFS). Use the task execution role for image pulls and log drivers; use the task role for application AWS API access. Container healthCheck defines command, interval, timeout, retries, and startPeriod. Combined with dependsOn (condition=HEALTHY), health checks enforce startup ordering for sidecars.

ECS services maintain desired task count and optionally register tasks with an ALB/NLB. Service deploymentConfiguration controls rolling updates with minimumHealthyPercent and maximumPercent. The deployment circuit breaker (enabled/rollback) can automatically revert failed rollouts when tasks fail health checks. Service autoscaling integrates with Application Auto Scaling for CPU/memory-based target tracking or ALB RequestCountPerTarget. Service discovery (AWS Cloud Map) and ECS Service Connect simplify service-to-service traffic.

Cluster types and capacity:

Fargate and EFS: define an EFS volume in the task definition and mount with TLS; prefer EFS access points for least-privilege and identity enforcement. This supports stateful needs like shared configs, model weights, or intermediate files without baking them into images.

Container health checks, rolling updates, and blue/green:

Image governance with ECR:

Amazon EKS Compute Models

EKS separates the managed control plane from your data plane choices:

Managed node groups (MNGs) provision and lifecycle-manage EC2 worker nodes. They integrate with launch templates for AMI choice (Amazon Linux 2, Bottlerocket), instance types, and bootstrap parameters. MNGs handle rolling updates with surge capacity and automated cordon/drain for minimal disruption. Use node taints/tolerations to steer specific workloads. Combine with the Cluster Autoscaler (or Karpenter) to rightsize node capacity based on pending pods.

Self-managed nodes give full control over bootstrap and OS but add operational overhead; they’re typically reserved for special kernels or niche hardware.

EKS on Fargate runs pods without managing nodes. Fargate profiles map namespaces/labels to Fargate. Each pod gets its own ENI (awsvpc), simplifying network isolation. Limitations include no DaemonSets, no host networking/volumes, and constraints on privileged workloads. Observability agents (e.g., Fluent Bit) must run as sidecars or use managed log collection. This model is ideal for spiky, small-footprint, or multi-tenant workloads that benefit from per-pod isolation and pay-per-pod economics.

Operational add-ons:

AWS Lambda Operations and Concurrency

Packaging and configuration:

Traffic shifting and safety:

Concurrency controls:

API Gateway Design and ECR Cross-Account Access

API Gateway REST APIs versus HTTP APIs:

Stages and throttling:

Caching (REST APIs only):

Private connectivity:

ECR cross-account access:

Practical Problem Scenario

Spotify is modernizing a playlist microservice stack to reduce latency variation during peak releases and to tighten their image supply chain across multiple AWS accounts.

  1. Standardize image build and governance
  1. Serve stateless APIs on ECS with Fargate
  1. Safe deployments with blue/green and automated tests
  1. Latency-sensitive operations on Lambda with stabilized cold starts
  1. Expose external APIs via API Gateway and secure private backends
  1. Cross-account runtime pulls without internet

This design reduces operational toil (no nodes to manage), provides deterministic latency via provisioned concurrency and ALB health–aligned rollouts, and enforces image provenance end-to-end with ECR scanning, replication, and immutability.


Security · All domains · High Availability

Practice these questions → · Timed practice on ExamRoll.io →

Pass the whole exam — not just this question

You found this answer. Get every verified question and explanation in one place, and save hours of prep. Free to start.

Pass your exam →

Browse Amazon →

Related guides

All-in-one access

One subscription. Every exam.

Every plan unlocks unlimited answer search, practice tests, AI explanations, and the full resource library — in 20+ languages.

Monthly
24.87
Just €0.83/day
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

Best value
12 months
179.87
Just €0.49/daySave 40%
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

✓ Free plan included · ✓ Cancel anytime · ✓ All plans unlock the full product