Choosing a task mode for your data transfer
Your AWS DataSync task can run in one of the following modes:
-
Enhanced mode – Transfer virtually unlimited numbers of objects with higher performance than Basic mode. Enhanced mode tasks optimize the data transfer process by listing, preparing, transferring, and verifying data in parallel. Enhanced mode is currently available for transfers between Amazon S3 locations.
-
Basic mode – Transfer files or objects between AWS storage and all other supported DataSync locations. Basic mode tasks are subject to quotas on the number of files, objects, and directories in a dataset. Basic mode sequentially prepares, transfers, and verifies data, making it slower than Enhanced mode for most workloads.
Understanding task mode differences
The following information can help you determine which task mode to use.
Capability | Enhanced mode behavior | Basic mode behavior |
---|---|---|
Performance | DataSync lists, prepares, transfers, and verifies your data in parallel. Provides higher performance than Basic mode for most workloads (such as transferring large objects) | DataSync prepares, transfers, and verifies your data sequentially. Performance is slower than Enhanced mode for most workloads |
Number of items in a dataset that DataSync can work with per task execution |
Virtually unlimited numbers of objects |
Quotas apply |
More counters and metrics than Basic mode, such as the number of objects that DataSync finds at your source location and how many objects are prepared during each task execution |
Less counters and metrics than Enhanced mode |
|
Structured logs (JSON format) | Unstructured logs | |
Currently for transfers between Amazon S3 locations only |
For transfers between all locations that DataSync supports |
|
DataSync verifies only transferred data | DataSync verifies all data by default | |
Bandwidth limits | Not applicable | Supported |
Cost | For more information, see the DataSync pricing |
For more information, see the DataSync pricing |
Choosing a task mode
You can choose Enhanced mode only if your DataSync task uses Amazon S3 locations. Otherwise, you must use Basic mode. For example, a transfer from an on-premises NFS location to an S3 location requires Basic mode.
Your task options and performance might vary depending on the task mode you choose. Once you create your task, you can't change the task mode.
- Required permissions
-
To create an Enhanced mode task, the IAM role that you're using DataSync with must have the
iam:CreateServiceLinkedRole
permission.For your DataSync user permissions, consider using AWSDataSyncFullAccess. This is an AWS managed policy that provides a user full access to DataSync and minimal access to its dependencies.
Open the AWS DataSync console at https://console.aws.amazon.com/datasync/
. In the left navigation pane, expand Data transfer, then choose Tasks, and then choose Create task.
-
Configure your task's source and destination locations.
For more information, see Where can I transfer my data with AWS DataSync?
-
For Task mode, choose one of the following options:
-
Enhanced
-
Basic
For more information, see Understanding task mode differences.
-
-
While still on the Configure settings page, choose other task options or use the default settings.
You might be interested in some of the following options:
-
Specify what data to transfer by using a manifest or filters.
-
Configure how to handle file metadata and verify data integrity.
-
Monitor your transfer with task reports or Amazon CloudWatch Logs.
When you're done, choose Next.
-
-
Review your task configuration, then choose Create task.
-
In your AWS CLI settings, make sure that you're using one of the AWS Regions where you plan to transfer data.
-
Copy the following
create-task
command:aws datasync create-task \ --source-location-arn "arn:aws:datasync:
us-east-1
:account-id
:location/location-id
" \ --destination-location-arn "arn:aws:datasync:us-east-1
:account-id
:location/location-id
" \ --task-mode "ENHANCED-or-BASIC
" -
For
--source-location-arn
, specify the Amazon Resource Name (ARN) of your source location. -
For
--destination-location-arn
, specify the ARN of your destination location.If you're transferring across AWS Regions or accounts, make sure that the ARN includes the other Region or account ID.
-
For
--task-mode
, specifyENHANCED
orBASIC
.For more information, see Understanding task mode differences.
-
Specify other task options as needed. You might be interested in some of the following options:
-
Specify what data to transfer by using a manifest or filters.
-
Configure how to handle file metadata and verify data integrity.
-
Monitor your transfer with task reports or Amazon CloudWatch Logs.
For more options, see create-task
. Here's an example create-task
command that specifies Enhanced mode and several other options:aws datasync create-task \ --source-location-arn "arn:aws:datasync:
us-east-1
:account-id
:location/location-id
" \ --destination-location-arn "arn:aws:datasync:us-east-1
:account-id
:location/location-id
" \ --name "task-name
" \ --task-mode "ENHANCED" \ --options TransferMode=CHANGED,VerifyMode=ONLY_FILES_TRANSFERRED,ObjectTags=PRESERVE,LogLevel=TRANSFER -
-
Run the
create-task
command.If the command is successful, you get a response that shows you the ARN of the task that you created. For example:
{ "TaskArn": "arn:aws:datasync:us-east-1:111222333444:task/task-08de6e6697796f026" }
You can specify the DataSync task mode by configuring the TaskMode
parameter in the CreateTask
operation.