<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Lattice on Colin Barker</title>
        <link>https://colinbarker.me.uk/tags/lattice/</link>
        <description>Recent content in Lattice on Colin Barker</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-gb</language>
        <lastBuildDate>Mon, 12 May 2025 21:22:15 +0000</lastBuildDate><atom:link href="https://colinbarker.me.uk/tags/lattice/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>AWS VPC Lattice and cross account EFS access</title>
        <link>https://colinbarker.me.uk/blog/2025-05-12-aws-vpc-lattice-with-efs/</link>
        <pubDate>Mon, 12 May 2025 21:22:15 +0000</pubDate>
        
        <guid>https://colinbarker.me.uk/blog/2025-05-12-aws-vpc-lattice-with-efs/</guid>
        <description>&lt;img src="https://static.colinbarker.me.uk/img/blog/2025/05/conny-schneider-xuTJZ7uD7PI-unsplash.jpg" alt="Featured image of post AWS VPC Lattice and cross account EFS access" /&gt;&lt;blockquote&gt;
&lt;p&gt;Header photo by &lt;a class=&#34;link&#34; href=&#34;https://unsplash.com/@choys_?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Conny Schneider&lt;/a&gt; on &lt;a class=&#34;link&#34; href=&#34;https://unsplash.com/photos/a-blue-background-with-lines-and-dots-xuTJZ7uD7PI?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Unsplash&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;the-scenario&#34;&gt;The scenario
&lt;/h2&gt;&lt;p&gt;I always had a feeling VPC Lattice would prove to be a very interesting product, but when it first was released it was very limiting. The inter-application capabilities always had a place in people&amp;rsquo;s own architectural designs but it never really got on my radar. When AWS announced &lt;a class=&#34;link&#34; href=&#34;https://aws.amazon.com/about-aws/whats-new/2024/12/vpc-lattice-tcp-vpc-resources/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;VPC Resources for VPC Lattice&lt;/a&gt;, this opened up a lot of doors that had previously been shut.&lt;/p&gt;
&lt;p&gt;Lets take for example, the &lt;a class=&#34;link&#34; href=&#34;https://docs.aws.amazon.com/efs/latest/ug/whatisefs.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Elastic File System (EFS)&lt;/a&gt; service that AWS offer. There are multiple ways to share EFS across accounts, but they all require a level of direct networking access. For example, &lt;a class=&#34;link&#34; href=&#34;https://docs.aws.amazon.com/efs/latest/ug/mount-fs-diff-account-same-vpc.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Shared VPCs&lt;/a&gt; can be really handy to ensure that you continue to control the networking configuration, while allowing access to everyone on the same flat network. &lt;a class=&#34;link&#34; href=&#34;https://docs.aws.amazon.com/efs/latest/ug/efs-different-vpc.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;VPC Peering or Transit Gateways&lt;/a&gt; offered a chance to allow separate networks connectivity, allowing the shared responsibilities of the network configuration. However, what if you couldn&amp;rsquo;t connect the two networks in this way, what if you had a requirement to ensure the two accounts didn&amp;rsquo;t have direct network access.&lt;/p&gt;



  
    
    
    
  
  
  
  
  
  
  
  &lt;figure&gt;
    &lt;a data-fancybox=&#34;gallery&#34; href=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-diagram-1-not-possilbe.jpg&#34; data-caption=&#34;Currently this isn&amp;#39;t possible&#34;&gt;&lt;img src=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-diagram-1-not-possilbe.jpg&#34;&gt;&lt;/a&gt;
    &lt;figcaption&gt;Currently this isn&amp;#39;t possible&lt;/figcaption&gt;
  &lt;/figure&gt;


&lt;p&gt;At this point, I wanted to see. Would it be possible to use VPC Lattice to mount an EFS storage share across two AWS accounts that had no direct networking capability.&lt;/p&gt;
&lt;h2 id=&#34;the-setup&#34;&gt;The Setup
&lt;/h2&gt;&lt;p&gt;I initially had to find two AWS accounts, in my test setup, I was able to do this within my AWS Organisation, and have two accounts, in this instance we will call them Account A and Account B.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;⚠️ Make sure that you have all features enabled at the AWS Organisations level (or Resource Access Manager as a minimum). Additionally, when building up this test, make sure that in both accounts the private subnet use the same Availiabilty Zone, including the ID - for example: &lt;code&gt;euw2-az2 (eu-west-2a)&lt;/code&gt; for Account A and B.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Account A would contain:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A VPC with a private only subnet (10.0.0.0/24), with DNS hostnames and DNS resolutions enabled&lt;/li&gt;
&lt;li&gt;EFS setup attached to the private subnet&lt;/li&gt;
&lt;li&gt;For testing an EC2 Instance Connect endpoint, that will allow me access to an EC2 instance&lt;/li&gt;
&lt;li&gt;For testing an EC2 instance to prove that the EFS file system can mount internally, and we can write files&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Account B would contain:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A VPC with another private only subnet (10.1.1.0/24), with DNS hostnames and DNS resolutions enabled&lt;/li&gt;
&lt;li&gt;EC2 Instance Connect endpoint, that will allow me access to an EC2 instance&lt;/li&gt;
&lt;li&gt;For testing an EC2 instance to prove that the EFS file system can mount cross account, and we can write files&lt;/li&gt;
&lt;/ul&gt;



  
    
    
    
  
  
  
  
  
  
  
  &lt;figure&gt;
    &lt;a data-fancybox=&#34;gallery&#34; href=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-diagram-2-setup.jpg&#34; data-caption=&#34;Our basic setup&#34;&gt;&lt;img src=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-diagram-2-setup.jpg&#34;&gt;&lt;/a&gt;
    &lt;figcaption&gt;Our basic setup&lt;/figcaption&gt;
  &lt;/figure&gt;


&lt;p&gt;For the benefit of my testing, I will be using pretty much open security groups however, as I will show, you can use your own security systems on this, so long as you leave the right ports open.&lt;/p&gt;
&lt;p&gt;To get started, I mounted the EFS volume onto my local Account A EC2 instance, and make sure I could write a file.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;✅ Did you know, that you can mount the EFS file system at EC2 instance creation through the launch wizard? It also automatically creates the security groups to allow the connection too. &lt;a class=&#34;link&#34; href=&#34;https://aws.amazon.com/blogs/storage/automate-mounting-amazon-efs-file-systems-from-the-ec2-launch-instance-wizard/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Click here for more information&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;configuration-of-the-vpc-resource-gateway&#34;&gt;Configuration of the VPC Resource Gateway
&lt;/h2&gt;&lt;p&gt;Before we start, we must have a security group that will allow access inbound to the NFS port, &lt;code&gt;TCP/2049&lt;/code&gt; as the Resource Gateway needs to be able to connect to the EFS mount! With the wizard used to create the EC2 instance in Account A, this security group already existed so that I could use this. Make sure to check that you have this security group before you start, otherwise you will have accessibility issues.&lt;/p&gt;
&lt;blockquote&gt;
    &lt;p&gt;A resource gateway is a point of inbound traffic into the VPC where a resource resides.&lt;/p&gt;&lt;span class=&#34;cite&#34;&gt;&lt;span&gt;― &lt;/span&gt;&lt;span&gt;AWS, &lt;/span&gt;&lt;a href=&#34;https://docs.aws.amazon.com/vpc/latest/privatelink/resource-gateway.html&#34;&gt;&lt;cite&gt;AWS Documentation&lt;/cite&gt;&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;p&gt;Keeping in mind the direction of travel, this gateway is the entrypoint from the wider world into your VPC.&lt;/p&gt;
&lt;p&gt;If you are using the AWS CLI, you can use the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;aws vpc-lattice create-resource-gateway \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --name &amp;#34;account-a-efs-resource-gateway&amp;#34; \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --vpc-identifier {{YOUR VPC ID FOR ACCOUNT-A}}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --subnet-ids {{YOUR SUBNET ID THAT CONTAINS YOUR EFS MOUNT }}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --security-group-ids {{SECURITY GROUP ID THAT ALLOWS INBOUND NFS ACCESS}}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;


  
    
    
    
  
  
  
  
  
  
  
  &lt;figure&gt;
    &lt;a data-fancybox=&#34;gallery&#34; href=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-1-resource-gateway-creation.png&#34; data-caption=&#34;AWS Console for the Resource Gateway creation&#34;&gt;&lt;img src=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-1-resource-gateway-creation.png&#34;&gt;&lt;/a&gt;
    &lt;figcaption&gt;AWS Console for the Resource Gateway creation&lt;/figcaption&gt;
  &lt;/figure&gt;


&lt;p&gt;The Resource Gateway should appear up very quickly, and we can move onto the Resource Configuration&lt;/p&gt;
&lt;h2 id=&#34;configuration-of-the-resource-configuration&#34;&gt;Configuration of the Resource Configuration
&lt;/h2&gt;&lt;p&gt;Unlike other resources, it isn&amp;rsquo;t possible to select the EFS mount within the configuration, but there are a number of ways. If you have set up your own DNS record for the EFS mount, it will be possible to use this. In my example, I am going to use the direct IP for the EFS mount. A simple &lt;code&gt;host&lt;/code&gt; command on the box using the DNS name for EFS within the VPC gave me the IP for the EFS mount.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[ec2-user@ip-10-0-0-29 fs1]$ host fs-0e0f5e4c3c04a7d58.efs.eu-west-2.amazonaws.com
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;fs-0e0f5e4c3c04a7d58.efs.eu-west-2.amazonaws.com has address 10.0.0.21
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;I can use the IP &lt;code&gt;10.0.0.21&lt;/code&gt; in my Resource Configuration.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;⚠️ This is not an ideal setup, but for demonstration this works just as well. Make sure that in production you use a service such as Route53 to cover private DNS records within a private zone&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you are using the AWS CLI, you can yse the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-zed&#34; data-lang=&#34;zed&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;aws&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;vpc&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;lattice&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;resource&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;configuration&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;account&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;efs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;nfs&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;rc&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SINGLE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;resource&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;gateway&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;identifier&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;THE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;RESOURCE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;GATEWAY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ID&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;resource&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;configuration&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;definition&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ipResource&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ipAddress&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;21&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;port&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ranges&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;&amp;#34;2049&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;protocol&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TCP&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;allow&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;association&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;to&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;shareable&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;service&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;network&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s run through some of the options here, the type &amp;ldquo;SINGLE&amp;rdquo; comes from a choice between a single Resource or a Resource Group. As we are not using a Resource Group, and connecting directly to a single resource (the IP of the EFS mount), we can use SINGLE.&lt;/p&gt;
&lt;p&gt;The resource configuration definition is where we can define where the resource is within the network. Through the user interface this is a little easier to select, but here we are saying that the &lt;code&gt;ipResource&lt;/code&gt; is the &lt;code&gt;ipAddress&lt;/code&gt; of our EFS IP &lt;code&gt;10.0.0.21&lt;/code&gt;. Make sure to replace this IP with your IP!&lt;/p&gt;
&lt;p&gt;Port ranges and the protocol lock the configuration to pointing to that particular port, as this is the only port that is needed for NFS.&lt;/p&gt;
&lt;p&gt;Below is a screenshot of the resource configuration page from the console&lt;/p&gt;



  
    
    
    
  
  
  
  
  
  
  
  &lt;figure&gt;
    &lt;a data-fancybox=&#34;gallery&#34; href=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-2-resource-configuration.png&#34; data-caption=&#34;AWS Console for the Resource Configuration creation&#34;&gt;&lt;img src=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-2-resource-configuration.png&#34;&gt;&lt;/a&gt;
    &lt;figcaption&gt;AWS Console for the Resource Configuration creation&lt;/figcaption&gt;
  &lt;/figure&gt;


&lt;h2 id=&#34;configuration-of-the-service-network&#34;&gt;Configuration of the Service Network
&lt;/h2&gt;&lt;p&gt;The next part of the journey is to create a Service Network within the VPC Lattice.&lt;/p&gt;
&lt;blockquote&gt;
    &lt;p&gt;A service network is a logical boundary for a collection of services and resource configurations. Services and resource configurations associated with the network can be authorized for discovery, connectivity, accessibility, and observability&lt;/p&gt;&lt;span class=&#34;cite&#34;&gt;&lt;span&gt;― &lt;/span&gt;&lt;span&gt;AWS, &lt;/span&gt;&lt;a href=&#34;https://docs.aws.amazon.com/vpc-lattice/latest/ug/service-networks.html&#34;&gt;&lt;cite&gt;AWS Documentation&lt;/cite&gt;&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;p&gt;This Service Network will be used to associate our Resource Configuration to, and therefore allow access to the wider world to our EFS mount. This can be done very simply with the AWS CLI, or the console:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;aws vpc-lattice create-service-network \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --name &amp;#34;account-a-service-network&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;aws vpc-lattice create-service-network-resource-association \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --service-network-identifier {{SERVICE NETWORK ID FROM ABOVE}} \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --resource-configuration-identifier {{RESOURCE CONFIG ID FROM ABOVE}}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This can be done in a single step from the console, which you can see below. do make sure that the default is used for the &amp;ldquo;Share service network&amp;rdquo;, to allow sharing through AWS RAM!&lt;/p&gt;



  
    
    
    
  
  
  
  
  
  
  
  &lt;figure&gt;
    &lt;a data-fancybox=&#34;gallery&#34; href=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-3-service-network.png&#34; data-caption=&#34;AWS Console for the Service Network creation&#34;&gt;&lt;img src=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-3-service-network.png&#34;&gt;&lt;/a&gt;
    &lt;figcaption&gt;AWS Console for the Service Network creation&lt;/figcaption&gt;
  &lt;/figure&gt;


&lt;h2 id=&#34;share-the-resource-configuration-using-aws-ram&#34;&gt;Share the Resource Configuration using AWS RAM
&lt;/h2&gt;&lt;p&gt;One of the great features of AWS Organisations is the ability to share resources across multiple AWS accounts or even whole OUs. This feature can allow for a must faster distribution of sharing, privately, and securely without a lot of configuration. For example, our EFS mount point could be made available to many hundreds of accounts, without ever needing to setup networking connectivity between all of the VPCs. However, in our setup, I am specifically going to select one account within the organisation!&lt;/p&gt;
&lt;blockquote&gt;
    &lt;p&gt;AWS Resource Access Manager (AWS RAM) helps you securely share your resources across AWS accounts, within your organization or organizational units (OUs), and with AWS Identity and Access Management (IAM) roles and users for supported resource types&lt;/p&gt;&lt;span class=&#34;cite&#34;&gt;&lt;span&gt;― &lt;/span&gt;&lt;span&gt;AWS, &lt;/span&gt;&lt;a href=&#34;https://docs.aws.amazon.com/ram/latest/userguide/what-is.html&#34;&gt;&lt;cite&gt;AWS Documentation&lt;/cite&gt;&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;p&gt;However, during my testing, and using a whole load of Google Searches, I found that there are two ways to get this shared. You can either share the Resource Configuration directly, or Share the VPC Lattice Service Network. This will completely depends on your exact setup, the single resource share means you can be very specific that you are sharing one resource. You can create the VPC Endpoint within the Account B&amp;rsquo;s VPC and you will have direct access. Sharing the Service Network as well, means you can connect to multiple services within the Lattice, handy for wider options around sharing multiple services between AWS accounts. While I am going to show how to setup the Service Network Share here, I am also going to show the Resource Configuration option, as this is the one I have been using for my testing.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;aws ram create-resource-share \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --name &amp;#34;account-a-vpc-lattice-share&amp;#34; \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --resource-arns {{SERVICE NETWORK ARN OR RESOURCE CONFIG ID}} \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --principals {{ACCOUNT B ACCOUNT ID}}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;


  
    
    
    
  
  
  
  
  
  
  
  &lt;figure&gt;
    &lt;a data-fancybox=&#34;gallery&#34; href=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-4a-ram-share-resource-config.png&#34; data-caption=&#34;RAM Share the AWS Resource Configuration&#34;&gt;&lt;img src=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-4a-ram-share-resource-config.png&#34;&gt;&lt;/a&gt;
    &lt;figcaption&gt;RAM Share the AWS Resource Configuration&lt;/figcaption&gt;
  &lt;/figure&gt;





  
    
    
    
  
  
  
  
  
  
  
  &lt;figure&gt;
    &lt;a data-fancybox=&#34;gallery&#34; href=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-4b-ram-share.png&#34; data-caption=&#34;Setting the correct Principals for the share&#34;&gt;&lt;img src=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-4b-ram-share.png&#34;&gt;&lt;/a&gt;
    &lt;figcaption&gt;Setting the correct Principals for the share&lt;/figcaption&gt;
  &lt;/figure&gt;

&lt;/p&gt;
&lt;h2 id=&#34;configuration-of-account-b-and-the-vpc-endpoint&#34;&gt;Configuration of Account B and the VPC Endpoint
&lt;/h2&gt;&lt;p&gt;At this point, we are pretty much done with Account A, we now need to move onto Account B. With the RAM share in place, this would have been automatically accepted in Account B, and will be visible within the console.&lt;/p&gt;



  
    
    
    
  
  
  
  
  
  
  
  &lt;figure&gt;
    &lt;a data-fancybox=&#34;gallery&#34; href=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-5-resource-configurations.png&#34; data-caption=&#34;The Resource Configuration in Account B&#34;&gt;&lt;img src=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-5-resource-configurations.png&#34;&gt;&lt;/a&gt;
    &lt;figcaption&gt;The Resource Configuration in Account B&lt;/figcaption&gt;
  &lt;/figure&gt;


&lt;p&gt;To connect to this resource configuration, you will need to setup a simple VPC Endpoint. As we will be doing this with the resource configuration the steps are slightly different, but this will get you the VPC Endpoint you. need.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;⚠️ Make sure you have an appropriate security group. With the default group that is created by the EC2 creation process, the outbound rules are always set to &lt;code&gt;0.0.0.0/0&lt;/code&gt; allow outbound, so there are not restrictions. You will need to make sure that any Security Group added to the VPC Endpoint allows outbound access to port &lt;code&gt;TCP/2049&lt;/code&gt; to access the NFS endpoint&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Creation of the VPC Endpoint through the AWS CLI is below:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;aws ec2 create-vpc-endpoint \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --vpc-id {{ACCOUNT B VPC ID}} \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --vpc-endpoint-type Resource \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --resource-configuration-arn {{THE ARN FOR THE SHARED RESOURCE CONFIGURATION}}
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --subnet-ids {{ACCOUNT B SUBNET ID}} \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --security-group-ids {{SECURITY GROUP USED FOR THE EC2 INSTANCE}} \ 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --private-dns-enabled
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;


  
    
    
    
  
  
  
  
  
  
  
  &lt;figure&gt;
    &lt;a data-fancybox=&#34;gallery&#34; href=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-6-vpc-endpoint.png&#34; data-caption=&#34;VPC Endpoint Creation in Account B&#34;&gt;&lt;img src=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-6-vpc-endpoint.png&#34;&gt;&lt;/a&gt;
    &lt;figcaption&gt;VPC Endpoint Creation in Account B&lt;/figcaption&gt;
  &lt;/figure&gt;


&lt;h2 id=&#34;lets-mount-that-efs-volume&#34;&gt;Let&amp;rsquo;s Mount that EFS Volume
&lt;/h2&gt;&lt;p&gt;This is where I had to go a little deeper in to get this to work. As DNS will not work across the account boundries, we need to come up with another solution. The VPC Endpoint, once created, will have its own Elastic Network Interface (ENI) within your VPC. This will have an IP associated with it that we can use to mount the EFS share. The frustrating element of this, is that the VPC Endpoint page in the console doesn&amp;rsquo;t actually show the IP address! I had to look for the ENI in the EC2 console for the VPC Endpoint, and I discovered that the IP of my endpoint was &lt;code&gt;10.1.1.57&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This does have a minor drawback, you need to use the IP in the mount command to be able to attach it to the EC2 instance within Account B. I would always recommend that you setup your own Route53 Private Zone that you can use to a record to the VPC Endpoint, so that way you can use an internal DNS name to connect. One solution I have for multiple accounts, is to make the DNS record privately the same across all the AWS accounts, and then your scripts that you use to mount the EFS volume can stay the same. It&amp;rsquo;s one of many solutions, but continuing forward, I am going to use the direct IP.&lt;/p&gt;
&lt;p&gt;Before I break this down, here is the command to enter in on the EC2 instance in Account B&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;# Create the directory first
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo mkdir -p /mnt/efs/fs1
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;# Mount the EFS share though the VPC Endpoint
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo mount -t nfs4 \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  10.1.1.57:/ \
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  /mnt/efs/fs1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Most of this is pretty simple, its using the mount command to attach to the IP&amp;rsquo;s root share, to the newly created directory. However, the &lt;code&gt;-o&lt;/code&gt; has a number of options which are key to ensure the success of this test!&lt;/p&gt;
&lt;p&gt;&lt;code&gt;nfsvers=4.1&lt;/code&gt;: This ensures that the NFS client does not try for a lower version of NFS. Parallel NFS, and Sessions were added in the new version of the NFS protocol, which allow for a faster level of recovery. AWS have built EFS using the 4.1 standard, which could break over the VPC Lattice&lt;/p&gt;
&lt;p&gt;&lt;code&gt;rsize=1048576,wsize=1048579&lt;/code&gt;: This is the read AND write side maximum number of bytes that the NFS client will request from the server (1MB). With the VPC Lattice, there are a lot more hops which can induce a level of latency which isn&amp;rsquo;t seen in a local network setup. Trying to push the maximum amount of data in one go means there is less time going backwards and forwards to get data.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;hard&lt;/code&gt;: Standard NFS option for mounts on NFS, in this case &lt;code&gt;hard&lt;/code&gt; means that the application will block and wait before resuming transparently. Soft can be used, but in an I/O issue, it will just return an error to the application that can cause issues. This needs to be set based on your requirements, &lt;code&gt;soft&lt;/code&gt; can have unintended outcomes, but also fix issues that your application might have. In our case, we have used &lt;code&gt;hard&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;timeo=600&lt;/code&gt;: This timeout is based in &lt;em&gt;tenths of a second&lt;/em&gt; not seconds, that is used by the NFS client to know how long to wait before retrying a request. In this case, this is actually 60 seconds. With the additional hops over the VPC Lattice, a larger timeout would be better, to ensure the returning traffic had time to navigate the Lattice.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;retrans=2&lt;/code&gt;: Number of times that the NFS client will retry a request within the timeout window. Like the above, you need to understand your network and application to set the right figure. Where I am not bothered with speed, I tend to increase this, whereby if I am sensitive to time, I usually reduce this down.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;noresvport&lt;/code&gt;: This setting is ultimately key for the VPC Lattice setup, as mentioned before we have only opened up the NFS port on &lt;code&gt;2049&lt;/code&gt; to be allowed to connect. By default, the NFS client will attempt to use a source port within the reserved port space (below &lt;code&gt;1024&lt;/code&gt;), that only the &lt;code&gt;root&lt;/code&gt; account can bind to, a legacy reason that allowed the server to know that the it was a connection from a &lt;code&gt;root&lt;/code&gt; account. This is specifically called out in the &lt;a class=&#34;link&#34; href=&#34;https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-nfs-mount-settings.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;EFS AWS Documentation&lt;/a&gt; to ensure a faster reconnection of network recovery after an event.&lt;/p&gt;
&lt;h2 id=&#34;checking-it-has-worked&#34;&gt;Checking it has worked
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[ec2-user@ip-10-1-1-60 ~]$ cd /mnt/efs/fs1
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[ec2-user@ip-10-1-1-60 fs1]$ ls
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;shared-file-written-account-a.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[ec2-user@ip-10-1-1-60 fs1]$ cat shared-file-written-account-a.txt 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;This is a shared file
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If all has gone to plan, I can see a file I put in the EFS mount point, I can also add my own file and watch it go the other way!&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;# EC2 instance in Account B
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[root@ip-10-1-1-60 fs1]# echo &amp;#34;It&amp;#39;s working&amp;#34; &amp;gt; shared-file-written-account-b.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;# EC2 instance in Account A
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[root@ip-10-0-0-29 fs1]# cat shared-file-written-account-b.txt 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;It&amp;#39;s working
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;architecture-diagram&#34;&gt;Architecture Diagram
&lt;/h2&gt;


  
    
    
    
  
  
  
  
  
  
  
  &lt;figure&gt;
    &lt;a data-fancybox=&#34;gallery&#34; href=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-diagram-2-final.jpg&#34; data-caption=&#34;How this all links together&#34;&gt;&lt;img src=&#34;https://static.colinbarker.me.uk/img/blog/2025/05/aws-vpc-lattice-diagram-2-final.jpg&#34;&gt;&lt;/a&gt;
    &lt;figcaption&gt;How this all links together&lt;/figcaption&gt;
  &lt;/figure&gt;


&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;While the final step feels a little custom in how you would mount the EFS mount, noting that it isn&amp;rsquo;t possible using the EFS utilities, it can be used to securely mount an EFS volume from one account to another, without any level of networking access. Additionally, overlapping IP&amp;rsquo;s can be an issue as well, which brings it back to where VPC Private Endpoints helped in the past too.&lt;/p&gt;
&lt;p&gt;Do note that my testing is specifically for a single AZ with little security built in, but along the way it is possible to add the right level of security that you see fit!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: Images have been updated to show the latest console changes&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
