Startup of ECS Fargate task fails with ResourceInitializationError mount.nfs4 Connection timed out
Underlying reason:

The ECS service's network access security group did not have permission to access EFS.

Solution:

Add an inbound rule for type NFS in the security group as described in this tutorial: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/tutorial-efs-volumes.html#efs-security-group