Unable to Share Data between Amazon EC2 Instances for Windows

I found the answer to my own query, and here it is:

Theory:

This can be found at this Microsoft knowledgebase article which deals with the ways to enable Microsoft file sharing SMB. The below matter is of relevance:

The following ports are associated with file sharing and server message block (SMB) communications:

  • Microsoft file sharing SMB: User Datagram Protocol (UDP) ports from 135 through 139 and Transmission Control Protocol (TCP) ports from 135 through 139.
  • Direct-hosted SMB traffic without a network basic input/output system (NetBIOS): port 445 (TCP and UPD).

How to do it:

  1. Enable the above ports in the security group associated with your EC2 Instance. Once you have done this, your Security Group Permissions should look something like the image below: EC2 Security Group Permissions

  2. Enable the ports in the windows firewalls of both the instances. A detailed method to do so can be found here. Skip step 7 for Windows Server.

This solves the issue, however, a restart of the instances might be needed.


Here's the order in which I would check things:

  1. File and printer sharing is enabled on the network adapter
  2. all crucial services are running
  3. all necessary ports are open on both firewalls
  4. Check the application and system event logs for other clues
  5. Make sure there is no TCP filtering set on the network adapter.

If you are using a Sonicwall, just make sure Netbios is enabled on your VPN interfaces. Otherwise, you will see the share but you won't be able to access it, etc.