AWS EFS

apt-get update
apt-get -y install binutils
cd /efs-utils
./build-deb.sh
sudo apt-get -y install ./build/amazon-efs-utils*deb
rm -rf /var/lib/apt/lists/*
cat  /etc/amazon/efs/efs-utils.conf

directory

efs-id

readonly?

set -x
MOUNT_DIR="/volumes/${MOUNT_DIR:=NJ__REF_}"
EFS_ID="${EFS_ID:=NJ__REF_}"
READONLY="${READONLY:=NJ__REF_}"
exec 2>&1
export

if [ "$READONLY" = "false" ]; then
  readonly_option=""
else 
  readonly_option=" -oro"
fi

if cat /proc/mounts | grep "${MOUNT_DIR} " >/dev/null 2>/dev/null; then
  umount -vf "$MOUNT_DIR" 
fi

mkdir -p "$MOUNT_DIR"

mount -t efs -o tls $readonly_option ${EFS_ID}:/ "$MOUNT_DIR"