Jeff’s Note #
Unlike generic exam dumps, ADH analyzes this scenario through the lens of a Real-World Lead Developer.
For DVA-C02 candidates, the confusion often lies in choosing between ephemeral container storage and persistent shared storage for Fargate tasks. In production, this is about knowing exactly which AWS services support persistent, sharable storage across ephemeral Fargate containers without data loss on termination. Let’s drill down.
The Certification Drill (Simulated Question) #
Scenario #
CloudWave Solutions is building a microservices-based web application running on Amazon ECS with AWS Fargate. Their platform uses Docker containers based on the latest Ubuntu image. Several ECS tasks run simultaneously and need to read and write configuration and runtime data during processing. Crucially, this data must persist beyond the lifetime of any individual container task and be shared among all running tasks.
The Requirement: #
Design a storage solution for the ECS tasks that supports persistent, shared access to application data even after containers stop or restart.
The Options #
- A) Attach an Amazon FSx for Windows File Server volume to the container definition.
- B) Specify the DockerVolumeConfiguration parameter in the ECS task definition to attach a Docker volume.
- C) Create an Amazon Elastic File System (Amazon EFS) file system. Specify the mountPoints attribute and the efsVolumeConfiguration attribute in the ECS task definition.
- D) Create an Amazon Elastic Block Store (Amazon EBS) volume. Specify the mount point configuration in the ECS task definition.
Google adsense #
leave a comment:
Correct Answer #
C
Quick Insight: The Developer Imperative #
Fargate tasks are ephemeral by design and cannot directly attach block storage like EBS volumes, which are limited to EC2 instance mounts. Docker volumes configured locally are tied to the lifecycle of the container and cannot be shared across tasks. Amazon EFS is natively supported for ECS Fargate to provide scalable, persistent, and shared storage using standard POSIX semantics.
Content Locked: The Expert Analysis #
You’ve identified the answer. But do you know the implementation details that separate a Junior from a Senior?
The Expert’s Analysis #
Correct Answer #
Option C
The Winning Logic #
Amazon EFS is the only fully managed NFS file system supported for use with Fargate tasks, allowing multiple tasks to mount the same file system simultaneously. This fulfills the requirement for persistent, shared data accessible across multiple ECS tasks and survives container termination or replacement. In the ECS task definition, specifying the efsVolumeConfiguration alongside mountPoints enables mounting this persistent storage into containers at runtime.
The Trap (Distractor Analysis): #
- Why not A?
FSx for Windows File Server volumes require Windows-based containers; the question states Ubuntu containers. Also, FSx is not supported with Fargate. - Why not B?
Docker volumes viaDockerVolumeConfigurationare ephemeral and scoped to the container instance, not sharable or persistent beyond the task lifecycle, especially in Fargate’s serverless compute environment. - Why not D?
EBS volumes cannot be attached to Fargate tasks because Fargate abstracts away the underlying EC2 hosts and does not support direct block storage mounts. EBS volumes are only attachable to EC2 instances.
The Technical Blueprint #
# Example ECS task definition snippet for mounting an EFS file system on Fargate
{
"family": "my-fargate-task",
"executionRoleArn": "arn:aws:iam::123456789012:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"containerDefinitions": [
{
"name": "app-container",
"image": "ubuntu:latest",
"mountPoints": [
{
"sourceVolume": "efs-volume",
"containerPath": "/mnt/data"
}
],
...
}
],
"volumes": [
{
"name": "efs-volume",
"efsVolumeConfiguration": {
"fileSystemId": "fs-12345678",
"rootDirectory": "/",
"transitEncryption": "ENABLED"
}
}
],
"requiresCompatibilities": ["FARGATE"],
"cpu": "256",
"memory": "512"
}
The Comparative Analysis #
| Option | API / ECS Support | Persistence | Shared Access Across Tasks | Fargate Compatible | Notes |
|---|---|---|---|---|---|
| A. FSx for Windows File Server | No support for Linux containers | Yes, persistent | Yes | No | Windows only, no Fargate support |
| B. DockerVolumeConfiguration | Yes, but local to container | No | No | Yes | Ephemeral storage per task |
| C. Amazon EFS | Fully supported | Yes | Yes | Yes | Best fit for persistent and shared data on Fargate |
| D. Amazon EBS | EC2 only | Yes | No | No | Not supported with Fargate |
Real-World Application (Practitioner Insight) #
Exam Rule #
For the exam, always pick Amazon EFS when Fargate tasks need persistent, shared storage.
Real World #
In real-world applications, while EFS adds some latency versus local storage, it provides the only scalable and persistent multi-task storage solution compatible with Fargate’s serverless compute model.
(CTA) Stop Guessing, Start Mastering #
Disclaimer
This is a study note based on simulated scenarios for the AWS DVA-C02 exam.