| Practically any Linux operating system |
| An AWS account with a user whose permissions will allow creating/modifying an EFS |
| aws-cli terminal application |
| Docker (cli or Docker Desktop) |
- Using the aws-cli, configure your aws account:
aws configure - Create an Elastic File System volume using the aws-cli:
aws efs create-file-system --creation-token <insert a name here> - Copy the “FileSystemId” from the output of that command
- To create a new container and mount the EFS to it, run:
docker run -it --name <give it a name> --mount type=volume,source=<file-system-id>,target=/efs,volume-driver=local <docker image you want to use for your container> - You should now be able to type
lsin the container’s root directory and see a folder calledefs.You did it… I think!
- Create a second container (copypasta the
docker runcommand above and change the name). cdinto theefsdirectory.- Create a file!
touch just-some-file.txt && ls
- Verify that the file you just created in container 2 is now also available in the
efsdirectory of container 1.
You actually did it this time! HOORAY!
- First double check your AWS EFS security settings/user security policies
- No luck? Ok, now try installing
nfs-utils - It still didn’t work? try
pip install --user botocore boto3 amazon-efs - … Still nothing? Guess ya better ask ChatGPT :D