Sync data from on prem NAS to S3 and EBS file share

, ,

I have a question about the following scenario:

  1. On Prem NAS
  2. AWS storage gateway setup using Storage Volumes to backup to S3
  3. In addition to S3, make data available on an EBS volume attached to an EC2 instance (this is the Windows network file share)

In the above scenario, I’m really stumped at the EBS volume data sync part.

I know that AWS storage gateway is setup to sync on prem data to S3, and that you can create EBS snapshots to save the data. However, I would not know how to easily (in near real-time) sync the same data to an EBS volume, such that users not local to the on prem NAS can access the data..

Is their any native solution for this in the AWS console? Or is this going to be a solution requiring some custom lambda or aws cli shenanigan’s?

Have you looked at AWS DataSync? It doesn’t support EBS but EFS, which might or might not fit your needs. https://aws.amazon.com/datasync

Unfortunately, I meant EBS :frowning:

The way our company handles file sharing is:

  1. Create an EC2 instance
  2. Attach an EBS volume
  3. Share out the EBS volume over the network
  4. Attach the shared out volume to end-user’s Windows machine via network file location in File explorer

EFS is only supported by linux machines if I recall, but I see that AWS DataSync supports FSx for Windows, which may be the solution I’m looking for…

All I would need to do is migrate the data from EBS to FSx, and then figure out a way to re-map the file share for end users.

This may be what I need to start looking into. EFS won’t work in my scenario, since I’m dealing with non-linux devices, but it looks like datasync supports FSx for windows, which I could potentially migrate my data over to.

Filezilla Pro (A popular FTP program) can transfer to EFS and S3.

I recommend Filezilla > S3

EBS is essentially a hard drive that plugs into a server. The server that is plugged in will have to take the files and import them from S3. That’s some command line AWS CLI work.

Note, when transfering into AWS, there is a fee. It’s not bad, but it exists.

If you have a lot of data. Specifically over 53tb and a slow Internet connection, you may want to look into AWS Snowball.

So you already figured out sending data to S3.

From here, I’d wire an S3 Event Notification to deliver a message to SQS (probably via SNS).

Then, a simple script running on the EC2 instance to listen on the SQS queue and react to event notifications appropriately. In your case, the reaction should be to copy files from S3 to the attached EBS volume.

AWS DataSync will transfer data from on-prem to ESx, but will it sync changes originating from ESx back to on prem?

Indeed by default no, because each task you configure in the agent goes one way.
What if you use Aws storage gateway instead and move everything to s3? That way s3 is the master, but storage gateway exposes you a windows share with the bucket content. If you write on the windows share, storage gateway will move it to s3.

EDIT: looking at the diagrams and docs of DataSync it seems (I haven’t tried) you could have two tasks, one going from fsx to local and another going the other way around. But it’s anyway different from two way sync.

You can create a storage gateway that backs directly to S3 and exposes the mount as a samba share that can be mounted to ec2 instances, etc.

Had this setup for a while for a document management system. Windows Ec2 hosts connected in via network share as local mount to s3. Not the cheapest because the gateway needed a beefy cache server but worked fine.

Caveat. If files change on the s3 side and not through the gateway, the index/cache needs to be resynced to see new files.

What make/model NAS?

Why can’t you not just use s3cmd? I’ve used it for over five years, and it has worked perfectly.

What are you running that doesn’t support EFS? It’s just managed NFS

EFS isn’t supported on Windows

https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/AmazonEFS.html

Weird, since windows has had a NFS client since server 2008

The Windows NFS Client only supports NFSv3, EFS requires NFSv4

Ah, I see

It’s the lack of NFS 4 client in Windows it appears. Rather dastardly of Microsoft not to implement NFS 4 as a client, while offering it as a server…