The Amazon Elastic File System (EFS) client, known as amazon-efs-utils
, facilitates the mounting and management of EFS file systems on Linux instances. While Amazon Linux distributions offer easy installation via package repositories, other Linux distributions require manual installation. This guide provides step-by-step instructions for manually installing the Amazon EFS client on various Linux distributions.
Prerequisites
Before proceeding with the installation, ensure the following dependencies are present on your system:
- NFS Client:
nfs-utils
for RHEL, CentOS, Amazon Linux, and Fedora distributions.nfs-common
for Debian and Ubuntu distributions.
- Network Relay:
stunnel
package, version 4.56 or later. - Python: Version 3.4 or later.
- OpenSSL: Version 1.0.2 or newer.
- Rust and Cargo: Rust compiler and Cargo package manager.
These dependencies are essential for the proper functioning of amazon-efs-utils
. If any are missing, install them using your distribution’s package manager.
Installation Steps
The installation process involves cloning the amazon-efs-utils
repository from GitHub, building the package, and installing it. The steps vary slightly depending on whether your distribution uses RPM or DEB packages.
Install Amazon EFS Client on RPM-Based Distributions (e.g., RHEL, CentOS, Fedora)
Install Required Packages:
sudo yum -y install git rpm-build make rust cargo openssl-devel
Clone the Repository:
git clone https://github.com/aws/efs-utils
cd efs-utils
Build the RPM Package:
make rpm
Manually Install the Amazon EFS Client Package
sudo yum -y install build/amazon-efs-utils*rpm
For DEB-Based Distributions (e.g., Ubuntu, Debian)
Install Required Packages:
sudo apt-get update
sudo apt-get -y install git binutils rustc cargo pkg-config libssl-dev
Clone the Repository:
git clone https://github.com/aws/efs-utils
cd efs-utils
Build the DEB Package:
./build-deb.sh
Install the Package:
sudo apt-get -y install ./build/amazon-efs-utils*deb
Post-Installation Steps
After manually installing amazon-efs-utils
, it’s recommended to upgrade stunnel
to the latest version to enable encryption of data in transit. Additionally, installing botocore
allows for monitoring your file system’s mount status using Amazon CloudWatch.
- Upgrade
stunnel
: Follow your distribution’s guidelines to updatestunnel
to the latest version. - Install
botocore
: Use your package manager to installbotocore
.
Mounting the EFS File System
With amazon-efs-utils
installed, you can mount your EFS file system using the EFS mount helper. For example:
sudo mount -t efs -o tls fs-12345678:/ /mnt/efs
Replace fs-12345678
with your specific file system ID and /mnt/efs
with your desired mount point.