How can I use DataSync to transfer data from an Amazon EFS file system to an Amazon S3 bucket?

3 minute read
0

I want to use AWS DataSync to transfer data from Amazon Elastic File System (Amazon EFS) to Amazon Simple Storage Service (Amazon S3) without deploying the DataSync Amazon Elastic Compute Cloud (Amazon EC2) agent.

Resolution

Create a DataSync task with the EFS file system as the source location and the S3 bucket as the destination location:

  1. Open the AWS DataSync console.
  2. In the navigation pane, choose Tasks.
  3. Choose Create task.
  4. For Configure source location, select Create a new location.
  5. Under Configuration, for Location type, select Amazon EFS file system.
  6. For EFS File system, choose the EFS file system that you want to use as an endpoint. You configure this location as a source.
  7. For Mount path, enter the mount path for your EFS file system. The path can include a subdirectory in the EFS file system that's used to read data from the EFS source or write data to the EFS destination. By default, DataSync uses the root directory.
  8. Expand Additional settings.
  9. For Subnet and Security Group, a subnet that includes a mount target for your Amazon EFS file system and this subnet's default security group are selected by default. Note: DataSync uses the security group specified in this step to connect to your Amazon EFS file system. If the security group is configured to restrict connections from within itself, then you can do either of the following:
    Change the configuration to allow the security group to communicate within itself.
    -or-
    Choose a different subnet and security group.
  10. Choose Next.
  11. For Destination location options, select Create a new location.
  12. Under Configuration, for Location type, select Amazon S3 bucket.
  13. For S3 bucket, select the bucket that you want to use as an endpoint.
  14. For S3 storage class, choose the storage class that you want to use for the transferred files.
  15. For Folder, enter the S3 folder or prefix that you want to use for the data transfer. This is the folder that DataSync uses either to read data from for an S3 source location or write data to an S3 destination. You can also leave this field blank to copy the file into the root of the bucket.
  16. For IAM role, select a role that has permissions to access the S3 bucket. Or, choose Autogenerate for DataSync to automatically create a role with the required permissions. If DataSync previously created an IAM role for the S3 bucket, then that role is selected as the default.
    Note: For instructions on how to create an IAM role manually, see Manually configuring an IAM role to access your S3 bucket.
  17. Choose Next.
  18. For Configure settings, configure the task settings for your use case.
  19. Choose Next.
  20. Review the task settings. Then, choose Create task.

After the task status becomes Available, you can start the task to transfer files from the EFS file system to the S3 bucket. You can also schedule periodic replication of your Amazon EFS file system to the S3 bucket within the same AWS Account.


Related information

Working with locations

AWS OFFICIAL
AWS OFFICIALUpdated 3 years ago