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:
-
When you create your task by using the console, DataSync can create a log group and associated resource policy for you.
-
If you want to use an existing log group, see an example of how to create a resource policy yourself.
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.
Open the Amazon DataSync console at https://console.amazonaws.cn/datasync/
. In the left navigation pane, choose Tasks, and then choose Create task.
-
Configure your task's source and destination locations.
For more information, see Working with Amazon DataSync locations.
-
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
-
-
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: