{"id":20697497,"url":"https://github.com/epomatti/aws-efs-datasync","last_synced_at":"2026-04-24T14:02:26.842Z","repository":{"id":197506791,"uuid":"697077724","full_name":"epomatti/aws-efs-datasync","owner":"epomatti","description":"AWS EFS migration using DataSync and KMS","archived":false,"fork":false,"pushed_at":"2023-09-30T23:28:11.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-17T18:36:32.992Z","etag":null,"topics":["aws","aws-datasync","aws-efs","aws-kms","aws-security","datasync","ec2","efs","kms","nfs","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epomatti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-27T02:25:15.000Z","updated_at":"2023-09-30T23:28:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"346f27ef-4e18-4025-80c3-26b8f2748b50","html_url":"https://github.com/epomatti/aws-efs-datasync","commit_stats":null,"previous_names":["epomatti/aws-efs-datasync"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Faws-efs-datasync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Faws-efs-datasync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Faws-efs-datasync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Faws-efs-datasync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epomatti","download_url":"https://codeload.github.com/epomatti/aws-efs-datasync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242961747,"owners_count":20213315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-datasync","aws-efs","aws-kms","aws-security","datasync","ec2","efs","kms","nfs","terraform"],"created_at":"2024-11-17T00:18:19.000Z","updated_at":"2026-04-24T14:02:21.822Z","avatar_url":"https://github.com/epomatti.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS EFS Datasync\n\nAWS EFS migration using DataSync and KMS.\n\nA few notes about EFS encryption:\n\n- **Encrypting file data at rest** - You can use:\n  - AWS managed key (default) for Amazon EFS `aws/elasticfilesystem`.\n  - A KMS CMK that you manage.\n- **EFS encryption** - It is not possible to encrypt an existing EFS. You have to migrate the data to a new encrypted EFS.\n- **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).\n\n\u003cimg src=\".assets/efs.png\" /\u003e\n\n## Setup\n\nCreate the infrastructure:\n\n```sh\nterraform init\nterraform apply -auto-approve\n```\n\nBoth file shares will be [mounted][1] upon `user-data` execution. Example:\n\n```sh\nmkdir ~/efs-mount-point\nsudo mount -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport \u003c\u003cMOUNT-TARGET-DNS\u003e\u003e:/   ~/efs-mount-point\n```\n\nPermissions to add files is already granted by user data, if not, do it manually:\n\n```sh\ncd ~/efs-mount-point\nsudo chmod go+rw .\n```\n\nCreate a test file like `test.txt` in the unencrypted mount.\n\nA DataSync task is already created. Trigger it from the CLI:\n\n```sh\naws datasync start-task-execution --task-arn \u003carn\u003e\n```\n\nUse the console to monitor the execution and check CloudWatch logs for troubleshooting.\n\n[1]: https://docs.aws.amazon.com/efs/latest/ug/wt1-test.html\n\n---\n\n### Clean-up\n\n```sh\nterraform destroy -auto-approve\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Faws-efs-datasync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepomatti%2Faws-efs-datasync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Faws-efs-datasync/lists"}