AWS DataSync
User Guide

Using the AWS Command Line Interface with AWS DataSync

In this section, you can find examples of using the AWS Command Line Interface (AWS CLI) commands for AWS DataSync. You can use these commands to create an agent, create source and destination locations, and run a task. These examples are code snippets that show you how to perform a specific task.

Before you begin, we recommend reading How AWS DataSync Works to understand the components and terms used in DataSync and how DataSync works. We also recommend reading Using Identity-Based Policies (IAM Policies) for DataSync to understand the AWS Identity and Access Management (IAM) permissions DataSync requires.

You also need to install the AWS CLI before you can use the commands. For information about how to install the AWS CLI, see Installing the AWS Command Line Interface in the AWS Command Line Interface User Guide. If your installation is successful, you can use the help command to see the DataSync operations and the parameters associated with them.

To see the available operations, enter the following command.

aws datasync help

To see the parameters associated with a specific operation, enter the following command.

aws datasync operation help

For more information about AWS Command Line Interface, see Using the AWS Command Line Interface.

AWS DataSync Regions and ARNs

In the example commands in this section, replace the values-in-red with your own values.

For information about supported AWS Regions and endpoints, see DataSync AWS Regions and Endpoints.

For information about DataSync Amazon Resource Names (ARNs) values, see DataSync Amazon Resource Names.