Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to set up a shared filesystem on EC2 and I've read tutorials such as this:

In step 2 it talks about configuring the exports, for this I need an IP range but when I'm auto-scaling I can't predict what the IP will be before it scales. Is there any other way of doing this while still staying secure?


Edit: Just tried s3fs, didn't seem to work properly

share|improve this question
up vote 2 down vote accepted

First off I would not recommend using S3 as your shared filesytem. It can be extremely costly due to how the IO works.

There's a couple ways to do this.

The easiest way is to add your hosts EC2 security group as a source IP rule for the security group of the NFS server while blocking all other unnecessary traffic. This usually means having two rules; one for your management of the NFS server over SSH [typically] and the other rule allowing all traffic from your connecting hosts to the group. This allows only that traffic to the NFS host. At that point you can safely set the permissions in NFS to or just leave it open to everyone. No connections to NFS will be allowed except those in your security group settings.

Alternately you can set up a startup script on the connecting hosts that either remotely configures the NFS host or pings it somehow so that it knows how to configure itself. This way you can leave the NFS settings to a per-IP setup rather than being more open.

Update June 2015:

Elastic File System is coming and would be a much better solution.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.