title: Can't resolve DNS name of EFS while mounting it on red hat ec2 instances using putty
body: <p>I am having an issue where I am unable to mount my EFS on red hat ec2 instance using the DNS names. It throws the error</p>
  <blockquote>
  <p>mount.nfs4: Failed to resolve server us-east-1a.fs-c2aXXXX.efs.us-east-1.amazon<br />
  aws.com: Name or service not known</p>
  </blockquote>
  <p>I am following the instructions provided by AWS. I tried below two ways to do it and both throw the same above error. I can confirm that the DNS names are correct.</p>
  <p>1st:</p>
  <pre><code>mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-c2aXXXX.efs.us-east-1.amazonaws.com:/ efs
  </code></pre>
  <p>2nd:</p>
  <pre><code>mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 $(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone).fs-c2a7XXXX.efs.us-east-1.amazonaws.com:/ /efs
  </code></pre>
  <p>However, if I use IP instead of DNS names, I am able to mount it just fine. So below command works.</p>
  <pre><code>mount -t nfs4 -o 
  nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport 10.38.X.XX:/ /efs
  </code></pre>
  <p>I am fine with using IP instead of DNS as long as I am able to mount it.</p>
  <p>Now my issue is as soon as I stop and start the instance again, my mount is gone. Even after I add the below entry to the <strong>/etc/fstab</strong>, it doesn't do auto mount.</p>
  <pre><code>10.38.X.XXX:/ /efs efs defaults,_netdev 0 0
  </code></pre>
  <p>Can someone please help me in either resolving the issue with DNS or tell me how to auto mount using IPs?</p>