Deleting your Amazon DataSync task
If you no longer need an Amazon DataSync task, you can delete it and its related Amazon resources.
Prerequisites
When you run a task, DataSync automatically creates and manages network interfaces for data transfer traffic. When you delete a task, you also delete its related network interfaces as long as you have the following permissions:
-
ec2:DeleteNetworkInterface
-
ec2:DescribeNetworkInterfaces
-
ec2:ModifyNetworkInterfaceAttribute
These permissions are available in the Amazon managed policy
AWSDataSyncFullAccess
. For more information, see Amazon managed policies for Amazon DataSync.
Deleting the task
Once you delete a task, you can't restore it.
Open the Amazon DataSync console at https://console.amazonaws.cn/datasync/
. In the left navigation pane, expand Data transfer, then choose Tasks.
Select the task that you want to delete.
-
Choose Actions, then choose Delete.
In the dialog box, choose Delete.
Copy the following
delete-task
command:aws datasync delete-task \ --task-arn "
task-to-delete
"For the
--task-arn
parameter, specify the Amazon Resource Name (ARN) of the task you're deleting (for example,arn:aws-cn:datasync:us-east-2:123456789012:task/task-012345678abcd0123
).Run the
delete-task
command.