Manually installing the Amazon EFS client - Amazon Elastic File System

Manually installing the Amazon EFS client

You can manually install the Amazon EFS client on your Amazon EC2 Linux instances running Amazon Linux and Amazon Linux 2, and EC2 Mac instances running macOS Big Sur, and other supported Linux distributions. The installation procedures are described in the following sections.

Installing the Amazon EFS client on Amazon Linux and Amazon Linux 2

The amazon-efs-utils package comes with Amazon Linux and Amazon Linux AMIS, and is available for installation on EC2 instances running these AMIs. To install the Amazon EFS client on other Linux distributions, see Installing the Amazon EFS client on other Linux distributions.

Note

If you're using AWS Direct Connect, you can find installation instructions in Walkthrough: Create and mount a file system on-premises with AWS Direct Connect and VPN.

To install the amazon-efs-utils package

  1. Make sure that you've created an Amazon Linux or Amazon Linux 2 EC2 instance. For information on how to do this, see Step 1: Launch an Instance in the Amazon EC2 User Guide for Linux Instances.

  2. Access the terminal for your instance through Secure Shell (SSH), and log in with the appropriate user name. For more information on how to do this, see Connecting to your Linux instance using SSH in the Amazon EC2 User Guide for Linux Instances.

  3. Run the following command to install the amazon-efs-utils package.

    sudo yum install -y amazon-efs-utils

Installing the Amazon EFS client on other Linux distributions

If you don't want to get the amazon-efs-utils package from Amazon Linux or Amazon Linux 2 AMIs, the amazon-efs-utils package is also available on GitHub.

After you clone the package, you can build and install amazon-efs-utils using one of the following methods, depending on the package type supported by your Linux distribution:

  • RPM – This package type is supported by Amazon Linux, Red Hat Linux, CentOS, and similar.

  • DEB – This package type is supported by Ubuntu, Debian, and similar.

  1. Connect to the EC2 instance using Secure Shell (SSH), and log in with the appropriate user name. For more information, see Connecting to Your Linux Instance Using SSH in the Amazon EC2 User Guide for Linux Instances.

  2. Install git using the following command:

    sudo yum -y install git
  3. Install the rpm-build package if it's not already installed using the following command:

    sudo yum -y install rpm-build
  4. Clone amazon-efs-utils from GitHub using the following command.

    git clone https://github.com/aws/efs-utils
  5. Open a terminal on your client and navigate to the directory that contains the amazon-efs-utils package.

    cd /path/efs-utils
  6. Install the bash make command if your operating system doesn't already have it as follows.

    sudo yum -y install make
  7. Install the rpm-build package if it's not already installed using the following command:

    sudo yum -y install rpm-build
  8. Build the amazon-efs-utils package using the following command:

    sudo make rpm
  9. Install the amazon-efs-utils package with the following command.

    sudo yum -y install ./build/amazon-efs-utils*rpm
  1. Connect to the EC2 instance using Secure Shell (SSH), and log in with the appropriate user name. For more information, see Connecting to Your Linux Instance Using SSH in the Amazon EC2 User Guide for Linux Instances.

  2. Install zypper using the following command:

    sudo zypper refresh
  3. Install the rpm-build package and the bash make command if either are not already installed using the following command:

    sudo zypper install -y git rpm-build make
    1. For OpenSUSE, if you get an error similar to the following:

      File './suse/noarch/bash-completion-2.11-2.1.noarch.rpm' not found on medium 'http://download.opensuse.org/tumbleweed/repo/oss/'

      Run the following command to re-add the repo OSS and NON-OSS.

      sudo zypper ar -f -n OSS http://download.opensuse.org/tumbleweed/repo/oss/ OSS sudo zypper ar -f -n NON-OSS http://download.opensuse.org/tumbleweed/repo/non-oss/ NON-OSS sudo zypper refresh
    2. Re-run the git install script again:

      sudo zypper install -y git rpm-build make
  4. Clone amazon-efs-utils from GitHub using the following command.

    git clone https://github.com/aws/efs-utils
  5. Open a terminal on your client and navigate to the directory that contains the amazon-efs-utils package.

    cd /path/efs-utils
  6. Build the amazon-efs-utils package using the following command:

    make rpm
  7. Install the amazon-efs-utils package with the following command.

    sudo zypper --no-gpg-checks install -y build/amazon-efs-utils*rpm
  1. Connect to the EC2 instance using Secure Shell (SSH), and log in with the appropriate user name. For more information, see Connecting to Your Linux Instance Using SSH in the Amazon EC2 User Guide for Linux Instances.

  2. (Optional) Apply updates before installing the package with the following command:

    sudo apt-get update

    Install updates as needed.

  3. Install git and binutils, using the following command. binutils is required for building DEB packages,

    sudo apt-get -y install git binutils
  4. Clone amazon-efs-utils from GitHub using the following command.

    git clone https://github.com/aws/efs-utils
  5. Navigate to the directory that contains the amazon-efs-utils package.

    cd /path/efs-utils
  6. Build amazon-efs-utils using the following command:

    ./build-deb.sh
  7. Install the package with the following command.

    sudo apt-get -y install ./build/amazon-efs-utils*deb

Installing the Amazon EFS client on EC2 Mac instances running macOS Big Sur

The amazon-efs-utils package is available for installation on EC2 Mac instances running macOS Big Sur.

To install the amazon-efs-utils package

  1. Make sure that you've created an EC2 Mac instance running macOS Big Sur . For information on how to do this, see Step 1: Launch an Instance in the Amazon EC2 User Guide for Mac Instances.

  2. Access the terminal for your instance through Secure Shell (SSH), and log in with the appropriate user name. For more information on how to do this, see Connecting to your instance using SSH in the Amazon EC2 User Guide for Mac Instances.

  3. Run the following command to install amazon-efs-utils.

    brew install amazon-efs-utils

    The system responds with instructions to follow to complete the installation.

    Perform below actions to start using efs: sudo mkdir -p /Library/Filesystems/efs.fs/Contents/Resources sudo ln -s /usr/local/bin/mount.efs /Library/Filesystems/efs.fs/Contents/Resources/mount_efs To enable watchdog for using TLS mounts: sudo cp /usr/local/Cellar/amazon-efs-utils/<version>/libexec/amazon-efs-mount-watchdog.plist /Library/LaunchAgents sudo launchctl load /Library/LaunchAgents/amazon-efs-mount-watchdog.plist
  4. In order mount an EFS file system, you need to ensure that the EFS mount helper in amazon-efs-utils is accessible by the mount command. To do so, run following commands:

    sudo mkdir -p /Library/Filesystems/efs.fs/Contents/Resources sudo ln -s /usr/local/bin/mount.efs /Library/Filesystems/efs.fs/Contents/Resources/mount_efs
  5. Run the following commands to enable the watchdog process (amazon-efs-mount-watchdog) that monitors the health of TLS mounts on your EFS file system.

    sudo cp /usr/local/Cellar/amazon-efs-utils/<version>/libexec/amazon-efs-mount-watchdog.plist /Library/LaunchAgents sudo launchctl load /Library/LaunchAgents/amazon-efs-mount-watchdog.plist