Read this once before attempting the quiz. These are the key facts repeatedly tested in AWS Developer Associate (DVA-C02). The uploaded quiz also includes a few questions from other services (ElastiCache, SQS, KMS, Secrets Manager, etc.), but the ECS/EKS-specific concepts are summarized below. fileciteturn0file0
Remember
You manage:
Best for:
AWS manages:
Best for:
Task Definition is the blueprint of a container.
Contains:
Never hardcode secrets.
Use:
Task Definition supports:
environmentsecretsSecrets are injected as environment variables during task startup.
Each ECS Task can have its own IAM Role.
Best practice:
One service → One IAM Role
Example:
Service A
Service B
This follows Least Privilege.
Never attach one huge IAM role for every service.
Multiple containers in the same ECS Task can share files.
Use:
Task-level shared volume (bind mount)
Useful for:
Lost when task stops.
Good for:
Persistent
Shared
Survives task restart
Works across multiple tasks
Supports ECS Fargate.
Remember:
Persistent filesystem = EFS
Object storage
Not a filesystem
Cannot be mounted like Linux storage.
Persistent block storage
Supported for EC2.
Not directly attached to Fargate tasks.
Important settings:
Number of tasks you want running.
Example:
Desired = 4
Minimum tasks that must stay running.
Example:
50%
At least 2 tasks remain healthy.
Maximum tasks allowed during deployment.
Example:
200%
Desired = 4
Maximum tasks = 8
ECS can start all 4 new tasks first.
After health checks pass,
Old tasks are removed.
Result:
Fast deployment
No downtime
Uses:
AWS CodeDeploy
Deployment creates:
Blue = old tasks
Green = new tasks
Traffic shifts to Green.
If everything succeeds:
Blue tasks are terminated.
Controls:
How long old Blue tasks remain after traffic moves.
Useful for:
Standard CloudWatch metrics are limited.
Enable:
CloudWatch Container Insights
Provides:
Very common exam question.
Very common interview and exam topic.
Exit Code:
137
Means:
SIGKILL
Usually:
Out Of Memory (OOM)
Solution:
Increase task memory.
Check:
Container Insights
Stopped Task Reason
Stores Docker images.
Enable:
Scan on Push
Automatically scans images for vulnerabilities.
Uses:
Amazon Inspector engine.
No additional tools required.
If CodeBuild uses a private ECR image:
Its IAM Service Role needs:
No docker login required.
Single-container Docker deployment uses:
Dockerrun.aws.json
Defines:
Containers inside the same task can communicate easily.
Containers in different tasks use networking/service discovery.
Maintains desired number of running tasks.
If one task crashes,
ECS automatically launches another.
One running instance of a container.
Keeps tasks running continuously.
EKS manages:
Kubernetes Control Plane.
You manage:
Worker Nodes (unless using Fargate).
Uses:
Choose EKS only if Kubernetes is required.
| If you see... | Think... |
|---|---|
| No servers to manage | Fargate |
| Kubernetes | EKS |
| AWS native containers | ECS |
| Persistent shared filesystem | EFS |
| Secret injection | Secrets Manager / SSM Parameter Store |
| Different permissions per microservice | IAM Task Role |
| Rolling deployment | Minimum Healthy % + Maximum % |
| Blue/Green | CodeDeploy |
| Container metrics | CloudWatch Container Insights |
| Docker image repository | ECR |
| Automatic image vulnerability scan | Scan on Push |
| Exit Code 137 | Out Of Memory (OOM) |
| Shared directory between containers | Task-level shared volume |
| Single-container Elastic Beanstalk | Dockerrun.aws.json |