How to mount an AWS volume on local host?

I accomplished this using NFS and it's been working without a hitch since I set it up. In my case I have an ancient server running Solaris that is severely constrained for disk space, so I took an EC2 machine running Ubuntu 12.04, formatted and mounted a new EBS volume, configured NFS, and exported it where the old machine, along with another Ubuntu system outside of EC2 could both mount it from the other side of the country. I believe this was the walk-through that I used:

https://help.ubuntu.com/community/SettingUpNFSHowTo

In addition to this, you need to modify your EC2 instance's security group to allow the NFS traffic to pass through. This answer suggests which ports that might involve, but (duh) don't open them to the world.

Unless you are using VPC or another kind of VPN that can encrypt your traffic -- or the data is not such that you need to encrypt it (assuming there exists data of that nature any more) -- then you need to be aware that you have to explicitly encrypt NFS because, by default, you're transmitting data in the clear across the Internet.

You'll likely find some arm waving and hand-wringing about how NFS is a LAN protocol, sensitive to latency and jitter, etc. Well, duh. But my experience has been entirely smooth. You can't be "here" and access a filesystem "there" as though it were "here" without violating the laws of physics.

I specifically chose NFS because I speculated that my ridiculous old Solaris machine could speak NFS with Linux on the other end of the pipe.

Other options for "sharing" a volume:

SSHFS: https://help.ubuntu.com/community/SSHFS

Samba: https://help.ubuntu.com/community/Samba

I have not used SSHFS, but I use Samba on the LAN (Windows clients, Linux server).

So there are 3 ways that come to mind to accomplish what you want. None of them are going to be as fast as the experience you would have if the files were stored locally.

To restate the obvious, if you expose any of these to the Internet, lock down network access to the server from untrusted IP addresses (as you should be doing anyway) because you certainly don't want to depend on the built-in authentication mechanisms to secure your data... and NFS can run happily with no authentication at all, allowing you to trust another machine by its IP address and even -- optionally -- trusting the remote user when they say "hey, you know, when it comes to file permissions, since I'm root here, I should be root there," and NFS says, "okay, sounds good to me."


Try this: Downloading an Amazon EC2 AMI to local drive