1
votes

I'm using ECS Fargate to host containers in a service. The service is tied to the target group in order to load balance. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-task-storage.html

This link mentions one can use EFS for persistent storage. IMO EFS is slow. EBS is faster and better. But I can't find a way to share EBS volume directly or indirectly(EBS attached to EC2) with a set on containers so all containers see the same data as well as can write to it and the storage persists even after the containers die

Is there a way to have common storage for all containers on Fargate(I don't mean ECS offering where tasks are hosted on EC2)?

1

1 Answers

3
votes

There are a couple of things to unpack here: first and foremost today ECS/Fargate does not support mounting EBS volumes. This support is something we would like to introduce on but it's not available to date. Second, even though you were able to attach an EBS volume to a task, consider that EBS is block storage and so to be able to share its content with different systems (ECS/Fargate tasks in this case) you'd need to have some sort of clustered file system OR a software/logic that arbitrates access from one system only at a time. When you say EFS is slow is because you have already tested it (and did not meet your requirements) or is this an assumption?