user19205267
user19205267

Reputation: 121

Unable to access EFS from ECS Fargate task

Trying to launch a Fargate task that uses an EFS Volume.

When starting the task from ECS Console, I'm getting this error :

ResourceInitializationError: failed to invoke EFS utils commands to set up EFS volumes: stderr: Failed to resolve "fs-019a4b2d1774c5586.efs.eu-west-1.amazonaws.com" - check that your file system ID is correct, and ensure that the VPC has an EFS mount target for this file system ID. See https://docs.aws.amazon.com/console/efs/mount-dns-name for more detail. Attempting to lookup mount target ip address using botocore. Failed to import necessary dependency botocore, please install botocore first. : unsuccessful EFS utils command execution; code: 1

File system Id is correct. I've mounted the volume from an ec2 instance in the same VPC, all good.

Following steps defined here : https://aws.amazon.com/premiumsupport/knowledge-center/ecs-fargate-mount-efs-containers-tasks/?nc1=h_ls

I cannot figure out where to specify outbound rule for ECS service or task. See image

Thanks in advance.

Upvotes: 7

Views: 9577

Answers (2)

Dilip kumar
Dilip kumar

Reputation: 31

  1. Basically the ECS'S security group should allow ssh in the ingress and nfs protocol on the port 2049 to the Securitygroup of the mount target and
  2. Mount target's security group should allow nfs protocol on the 2049 port.

Upvotes: 0

user19205267
user19205267

Reputation: 121

As @MarkB stated, i've edited the outbound rule and added the port 2049 (NFS) to the EFS security group, and it's workin fine.

Upvotes: 5

Related Questions