2

I created a free trial AWS server a year ago, but am only getting around to using it and going through some of the tutorials.

I'm trying to set up an initial httpd web server for practice and their instructions have at one step:

Mount your Amazon EFS file system. You need to update the following mount command using the EFS mount helper utility by providing your file system ID.

  sudo mount -t efs fs-12345678:/ /var/www/html/efs-mount-point

In my dashboard I can't find anything like a 'file system id' or how to create it from existing ids, and no amount of tweaking works (mount doesn't recognize -t efs as an allowable mount type)

I can follow all the instructions just fine except this last one (and any following dependent on it. The httpd server runs fine and gives the default page, but I can't seem to be able to create an index.html file that is servable.

I would think that the 10G file system the comes with the barebones default trial server (/dev/xvda2) would be a file system that could be mounted (it is already, right? I can use it just fine but putting the html files there doesn't seem to get them found by httpd no matter how closely I follow their instructions (permissions/paths/etc but on /dev/xvda2).

So, is there a file system ID for /dev/xvda2 that comes with the initial trial? Or can I just use it as is without a mount but getting the permission/paths right? Or must I create a new efs file system?

1
  • 2
    How did you get to that tutorial to begin with? It doesn't seem to be applicable to what you are doing. Feb 18, 2019 at 21:55

1 Answer 1

2

You are trying to mount a shared filesystem from AWS EFS - Elastic File System. Is that what you want to do? If not scroll down to the second part of my answer.

If yes, and you want EFS, you'll have to get an EFS share created. In the AWS Web Console go to Services and then EFS and follow the wizard to create the EFS filesystem. Note down the fs-12345678 ID.

To mount it you can either install the EFS Mount Helper that enables the mount -t efs command. Or mount it as NFS using:

$ sudo mount -t nfs4 fs-12345678.efs.us-east-1.amazonaws.com:/ /var/www/html/efs-mount-point

(Change that us-east-1 above to your region).

That should do.


However if you are just setting up a web server you most likely don't need any of the above. Your EC2 instance should come with some 8GB of disk space with plenty free space. For testing and training simply put your Web files under /var/www/html without mounting any other filesystems.

Hope that helps :)

1
  • The second one, just putting things as expected in /var/www/html, that was it. It's all a mystery until it works, and then it's so obvious. It was just a matter of getting permissions right on those files in /var/www/html/, which I had thought I had done but obviously must not have.
    – Mitch
    Feb 19, 2019 at 3:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .