Resolution: This error can occur because either the Amazon EC2 instance or the mount target security groups are not configured properly. Make sure that the mount target security group has an inbound rule that allows NFS access from the EC2 security group.
Steps to create security groups: 1. Create a security group for your EC2 instance. For Example, SecurityGroup1
- Add Inbound rules to this security group to allow SSH access on port 22. You can also restrict the source address.
2. Create a security group for your EFS mount and in this add the inbound rule for NFS. Set the source for this rule to the EC2 instance security group(SecurityGroup1) created above
3. Go to the EC2 console, and add the EC2 Security group "SecurityGroup1" to your EC2 instance.
4. Go to the EFS Console, select your EFS, go to Network and click on "Manage" and then Add the EFS Mount security group(SecurityGroup2) created above.
5. The mount command will work now.