Skip to content

Switch from EKS to ECS, how to deal with shared docker volumes

0

In our EKS world I use a pod with multiple container. Inside this I set a docker volume with volumes:

  • name: my-share emptyDir: {}

In each container defintion I use:

volumeMounts:

  • name: my-share mountPath: /tmp

So that all container can share /tmp . How to deal with this in ECS with a multicontainer task definition?

2 Answers
0

Hello Ognif,

A good shared storage solution in ECS is either EFS or Amazon FSx for Windows File Server, or Bind mounts. Refer this AWS Documentation for more https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html

answered 2 years ago

  • While it is a good technical solution you have to consider cost and speed. It is multiple times more expensive than EBS.

0

Hi,

You can share EBS volumes or EFS across containers in ECS: see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html

The following article details how to share some EBS volumes across the various containers of an ECS task: https://medium.com/@dipandergoyal/aws-ecs-sidecar-share-data-between-containers-16a992480cb

Best,

Didier

EXPERT

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.