Starting an Amazon DataSync task with the Amazon CLI - Amazon DataSync
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Starting an Amazon DataSync task with the Amazon CLI

You can begin transferring your data with Amazon DataSync by using the Amazon CLI.

To start your DataSync task, you just need to specify the Amazon Resource Name (ARN) of the task you want to run. Here's an example start-task-execution command:

aws datasync start-task-execution \ --task-arn 'arn:aws-cn:datasync:region:account-id:task/task-id'

You can modify the task's settings for a specific task execution, as shown in the example following. For a description of these options, see Options. You also configure a specific task run to focus on specific files, folders, and objects to transfer. For more information, see Filtering data transferred by Amazon DataSync.

The following example starts a task with a few settings that are different than the task's default settings:

aws datasync start-task-execution \ --override-options VerifyMode=NONE,OverwriteMode=NEVER,PosixPermissions=NONE

The command returns an ARN for your task execution similar to the following example:

{ "TaskExecutionArn": "arn:aws-cn:datasync:us-east-1:209870788375:task/task-08de6e6697796f026/execution/exec-04ce9d516d69bd52f" }
Note

Each agent can run a single task at a time.