Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

359
Visualizações
Can we mount EFS on AWS ECS docker container?

I have an ECS instance on which my docker containers are running. I want to mount EFS on docker container which is running on ECS. Is it possible then how?

I am able to mount EFS on ECS instance but not on docker container which is running on ECS.

EFS is with direct connect & able to telnet it on 2049 port from docker.

mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 X.X.X.X:/ /efs

Error is :- mount.nfs4: Operation not permitted

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Update; Jan 17 2020 - Preview ECS/EFS Support

On January 17 2020 AWS announced an preview for ECS support for EFS. It is important to note that this is currently a preview release; see information on what that means in the configuration documentation.

Instead of defining volumes and all of their connection parameters, you may simply define the new EFSVolumeConfiguration object.

"EFSVolumeConfiguration": {
  "fileSystemId": "fs-xxxxxx",
  "rootDirectory": "/mnt/volume/path"
}

Original Answer

As of August 2018, with docker volume support, you can now mount NFS shares directly into an ECS container.

The documentation which is available currently does not detail how to use EFS with ECS via docker volume, however it is possible.

Configuring the docker volume

First, include a volumes section in your task configuration similar to the following:

"volumes": [
   {
     "name": "efs",
     "host": null,
     "dockerVolumeConfiguration": {
       "autoprovision": null,
       "labels": null,
       "scope": "task",
       "driver": "local",
       "driverOpts": {
         "type": "nfs",
         "device": ":/",
         "o": "addr=<fs-id>.efs.us-east-1.amazonaws.com,nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport"
       }
     }
   }
]

Ensure that you update the addr parameter inside the o option to match your EFS filesystem's DNS name.

Then, include this volume in a mount in one of your container definitions. For more information on the syntax, see Docker Volumes.

"containerDefinitions": [
    {
        "mountPoints": [
            {
                "sourceVolume": "efs",
                "containerPath": "/path/to/mount_volume",
                "readOnly": false
            }
        ]
    }
]

The configuration options being used for the NFS connection are the ones recommended at time of writing by AWS for Mounting EFS filesystems.

over 4 years ago · Santiago Trujillo Relatório

0

It should part of your task definition, you need to add the volumes in the task definition and then refer it in the source volume option, here is a tutorial from AWS.

https://aws.amazon.com/blogs/compute/using-amazon-efs-to-persist-data-from-amazon-ecs-containers/

  "volumes": [
    {
      "name": "efs",
      "host": {
        "sourcePath": "/mnt/efs/mysql"
      }
    }
  ]
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda