Giter Site home page Giter Site logo

aws-efs-datasync's Introduction

AWS EFS Datasync

AWS EFS migration using DataSync and KMS.

A few notes about EFS encryption:

  • Encrypting file data at rest - You can use:
    • AWS managed key (default) for Amazon EFS aws/elasticfilesystem.
    • A KMS CMK that you manage.
  • EFS encryption - It is not possible to encrypt an existing EFS. You have to migrate the data to a new encrypted EFS.
  • Encrypting metadata at rest - Amazon EFS uses the AWS managed key for Amazon EFS, aws/elasticfilesystem, to encrypt and decrypt file system metadata (that is, file names, directory names, and directory contents).

Setup

Create the infrastructure:

terraform init
terraform apply -auto-approve

Both file shares will be mounted upon user-data execution. Example:

mkdir ~/efs-mount-point
sudo mount -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport <<MOUNT-TARGET-DNS>>:/   ~/efs-mount-point

Permissions to add files is already granted by user data, if not, do it manually:

cd ~/efs-mount-point
sudo chmod go+rw .

Create a test file like test.txt in the unencrypted mount.

A DataSync task is already created. Trigger it from the CLI:

aws datasync start-task-execution --task-arn <arn>

Use the console to monitor the execution and check CloudWatch logs for troubleshooting.


Clean-up

terraform destroy -auto-approve

aws-efs-datasync's People

Contributors

epomatti avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.