Starting an AWS DataSync task with the AWS CLI - AWS DataSync

Starting an AWS DataSync task with the AWS CLI

You can begin transferring your data with AWS DataSync by using the AWS 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: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 Specifying what AWS DataSync transfers by using filters.

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:datasync:us-east-1:209870788375:task/task-08de6e6697796f026/execution/exec-04ce9d516d69bd52f" }
Note

Each agent can run a single task at a time.