Can't mount efs filesystem on ec2 instances following AWS Solutions Architect Associate demo

Hi Rob and co,
I’m following the EFS-Demo lecture under “Service - Storage” section of the " AWS Solutions Architect Associate " course.

I have the following setup:

1 VPC

2 subnets
1 route table for each subnet, routing traffic to IGW below
1 internet gateway

1 security group (Allows ssh port 22, NFS port 2049, All traffic on All protocol just to cover everything)

1 EC2 instance in each subnet with the security group applied:
Listing EC2- instances

Listing attached security group on ec2

1 EFS filesystem:

Showing that the efs has targets

Now when I try to mount the EFS file system on either instances I get the following errors:

or using DNS:

I made a slight modification from the lecture by including the NFS in the security group.
But I don’t see how that would have any negative effect. Besides, the allow all policy would be hit first in the order of things, I imagine.

I also rebooted the instances just incase they weren’t picking up the security group properly as I made a change after launching the instances.

Any Idea where I’ve gone wrong here?

Thanks in advance

Elvy

Hi @elvy

Please share the source information of this security group.

Hi Raymond.baoly,
Have a look at the second image from the top that is the security group.
But the command I ran is copied from AWS instruction on how to mount the efs
it differs slightly from the command used in the lecture.

I mean this one, there’s a Source column. Please take a screenshot that includes this column.

Hi Raymond,
The above prints were from an ephemeral session. I no longer have access to it.
It would save me time and a lot of hassle if you could tell me what you think the cause of the error is, that is if you have seen and troubleshooted it before.

Thank you very much for your time.

Elvy

Hi @elvy

The security group source is very important, it should be set to All or allow traffic from itself. If you open the NFS port but restrict it to a specific IP or another security group, you won’t be able to mount it.

Thanks,
I’ll check that the next time I practice EFS mounting.

Regards

Elvy