本文へスキップ
hdknr blog
戻る

EC2 mount EFS

AWS EC2 moutn EFS

E2 からマウント

#!/bin/bash
EFS_ID="fs-0f90bd97a364a6e94"
#
PKG=amazon-efs-utils
RES=$(dpkg --get-selections | grep $PKG)
MOUNT_PATH="/efs"

if [ -z "${RES}" ]; then
        apt update && apt upgrade -y && apt autoremove -y
        apt-get -y install binutils
        git clone https://github.com/aws/efs-utils
        cd efs-utils
        ./build-deb.sh
        apt-get install -y ./build/amazon-efs-utils*deb
fi
#
if [ ! -d $MOUNT_PATH ]; then
    mkdir $MOUNT_PATH
fi
#
mount -t efs $EFS_ID:/ $MOUNT_PATH


前の記事
MySQL only_full_group_by
次の記事
Celery AWS ECS