Turns out you needed to open port 2049 inbound on the security group on the network interface and task definition. It was not automatically setup even though I had it create the security group for me.
Thanks for the problem and the solution. I was trying to figure it out for last 2 days.
For anyone who still facing this error.
Ensure the following configurations:
- Security group: add an inbound rule to with type NFS and port 2049
- Subnet: Ensure your network is able to connect to your EFS. you could check detail in EFS's networking
I am new to ECS and Fargate, so I am probably missing something simple.
My task shows the error message in the OP. The inbound rule for the security group associated with the EFS device says:
NFS,TCP,2049,<another security group ID>.
I think that's correct.
I checked the Networking details for that EFS. It lists a Mount Target ID, Subnet ID, it's Available, and has an ENI and SG. How can I ensure that the network is "able to connect to the EFS"?
Fargate EFS Issue: ResourceInitializationError: failed to invoke EFS utilsasked 2 years ago
failed to invoke EFS utils commands to set up EFS volumes: stderr: Failed to resolve "fs-03ec98cf2f1d81580.efs.us-east-1.amazonaws.com"Accepted Answerasked 8 months ago
Instance launch failed. Adding EFS security group to mount targets failed. The maximum number of security groups per interface has been reached.asked 2 months ago
ResourceInitializationError: failed to invoke EFS utils commands to set up EFS volumes: stderr: Failed to resolve "fs-file-system-id.efs.us-west-1.amazonaws.com" - check that your file system ID isasked 6 months ago
Mounting EFS on a Non Empty Directoryasked 2 months ago
EFS data transferAccepted Answerasked 4 months ago
EFS volume in Batch job running on Fargateasked 7 months ago
EC2 Task EFS mount issueasked 10 months ago
Mount options for EFS on Fargateasked 8 months ago
How to Mount an EFS in WSL2asked a year ago