Skip to content

Instantly share code, notes, and snippets.

@diverted247
Created August 19, 2016 17:15
Show Gist options
  • Save diverted247/6ef4fdb7ee61e3c31441f55deb58a307 to your computer and use it in GitHub Desktop.
Save diverted247/6ef4fdb7ee61e3c31441f55deb58a307 to your computer and use it in GitHub Desktop.
Elastic Beanstalk + EFS where deployment does not delete mount contents
packages:
yum:
nfs-utils: []
commands:
0_umount_efs:
command: sudo umount /efs_mount;
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/02_enable_efs.sh":
owner: root
group: root
content: |
#!/usr/bin/env bash
[ -d /efs_mount ] || sudo mkdir /efs_mount;
sudo mount -t nfs4 -o nfsvers=4.1 mounttargeturl.efs.us-west-2.amazonaws.com:/ /efs_mount;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment