Logging your Amazon DataSync task activities - 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.

Logging your Amazon DataSync task activities

You can publish details about your Amazon DataSync task to an Amazon CloudWatch Logs log group.

Required permissions

DataSync needs permission to upload logs to a CloudWatch log group. You can set this up through an IAM resource policy a couple different ways:

Configuring task logging

You can set up CloudWatch logging for your task by using the console or DataSync API.

The following instructions describe how to configure CloudWatch logging when creating a task. You also can configure this when editing a task.

  1. Open the Amazon DataSync console at https://console.amazonaws.cn/datasync/.

  2. In the left navigation pane, choose Tasks, and then choose Create task.

  3. Configure your task's source and destination locations.

    For more information, see Working with Amazon DataSync locations.

  4. For Log level, choose one of the following options:

    • Log basic information such as transfer errors – Publish only basic information (such as transfer errors) to CloudWatch.

    • Log all transferred objects and files – Publish log records to CloudWatch Logs for all files or objects that the task copies and integrity checks.

    • Do not send logs to CloudWatch

  5. For CloudWatch log group, specify a log group that DataSync has permission to upload logs to by doing one of the following:

    • Choose Autogenerate to automatically create a log group that allows DataSync to upload logs to it.

    • Choose an existing log group in your current Amazon Web Services Region.

      Make sure you have a resource policy that allows DataSync to upload logs to the log group.

You can configure CloudWatch logging for your task by using the CloudWatchLogGroupArn parameter with any of the following operations: