How can I use DataSync to transfer data from an Amazon EFS file system to an Amazon S3 bucket?
3 minute read
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.
Create a DataSync task with the EFS file system as the source location and the S3 bucket as the destination location:
For Configure source location, select Create a new location.
Under Configuration, for Location type, select Amazon EFS file system.
For EFS File system, choose the EFS file system that you want to use as an endpoint. You configure this location as a source.
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.
Expand Additional settings.
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.
Choose a different subnet and security group.
For Destination location options, select Create a new location.
Under Configuration, for Location type, select Amazon S3 bucket.
For S3 bucket, select the bucket that you want to use as an endpoint.
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.
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.
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.