

# Monitoring your data transfers with task reports
<a name="task-reports"></a>

*Task reports* provide detailed information about what AWS DataSync attempts to transfer, skip, verify, and delete during a task execution. For more information, see [How DataSync transfers files, objects, and directories](how-datasync-transfer-works.md#transferring-files).

Task reports are generated in JSON format. You can customize the level of detail in your reports:
+ [Summary only task reports](#task-report-types-summary) give you the necessary details about your task execution, such as how many files transferred and whether DataSync could verify the data integrity of those files.
+ [Standard task reports](#task-report-types-standard) include a summary plus detailed reports that list each file, object, or folder that DataSync attempts to transfer, skip, verify, and delete. With a standard task report, you can also specify the [report level](#task-report-level) to show only the task execution's errors or its successes and errors.

## Use cases
<a name="task-reports-use-cases"></a>

Here are some situations where task reports can help you monitor and audit your data transfers:
+ When migrating millions of files, quickly identify files that DataSync has issues transferring.
+ Verify chain-of-custody processes for your files.

## Summary only task reports
<a name="task-report-types-summary"></a>

A report that's only a summary of a task execution includes the following details:
+ The AWS account that ran the task execution
+ The source and destination locations
+ The total number of files, objects, and folders that were skipped, transferred, verified, and deleted
+ The total bytes (logical and physical) that were transferred
+ If the task execution was completed, canceled, or encountered an error
+ The start and end times (including the total time of the transfer)
+ The task's settings (such as bandwidth limits, data integrity verification, and other options for your DataSync transfer)

## Standard task reports
<a name="task-report-types-standard"></a>

A standard task report includes a [summary](#task-report-types-summary) of your task execution plus detailed reports of what DataSync attempts to transfer, skip, verify, and delete.

**Topics**
+ [

### Report level
](#task-report-level)
+ [

### Transferred reports
](#task-report-types-transferred)
+ [

### Skipped reports
](#task-report-types-skipped)
+ [

### Verified reports
](#task-report-types-verified)
+ [

### Deleted reports
](#task-report-types-deleted)

### Report level
<a name="task-report-level"></a>

With standard task reports, you can choose one of the following report levels:
+ Errors only
+ Successes and errors (essentially a list of everything that happened during your task execution)

For example, you might want to see which files DataSync skipped successfully during your transfer and which ones it didn't. Files that DataSync skipped successfully might be ones that you purposely want DataSync to exclude because they already exist in your destination location. However, a skipped error for instance might indicate that DataSync doesn't have the right permissions to read a file.

### Transferred reports
<a name="task-report-types-transferred"></a>

A list of files, objects, and directories that DataSync attempted to transfer during your task execution. A transferred report includes the following details:
+ The paths for the transferred data
+ What was transferred (content, metadata, or both)
+ The metadata, which includes the data type, content size (objects and files only), and more
+ The time when an item was transferred
+ The object version (if the destination is an Amazon S3 bucket that has versioning enabled)
+ If something was overwritten in the destination
+ Whether an item transferred successfully

**Note**  
When moving data between S3 buckets, the prefix that you specify in your [source location](create-s3-location.md) can show up in your report (or in Amazon CloudWatch logs), even if that prefix doesn't exist as an object in your destination location. (In the DataSync console, you might also notice this prefix showing up as skipped or verified data.)

### Skipped reports
<a name="task-report-types-skipped"></a>

A list of files, objects, and directories that DataSync finds in your source location but didn't attempt to transfer. The reasons DataSync skips data can depend on several factors, such as how you configure your task and storage system permissions. Here are some examples:
+ There's a file that exists in your source and destination locations. The file in the source hasn't been modified since the previous task execution. Since you're [only transferring data that has changed](configure-metadata.md#task-option-transfer-mode), DataSync doesn't transfer that file next time you run your task.
+ An object that exists in both of your locations changes in your source. When you run your task, DataSync skips this object in your destination because your task doesn't [overwrite data in the destination](configure-metadata.md#task-option-file-object-handling).
+ DataSync skips an object in your source that's using an [archival storage class](create-s3-location.md#using-storage-classes) and isn't restored. You must restore an archived object for DataSync to read it.
+ DataSync skips a file, object, or directory in your source location because it can't read it. If this happens and isn't expected, check your storage's access permissions and make sure that DataSync can read what was skipped.

A skipped report includes the following details:
+ The paths for skipped data
+ The time when an item was skipped
+ The reason it was skipped
+ Whether an item was skipped successfully

**Note**  
Skipped reports can be large when they include successes and errors, you configure your task to [transfer only the data that has changed](configure-metadata.md), and source data already exists in the destination.

### Verified reports
<a name="task-report-types-verified"></a>

A list of files, objects, and directories that DataSync attempted to verify the integrity of during your task execution. A verified data report includes the following details:
+ The paths for verified data
+ The time when an item was verified
+ The reason for the verification error (if any)
+ The source and destination SHA256 checksums (files only)
+ Whether an item was successfully verified

Note the following about verified reports:
+ When you configure your task to [verify only transferred data](configure-data-verification-options.md), DataSync doesn't verify directories in some situations or files or objects that fail to transfer. In either case, DataSync doesn't include unverified data in this report.
+ If you're using [Enhanced mode](choosing-task-mode.md), verification might take longer than usual if you're transferring large objects.

### Deleted reports
<a name="task-report-types-deleted"></a>

A list of files, directories, and objects that were deleted during your task execution. DataSync generates this report only if you [configure your task](configure-metadata.md) to delete data in the destination location that isn't in the source. A deleted data report includes the following details:
+ The paths for deleted data
+ Whether an item was successfully deleted
+ The time when an item was deleted

## Example task reports
<a name="task-report-example"></a>

The level of detail in your task report is up to you. Here are some example transferred data reports with the following configuration:
+ **Report type** – Standard
+ **Report level** – Successes and errors

**Note**  
Reports use the ISO-8601 standard for the timestamp format. Times are in UTC and measured in nanoseconds. This behavior differs from how some other task report metrics are measured. For example, [task execution details](https://docs.aws.amazon.com/datasync/latest/userguide/API_TaskExecutionResultDetail.html), such as `TransferDuration` and `VerifyDuration`, are measured in milliseconds.

Enhanced mode task reports use a somewhat different schema than Basic mode task reports. The following examples can help you know what to expect from your reports depending on the [task mode](choosing-task-mode.md) you use.

**Example transferred data reports with success status**  
The following reports show successful transfers for an object named `object1.txt`.  

```
{
    "TaskExecutionId": "exec-abcdefgh12345678",
    "Transferred": [{
        "RelativePath": "object1.txt",
        "SourceMetadata": {
            "Type": "Object",
            "ContentSize": 6,
            "LastModified": "2024-10-04T14:40:55Z",
            "SystemMetadata": {
                "ContentType": "binary/octet-stream",
                "ETag": "\"9b2d7e1f8054c3a2041905d0378e6f14\"",
                "ServerSideEncryption": "AES256"
            },
            "UserMetadata": {},
            "Tags": []
        },
        "Overwrite": "False",
        "DstS3VersionId": "jtqRtX3jN4J2G8k0sFSGYK1f35KqpAVP",
        "TransferTimestamp": "2024-10-04T14:48:39.748862183Z",
        "TransferType": "CONTENT_AND_METADATA",
        "TransferStatus": "SUCCESS"
    }]
}
```

```
{
    "TaskExecutionId": "exec-abcdefgh12345678",
    "Transferred": [{
        "RelativePath": "/object1.txt",
        "SrcMetadata": {
            "Type": "Regular",
            "ContentSize": 6,
            "Mtime": "2022-01-07T16:59:26.136114671Z",
            "Atime": "2022-01-07T16:59:26.136114671Z",
            "Uid": 0,
            "Gid": 0,
            "Mode": "0644"
        },
        "Overwrite": "False",
        "DstS3VersionId": "jtqRtX3jN4J2G8k0sFSGYK1f35KqpAVP",
        "TransferTimestamp": "2022-01-07T16:59:45.747270957Z",
        "TransferType": "CONTENT_AND_METADATA",
        "TransferStatus": "SUCCESS"
    }]
}
```

**Example transferred data reports with error status**  
The following reports provide examples of when DataSync can't transfer an object named `object1.txt`.  
This report shows that DataSync can't access an object named `object1.txt` because of an AWS KMS permissions issue. (If you get an error like this, see [Accessing S3 buckets using server-side encryption](create-s3-location.md#create-s3-location-encryption).)  

```
{
    "TaskExecutionId": "exec-abcdefgh12345678",
    "Transferred": [{
        "RelativePath": "object1.txt",
        "SourceMetadata": {
            "Type": "Object",
            "ContentSize": 6,
            "LastModified": "2022-10-07T20:48:32Z",
            "SystemMetadata": {
                "ContentType": "binary/octet-stream",
                "ETag": "\"3a7c0b2f1d9e5c4a6f8b2e0d1c9f7a3b2\"",
                "ServerSideEncryption": "AES256"
            },
            "UserMetadata": {},
            "Tags": []
        },
        "Overwrite": "False",
        "TransferTimestamp": "2022-10-09T16:05:11.134040717Z",
        "TransferType": "CONTENT_AND_METADATA",
        "TransferStatus": "FAILED",
        "ErrorCode": "AccessDenied",
        "ErrorDetail": "User: arn:aws:sts::111222333444:assumed-role/AWSDataSyncS3Bucket/AwsSync-loc-0b3017fc4ba4a2d8d is not authorized to perform: kms:GenerateDataKey on resource: arn:aws:kms:us-east-1:111222333444:key/1111aaaa-22bb-33cc-44d-5555eeee6666 because no identity-based policy allows the kms:GenerateDataKey action"
    }]
}
```
This report shows that an object named `object1.txt` didn't transfer because of an S3 bucket permissions issue. (If you get an error like this, see [Providing DataSync access to S3 buckets](create-s3-location.md#create-s3-location-access).)  

```
{
    "TaskExecutionId": "exec-abcdefgh12345678",
    "Transferred": [{
        "RelativePath": "/object1.txt",
        "SrcMetadata": {
            "Type": "Regular",
            "ContentSize": 6,
            "Mtime": "2022-01-07T16:59:26.136114671Z",
            "Atime": "2022-01-07T16:59:26.136114671Z",
            "Uid": 0,
            "Gid": 0,
            "Mode": "0644"
        },
        "Overwrite": "False",
        "DstS3VersionId": "jtqRtX3jN4J2G8k0sFSGYK1f35KqpAVP",
        "TransferTimestamp": "2022-01-07T16:59:45.747270957Z",
        "TransferType": "CONTENT_AND_METADATA",
        "TransferStatus": "FAILED",
        "FailureReason": "S3 Get Object Failed",
        "FailureCode": 40974
    }]
}
```

## Limitations
<a name="task-report-limitations"></a>
+ Individual task reports can't exceed 5 MB. If you're copying a large number of files, your task report might be split into multiple reports.
+ There are situations when creating task reports can affect the performance of your data transfer. For example, you might notice this when your network connection has high latency and the files you're transferring are small or you're copying only metadata changes.

# Creating your DataSync task reports
<a name="creating-task-report"></a>

AWS DataSync task reports can be only a summary of your task execution or a set of detailed reports about what DataSync attempts to transfer, skip, verify, and delete.

## Prerequisites
<a name="setting-up-task-report"></a>

Before you can create a task report, you must do the following.

**Topics**
+ [

### Create an S3 bucket for your task reports
](#setting-up-task-report-create-bucket)
+ [

### Allow DataSync to upload task reports to your S3 bucket
](#task-report-access)

### Create an S3 bucket for your task reports
<a name="setting-up-task-report-create-bucket"></a>

If you don't already have one, [create an S3 bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html) where DataSync can upload your task report. Reports are stored in the S3 Standard storage class.

We recommend the following for this bucket:
+ If you're planning to transfer data to an S3 bucket, don't use the same bucket for your task report if you [disable the **Keep deleted files** option](configure-metadata.md). Otherwise, DataSync will delete any previous task reports each time you execute a task since those reports don't exist in your source location.
+ To avoid a complex access permissions setup, make sure that your task report bucket is in the same AWS account and Region as your DataSync transfer task. 

### Allow DataSync to upload task reports to your S3 bucket
<a name="task-report-access"></a>

You must configure an AWS Identity and Access Management (IAM) role that allows DataSync to upload a task report to your S3 bucket.

In the DataSync console, you can create an IAM role that in most cases automatically includes the permissions to upload a task report to your bucket. Keep in mind that this automatically generated role might not meet your needs from a least-privilege standpoint. This role also won't work if your bucket is encrypted with a customer managed AWS Key Management Service (AWS KMS) key (SSE-KMS). In these cases, you can create the role manually as long as the role does at least the following:
+ [Prevents the cross-service confused deputy problem](https://docs.aws.amazon.com/datasync/latest/userguide/cross-service-confused-deputy-prevention.html) in the role's trusted entity.

  The following full example shows how you can use the `aws:SourceArn` and `aws:SourceAccount` global condition context keys to prevent the confused deputy problem with DataSync. 

------
#### [ JSON ]

****  

  ```
  {
      "Version":"2012-10-17",		 	 	 
      "Statement": [
          {
              "Effect": "Allow",
              "Principal": {
                  "Service": "datasync.amazonaws.com"
              },
              "Action": "sts:AssumeRole",
              "Condition": {
                  "StringEquals": {
                  "aws:SourceAccount": "123456789012"
                  },
                  "ArnLike": {
                  "aws:SourceArn": "arn:aws:datasync:us-east-1:123456789012:*"
                  }
              }
          }
      ]
  }
  ```

------
+ Allows DataSync to upload a task report to your S3 bucket.

  The following example does this by including the `s3:PutObject` action only for a specific prefix (`reports/`) in your bucket.

------
#### [ JSON ]

****  

  ```
  {
          "Version":"2012-10-17",		 	 	 
          "Statement": [{
              "Action": [
                  "s3:PutObject"
              ],
              "Effect": "Allow",
              "Resource": "arn:aws:s3:::your-task-reports-bucket/reports/*"
          }]
  }
  ```

------
+ If your S3 bucket is encrypted with a customer managed SSE-KMS key, the [key's policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-modifying.html) must include the IAM role that DataSync uses to access the bucket.

  For more information, see [Accessing S3 buckets using server-side encryption](create-s3-location.md#create-s3-location-encryption).

## Creating a summary only task report
<a name="creating-task-report-summary"></a>

You can configure a task report that includes a [summary only](task-reports.md#task-report-types-summary) when creating your DataSync task, starting your task, or updating your task.

The following steps show how to configure a summary only task report when creating a task.

### Using the DataSync console
<a name="creating-task-report-console"></a>

1. Open the AWS DataSync console at [https://console.aws.amazon.com/datasync/](https://console.aws.amazon.com/datasync/).

1. In the left navigation pane, expand **Data transfer**, then choose **Tasks**, and then choose **Create task**.

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

   For more information, see [Where can I transfer my data with AWS DataSync?](working-with-locations.md)

1. Scroll down to the **Task report** section. For **Report type**, choose **Summary only**.

1. For **S3 bucket for reports**, choose an S3 bucket where you want DataSync to upload your task report.
**Tip**  
If you're planning to transfer data to an S3 bucket, don't use the same bucket for your task report if you [disable the **Keep deleted files** option](configure-metadata.md). Otherwise, DataSync will delete any previous task reports each time you execute a task since those reports don't exist in your source location.

1. For **Folder**, enter a prefix to use for your task report when DataSync uploads the report to your S3 bucket (for example, **reports/**).

   Make sure to include the appropriate delimiter character at the end of your prefix. This character is usually a forward slash (`/`). For more information, see [Organizing objects by using prefixes](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html) in the *Amazon S3 User Guide*.

1. For **IAM role**, do one of the following:
   + Choose **Autogenerate** to have DataSync automatically create an IAM role with the permissions that are required to access the S3 bucket.

     If DataSync previously created an IAM role for this S3 bucket, that role is chosen by default.
   + Choose a custom IAM role that you created.

     In some cases, you might need to create the role yourself. For more information, see [Allow DataSync to upload task reports to your S3 bucket](#task-report-access).
**Important**  
If your S3 bucket is encrypted with a customer managed SSE-KMS key, the key's policy must include the IAM role that DataSync uses to access the bucket.  
For more information, see [Accessing S3 buckets using server-side encryption](create-s3-location.md#create-s3-location-encryption).

1. Finish creating your task, and then [start the task](run-task.md) to begin transferring your data.

When your transfer is complete, you can [view your task report](task-report-viewing.md).

### Using the AWS CLI
<a name="creating-task-report-cli"></a>

1. Copy the following `create-task` AWS Command Line Interface (AWS CLI) command:

   ```
   aws datasync create-task \
     --source-location-arn arn:aws:datasync:us-east-1:123456789012:location/loc-12345678abcdefgh \
     --destination-location-arn arn:aws:datasync:us-east-1:123456789012:location/loc-abcdefgh12345678 \
     --task-report-config '{
       "Destination":{
         "S3":{
           "Subdirectory":"reports/",
           "S3BucketArn":"arn:aws:s3:::your-task-reports-bucket",
           "BucketAccessRoleArn":"arn:aws:iam::123456789012:role/bucket-iam-role"
           }
       },
       "OutputType":"SUMMARY_ONLY"  
     }'
   ```

1. For the `--source-location-arn` parameter, specify the Amazon Resource Name (ARN) of the source location in your transfer. Replace `us-east-1` with the appropriate AWS Region, replace `123456789012` with the appropriate AWS account number, and replace `12345678abcdefgh` with the appropriate source location ID.

1. For the `--destination-location-arn` parameter, specify the ARN of the destination location in your transfer. Replace `us-east-1` with the appropriate AWS Region, replace `123456789012` with the appropriate AWS account number, and replace `abcdefgh12345678` with the appropriate destination location ID.

1. For the `--task-report-config` parameter, do the following:
   + `Subdirectory` – Replace `reports/` with the prefix in your S3 bucket where you want DataSync to upload your task reports.

     Make sure to include the appropriate delimiter character at the end of your prefix. This character is usually a forward slash (`/`). For more information, see [Organizing objects by using prefixes](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html) in the *Amazon S3 User Guide*. 
   + `S3BucketArn` – Specify the ARN of the S3 bucket where you want to upload your task report.
**Tip**  
If you're planning to transfer data to an S3 bucket, don't use the same bucket for your task report if you [disable the **Keep deleted files** option](configure-metadata.md). Otherwise, DataSync will delete any previous task reports each time you execute a task since those reports don't exist in your source location.
   + `BucketAccessRoleArn` – Specify the IAM role that allows DataSync to upload a task report to your S3 bucket.

     For more information, see [Allow DataSync to upload task reports to your S3 bucket](#task-report-access).
**Important**  
If your S3 bucket is encrypted with a customer managed SSE-KMS key, the key's policy must include the IAM role that DataSync uses to access the bucket.  
For more information, see [Accessing S3 buckets using server-side encryption](create-s3-location.md#create-s3-location-encryption).
   + `OutputType` – Specify `SUMMARY_ONLY`.

     For more information, see [Summary only task reports](task-reports.md#task-report-types-summary).

1. Run the `create-task` command to create your task.

   You get a response like the following that shows you the ARN of the task that you created. You will need this ARN to run the `start-task-execution` command.

   ```
   {
       "TaskArn": "arn:aws:datasync:us-east-1:123456789012:task/task-12345678abcdefgh"
   }
   ```

1. Copy the following `start-task-execution` command.

   ```
   aws datasync-task-report start-task-execution \
     --task-arn arn:aws:datasync:us-east-1:123456789012:task/task-12345678abcdefgh
   ```

1. For the `--task-arn` parameter, specify the ARN of the task that you're starting. Use the ARN that you received from running the `create-task` command.

1. Run the `start-task-execution` command.

When your transfer is complete, you can [view your task report](task-report-viewing.md).

## Creating a standard task report
<a name="creating-task-report-standard"></a>

You can configure a [standard task report](task-reports.md#task-report-types-standard) when creating your DataSync task, starting your task, or updating your task.

The following steps show how to configure a standard task report when creating a task.

### Using the DataSync console
<a name="ccreating-task-report-console"></a>

1. Open the AWS DataSync console at [https://console.aws.amazon.com/datasync/](https://console.aws.amazon.com/datasync/).

1. In the left navigation pane, expand **Data transfer**, then choose **Tasks**, and then choose **Create task**.

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

   For more information, see [Where can I transfer my data with AWS DataSync?](working-with-locations.md)

1. Scroll down to the **Task report** section. For **Report type**, choose **Standard report**.

1. For **Report level**, choose one of the following:
   + **Errors only** – Your task report includes only issues with what DataSync tried to transfer, skip, verify, and delete.
   + **Successes and errors** – Your task report includes what DataSync successfully transferred, skipped, verified, and deleted and what it didn't. 
   + **Custom** – Allows you to choose whether you want to see errors only or successes and errors for specific aspects of your task report. 

     For example, you can choose **Successes and errors** for the transferred files list but **Errors only** for the rest of the report.

1. If you're transferring to an S3 bucket that uses object versioning, keep **Include Amazon S3 object versions** selected if you want your report to include the new version for each transferred object.

1. For **S3 bucket for reports**, choose an S3 bucket where you want DataSync to upload your task report.
**Tip**  
If you're planning to transfer data to an S3 bucket, don't use the same bucket for your task report if you [disable the **Keep deleted files** option](configure-metadata.md). Otherwise, DataSync will delete any previous task reports each time you execute a task since those reports don't exist in your source location.

1. For **Folder**, enter a prefix to use for your task report when DataSync uploads the report to your S3 bucket (for example, **reports/**). Make sure to include the appropriate delimiter character at the end of your prefix. This character is usually a forward slash (`/`). For more information, see [Organizing objects by using prefixes](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html) in the *Amazon S3 User Guide*.

1. For **IAM role**, do one of the following:
   + Choose **Autogenerate** to have DataSync automatically create an IAM role with the permissions that are required to access the S3 bucket.

     If DataSync previously created an IAM role for this S3 bucket, that role is chosen by default.
   + Choose a custom IAM role that you created.

     In some cases, you might need to create the role yourself. For more information, see [Allow DataSync to upload task reports to your S3 bucket](#task-report-access).
**Important**  
If your S3 bucket is encrypted with a customer managed SSE-KMS key, the key's policy must include the IAM role that DataSync uses to access the bucket.  
For more information, see [Accessing S3 buckets using server-side encryption](create-s3-location.md#create-s3-location-encryption).

1. Finish creating your task and [start the task](run-task.md) to begin transferring your data.

When your transfer is complete, you can [view your task report](task-report-viewing.md).

### Using the AWS CLI
<a name="creating-task-report-cli"></a>

1. Copy the following `create-task` command:

   ```
   aws datasync create-task \
     --source-location-arn arn:aws:datasync:us-east-1:123456789012:location/loc-12345678abcdefgh \
     --destination-location-arn arn:aws:datasync:us-east-1:123456789012:location/loc-abcdefgh12345678 \
     --task-report-config '{
       "Destination":{
         "S3":{
           "Subdirectory":"reports/",
           "S3BucketArn":"arn:aws:s3:::your-task-reports-bucket",
           "BucketAccessRoleArn":"arn:aws:iam::123456789012:role/bucket-iam-role"
           }
       },
       "OutputType":"STANDARD",
       "ReportLevel":"level-of-detail",
       "ObjectVersionIds":"include-or-not"    
     }'
   ```

1. For the `--source-location-arn` parameter, specify the ARN of the source location in your transfer. Replace `us-east-1` with the appropriate AWS Region, replace `123456789012` with the appropriate AWS account number, and replace `12345678abcdefgh` with the appropriate source location ID.

1. For the `--destination-location-arn` parameter, specify the ARN of the destination location in your transfer. Replace `us-east-1` with the appropriate AWS Region, replace `123456789012` with the appropriate AWS account number, and replace `abcdefgh12345678` with the appropriate destination location ID.

1. For the `--task-report-config` parameter, do the following:
   + `Subdirectory` – Replace `reports/` with the prefix in your S3 bucket where you want DataSync to upload your task reports. Make sure to include the appropriate delimiter character at the end of your prefix. This character is usually a forward slash (`/`). For more information, see [Organizing objects by using prefixes](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html) in the *Amazon S3 User Guide*.
   + `S3BucketArn` – Specify the ARN of the S3 bucket where you want to upload your task report.
**Tip**  
If you're planning to transfer data to an S3 bucket, don't use the same bucket for your task report if you [disable the **Keep deleted files** option](configure-metadata.md). Otherwise, DataSync will delete any previous task reports each time you execute a task since those reports don't exist in your source location.
   + `BucketAccessRoleArn` – Specify the IAM role that allows DataSync to upload a task report to your S3 bucket.

     For more information, see [Allow DataSync to upload task reports to your S3 bucket](#task-report-access).
**Important**  
If your S3 bucket is encrypted with a customer managed SSE-KMS key, the key's policy must include the IAM role that DataSync uses to access the bucket.  
For more information, see [Accessing S3 buckets using server-side encryption](create-s3-location.md#create-s3-location-encryption).
   + `OutputType` – Specify `STANDARD` report.

     For more information, see [Standard task reports](task-reports.md#task-report-types-standard)Types of task reports.
   + (Optional) `ReportLevel` – Specify whether you want `ERRORS_ONLY` (the default) or `SUCCESSES_AND_ERRORS` in your report.
   + (Optional) `ObjectVersionIds` – If you're transferring to an S3 bucket that uses object versioning, specify `NONE` if you don't want to include the new version for each transferred object in the report.

     By default, this option is set to `INCLUDE`.
   + (Optional) `Overrides` – Customize the `ReportLevel` of a particular aspect of your report.

     For example, you might want to see `SUCCESSES_AND_ERRORS` for the list of what DataSync deletes in your destination location, but you want `ERRORS_ONLY` for everything else. In this example, you would add the following `Overrides` option to the `--task-report-config` parameter:

     ```
     "Overrides":{
       "Deleted":{
         "ReportLevel":"SUCCESSES_AND_ERRORS"
       }
     }
     ```

     If you don't use `Overrides`, your entire report uses the `ReportLevel` that you specify.

1. Run the `create-task` command to create your task.

   You get a response like the following that shows you the ARN of the task that you created. You will need this ARN to run the `start-task-execution` command.

   ```
   {
       "TaskArn": "arn:aws:datasync:us-east-1:123456789012:task/task-12345678abcdefgh"
   }
   ```

1. Copy the following `start-task-execution` command.

   ```
   aws datasync-task-report start-task-execution \
     --task-arn arn:aws:datasync:us-east-1:123456789012:task/task-12345678abcdefgh
   ```

1. For the `--task-arn` parameter, specify the ARN of the task you're running. Use the ARN that you received from running the `create-task` command.

1. Run the `start-task-execution` command.

When your transfer is complete, you can [view your task report](task-report-viewing.md).

# Viewing your DataSync task reports
<a name="task-report-viewing"></a>

DataSync creates task reports for every task execution. When your execution completes, you can find the related task reports in your S3 bucket. Task reports are organized under prefixes that include the IDs of your tasks and their executions.

To help locate task reports in your S3 bucket, use these examples:
+ **Summary only task report** – `reports-prefix/Summary-Reports/task-id-folder/task-execution-id-folder`
+ **Standard task report** – `reports-prefix/Detailed-Reports/task-id-folder/task-execution-id-folder`

Because task reports are in JSON format, you have several options for viewing your reports:
+ View a report by using [Amazon S3 Select](https://docs.aws.amazon.com/AmazonS3/latest/userguide/selecting-content-from-objects.html).
+ Visualize reports by using AWS services such as AWS Glue, Amazon Athena, and Amazon Quick. For more information about visualizing your task reports, see the [AWS Storage Blog](https://aws.amazon.com/blogs/storage/derive-insights-from-aws-datasync-task-reports-using-aws-glue-amazon-athena-and-amazon-quicksight/).