- Newest
- Most votes
- Most comments
Use Amazon Elastic File System (EFS) as shared network storage between your Windows EC2 instances as one possible solution to your problem. EFS is a scalable, highly available, and fully managed file storage service that supports NFSv4 and SMB protocols, making it an excellent choice for your needs.
To use EFS with your Windows EC2 instances, use the SMB protocol to mount the file system, which allows you to access the file system via UNC paths or mapped drive letters. You can mount the file system during the startup process of your instances by using a PowerShell script or an instance startup script.
# Install the EFS client
Add-WindowsFeature FS-SMB1,FS-SMB2
# Mount the EFS file system
New-PSDrive -Name E -PSProvider FileSystem -Root "\\fs-01234567.efs.us-west-2.amazonaws.com\my-efs" -Persist
If you're using Active Directory then doing your original method with FSx (Or your own managed file server) would be the right option. To get over the computers not joining the domain correctly you may want to take a look at : https://catalog.us-east-1.prod.workshops.aws/workshops/ace21ec3-c22b-484d-8e0d-4b497eadfc66/en-US/1-managing-microsoft-workloads-at-scale-on-aws/scalingmanagement Which can help you step through setting up how to leverage lifecycle hooks of the EC2 instance to take a fresh AMI and join it to the domain for you. This way you don't have to implement less secure protocols to use SMBv2-SMBv2 protocols for EFS, which is not designed to be used on Windows systems.
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
Thank you, I will try this out. Just to be clear though, the EFS documentation states it is not supported on Windows EC2s so I assume this is a bit of an "unofficial" solution. Are there any caveats you are aware of that I should know?
This would not be the recommended way to do this. It introduces less secure connection protocols for Windows.