DVA-C02 · Question #547
A developer is deploying an application on an Amazon Elastic Container Service (Amazon ECS) cluster that uses AWS Fargate. The developer is using a Docker container with an Ubuntu image. The developer
The correct answer is C. Create an Amazon Elastic File System (Amazon EFS) file system. Specify the mountPoints. Amazon EFS provides a fully managed, shared, NFS-based file system that persists independently of containers and is accessible from multiple ECS Fargate tasks simultaneously.
Question
A developer is deploying an application on an Amazon Elastic Container Service (Amazon ECS) cluster that uses AWS Fargate. The developer is using a Docker container with an Ubuntu image. The developer needs to implement a solution to store application data that is available from multiple ECS tasks. The application data must remain accessible after the container is terminated. Which solution will meet these requirements?
Options
- AAttach an Amazon FSx for Windows File Server volume to the container definition.
- BSpecify the DockerVolumeConfiguration parameter in the ECS task definition to attach a Docker
- CCreate an Amazon Elastic File System (Amazon EFS) file system. Specify the mountPoints
- DCreate an Amazon Elastic Block Store (Amazon EBS) volume. Specify the mount point
How the community answered
(63 responses)- A2% (1)
- B5% (3)
- C84% (53)
- D10% (6)
Why each option
Amazon EFS provides a fully managed, shared, NFS-based file system that persists independently of containers and is accessible from multiple ECS Fargate tasks simultaneously.
Amazon FSx for Windows File Server uses the SMB protocol and is designed for Windows workloads; it is not compatible with Ubuntu-based Linux containers.
DockerVolumeConfiguration (Docker managed volumes) is not supported in AWS Fargate launch type; it is only supported for EC2 launch type tasks.
Amazon EFS is a managed NFS file system that supports concurrent access from multiple ECS tasks running on Fargate. By specifying EFS volume configuration in the ECS task definition and using mountPoints in the container definition, data is stored durably on EFS and remains accessible even after individual containers are terminated.
Amazon EBS volumes are block storage devices that can only be attached to a single instance at a time and are not natively shareable across multiple Fargate tasks.
Concept tested: Shared persistent storage for ECS Fargate using Amazon EFS
Source: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/efs-volumes.html
Community Discussion
No community discussion yet for this question.