

# Logging and monitoring in AWS Data Exchange
<a name="logging-and-monitoring"></a>

Monitoring is an important part of the well-architected nature of AWS Data Exchange. You should collect monitoring data from each part of your AWS solution so that you can more easily debug a multi-point failure, if one occurs. AWS provides several tools for monitoring your resources and activity in AWS Data Exchange so you can plan for and respond to potential incidents.

The logging of actions and events in AWS Data Exchange is accomplished through its integration with Amazon CloudWatch.

The following sections describe monitoring and logging in AWS Data Exchange:

**Topics**
+ [Monitoring AWS Data Exchange](monitoring-overview.md)
+ [Amazon EventBridge events for AWS Data Exchange](cloudwatch-events.md)
+ [AWS User Notifications for AWS Data Exchange events](user-notifications.md)
+ [Logging AWS Data Exchange API calls with AWS CloudTrail](logging-api-calls-with-cloudtrail.md)
+ [Upcoming changes in AWS Data Exchange CloudTrail logging](upcoming-changes-in-cloudtrail-logging.md)

# Monitoring AWS Data Exchange
<a name="monitoring-overview"></a>

Monitoring is an important part of maintaining the reliability, availability, and performance of AWS Data Exchange and your other AWS solutions. AWS provides the following monitoring tools to watch AWS Data Exchange, report when something is wrong, and take automatic actions when appropriate:
+ Amazon CloudWatch Events delivers a near-real-time stream of system events that describe changes in AWS resources. CloudWatch Events enables automated event-driven computing. You can write rules that watch for certain events and respond with automated actions in other AWS services when these events occur. For more information, see the [Amazon CloudWatch Events User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/).
+ Amazon CloudWatch Logs makes it possible for you to monitor, store, and access your log files from Amazon Elastic Compute Cloud (Amazon EC2) instances, AWS CloudTrail, and other sources. CloudWatch Logs can monitor information in the log files and notify you when certain thresholds are met. You can also archive your log data in highly durable storage. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/).
+ CloudTrail captures API calls and related events made by or on behalf of your AWS account and delivers the log files to an Amazon Simple Storage Service (Amazon S3) bucket that you specify. You can identify which users and accounts called AWS, the source IP address from which the calls were made, and when the calls occurred.

# Amazon EventBridge events for AWS Data Exchange
<a name="cloudwatch-events"></a>

AWS Data Exchange is integrated with Amazon EventBridge, formerly called Amazon CloudWatch Events. EventBridge is an event bus service that you can use to connect your applications with data from a variety of sources. For more information, see the [Amazon EventBridge User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html).

As a subscriber with an active subscription to a product, you receive an *event* from AWS Data Exchange every time the provider publishes new revisions or adds new data sets to an existing product. The event contains the `DataSetId` and the list of `RevisionIds` that have been published.

Providers can send notifications corresponding to data updates, data delays, schema changes, and deprecations. Providers have the option to include comments and expected actions for subscribers to follow. Subscribers receive these notifications as events in Amazon EventBridge, which they can use to build automated workflows or deliver human-readable notifications to emails and chat programs using [AWS User Notifications](https://docs.aws.amazon.com/notifications/latest/userguide/what-is-service.html).

Data product related events are emitted in the AWS Region where the provider published the data set. You must set up EventBridge rules that use these events in the same AWS Region or see [Sending and receiving Amazon EventBridge events between AWS Regions](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cross-region.html) for more options.

This topic provides detailed information about each event listed in the following table. The table includes events received by a subscriber when a provider adds a data set to a product, adds a revision to a product, revokes a revision to a product, or removes access to a product.


****  

| Actions | Event received | Related topic | 
| --- | --- | --- | 
| Adds a file-based data set to a product and publishes it | Data Sets Published To Product | [Events for adding file-based data sets](#events-add-data-sets) | 
| Adds an Amazon S3 data access data set to a product and publishes it | Amazon S3 Data Access Data Sets Published To Product | [Events for adding Amazon S3 data access data sets](#events-add-s3-data-access-data-sets) | 
| Adds an AWS Lake Formation data permission data set and publishes it | AWS Lake Formation Data Permission Data Set Published To Product | [Events for adding AWS Lake Formation data permission data sets](#events-add-LF-data-sets) | 
| Adds an Amazon Redshift data set to a product and publishes it | Redshift Data Shares Data Sets Published To Product | [Events for adding Amazon Redshift datashare data sets](#events-add-RS-data-sets) | 
| Adds an Amazon API Gateway data set to a product and publishes it | API Gateway API Data Sets Published To Product | [Events for adding Amazon API Gateway API data sets](#events-add-api-gateway-api-data-sets) | 
| Adds a file-based data set revision to a product and publishes it | Revision Published To Data Set | [Events for adding revisions](#events-add-revisions) | 
| Adds an Amazon S3 data access data set revision to a product and publishes it | Revision Published to Amazon S3 Data Access Data Set | [Events for adding Amazon S3 data access data set revisions](#events-add-s3-revisions) | 
| Adds an AWS Lake Formation data permission data set revision to a product and publishes it | Revision Published To Lake Formation Data Permission Data Set | [Events for adding AWS Lake Formation data permission data set revisions (Preview)](#events-add-LF-revision) | 
| Adds an Amazon Redshift datashare data set revision to a product and publishes it | Revision Published To Redshift Data Shares Data Set | [Events for adding Amazon Redshift datashare data set revisions](#events-add-RS-revision) | 
| Adds an Amazon API Gateway data set revision to a product and publishes it | Revision Published To API Gateway API Data Set | [Events for adding Amazon API Gateway API data set revisions](#events-add-api-gateway-api-data-sets-revisions) | 
| Revokes revision to a product | Revision Revoked | [Events for revoking revisions](#events-revoke-revisions) | 
| Takes an action on their Amazon Redshift resources that might remove access from a subscriber | Action Performed On Redshift Data Share By Provider | [Events for an action performed on an Amazon Redshift resource](#events-RS-action) | 
| Takes an action on their Amazon Redshift resources that removes access from a subscriber | Redshift Data Share Access Lost | [Events for losing access to an Amazon Redshift datashare](#events-RS-lost-access) | 
| Sends a notification for a data update | Data Updated in Data Set | [Events for a provider-generated notification of a data update](#events-provider-generated-notification-of-data-update) | 
| Sends a notification for a schema change | Schema Change Planned for Data Set | [Events for a provider-generated notification of a schema change](#events-provider-generated-notification-of-schema-change) | 
| Sends a notification for a data delay | Data Set Update Delayed | [Events for a provider-generated notification of a data delay](#events-provider-generated-notification-of-data-delay) | 
| Sends a notification for a data deprecation | Deprecation Planned for Data Set | [Events for a provider-generated notification of a data deprecation](#events-provider-generated-notification-of-data-deprecation) | 
| Sends an event when a data consumer accepts a data grant | Data Grant Accepted | [Events for accepting a data grant](#data-grant-accepted-event) | 
| Sends an event when a data producer extends a data grant | Data Grant Extended | [Events for extending data grants](#data-grant-extended-event) | 
| Sends an event when a data producer revokes a data grant | Data Grant Revoked | [Events for revoking a data grant](#data-grant-revoked-event) | 
| Auto-export job completed | Auto-export Job Completed | [Events for an auto-export job completed](#events-auto-export-job-complete) | 
| Auto-export job failed | Auto-export Job Failed | [Events for an auto-export job failed](#events-auto-export-job-failed) | 

**Note**  
AWS Data Exchange emits events on a best effort basis. For more information about event delivery, see [Events from AWS services](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html).

## Events for adding file-based data sets
<a name="events-add-data-sets"></a>

When a provider adds file-based data sets to a product and publishes it, the subscriber receives an event with the `Data Sets Published To Product` detail type. 

The following example shows the event body for the detail type. 

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Data Sets Published To Product",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2020-07-29T18:24:04Z",
    "region": "us-east-1",
    "resources":  [
        "prod-uEXAMPLEabc1d" 
    ],
    "detail":  {
        "DataSetIds":  [
            "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
            "5bgd734EXAMPLE100f7gdd9EXAMPLEe9" 
        ],
        "DataSets": [
            {
               "Id" : "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
               "Name": "Data_Set_Hello_World_One"
            },
            {
               "Id" : "5bgd734EXAMPLE100f7gdd9EXAMPLEe9",
               "Name": "Data_Set_Hello_World_Two"
            }
        ],
        "Product":  
         { 
            "Id" : "prod-uEXAMPLEabc1d",
            "Name": "Product_Hello_World"
         }
    }
}
```

## Events for adding Amazon S3 data access data sets
<a name="events-add-s3-data-access-data-sets"></a>

When a provider adds an Amazon S3 data access data set to a product and publishes it, the subscriber receives an event with the following detail type: `Amazon S3 Data Access Data Set(s) Published To Product`.

The following example shows the event body for the detail type.

```
{
	"version": "0",
	"id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
	"detail-type": "S3 Data Access Data Set(s) Published to Product",
	"source": "aws.dataexchange",
	"account": "123456789012",
	"time": "2020-07-29T18:24:04Z",
	"region": "us-east-1",
	"resources": [
		"prod-uEXAMPLEabc1d"
	],
	"detail": {
		"DataSetIds": [
			"4afc623EXAMPLE099e6fcc8EXAMPLEe8",
			"5bgd734EXAMPLE100f7gdd9EXAMPLEe9"
		],
		"DataSets": [{
				"Id": "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
				"Name": "Data_Set_Hello_World_One"
			},
			{
				"Id": "5bgd734EXAMPLE100f7gdd9EXAMPLEe9",
				"Name": "Data_Set_Hello_World_Two"
			}
		],
		"Product": {
			"Id": "prod-uEXAMPLEabc1d",
			"Name": "Product_Hello_World"
		}
	}
}
```

## Events for adding AWS Lake Formation data permission data sets
<a name="events-add-LF-data-sets"></a>

When a provider adds an AWS Lake Formation data permission data set to a product and publishes it, the subscriber receives an event with the `Lake Formation Data Permission Data Sets Published To Product` detail type. 

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Lake Formation Data Permission Data Sets Published To Product",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2021-12-15T18:24:04Z",
    "region": "us-east-1",
    "resources": [
        "prod-uEXAMPLEabc1d"
    ],
    "detail": {
        "DataSetIds": [
            "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
            "5bgd734EXAMPLE100f7gdd9EXAMPLEe9"
        ],
        "DataSets": [
            {
                "Id": "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
                "Name": "Data_Set_Hello_World_One"
            },
            {
                "Id": "5bgd734EXAMPLE100f7gdd9EXAMPLEe9",
                "Name": "Data_Set_Hello_World_Two"
            }
        ],
        "Product": {
            "Id": "prod-uEXAMPLEabc1d",
            "Name": "Product_Hello_World"
        }
    }
}
```

## Events for adding Amazon Redshift datashare data sets
<a name="events-add-RS-data-sets"></a>

When a provider adds an Amazon Redshift datashare data set to a product and publishes it, the subscriber receives an event with the `Redshift Data Shares Data Sets Published To Product` detail type.

The following example shows the event body for the detail type. 

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Redshift Data Shares Data Sets Published To Product",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2021-12-15T18:24:04Z",
    "region": "us-east-1",
    "resources":  [
        "prod-uEXAMPLEabc1d" 
    ],
    "detail":  {
        "DataSetIds":  [
            "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
            "5bgd734EXAMPLE100f7gdd9EXAMPLEe9" 
        ],
        "DataSets": [
            {
               "Id" : "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
               "Name": "Data_Set_Hello_World_One"
            },
            {
               "Id" : "5bgd734EXAMPLE100f7gdd9EXAMPLEe9",
               "Name": "Data_Set_Hello_World_Two"
            }
        ],
        "Product":  
        { 
            "Id" : "prod-uEXAMPLEabc1d",
            "Name": "Product_Hello_World"
        } 
        
    }
}
```

## Events for adding Amazon API Gateway API data sets
<a name="events-add-api-gateway-api-data-sets"></a>

When a provider adds an Amazon API Gateway API data set to a product and publishes it, the subscriber receives an event with the `Amazon API Gateway Data Sets Published To Product` detail type.

The following example shows the event body for the detail type. 

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "API Gateway API Data Sets Published To Product",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2021-12-15T18:24:04Z",
    "region": "us-east-1",
    "resources":  [
        "prod-uEXAMPLEabc1d" 
    ],
    "detail":  {
        "DataSetIds":  [
            "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
            "5bgd734EXAMPLE100f7gdd9EXAMPLEe9" 
        ],
        "DataSets":  [
            {
                "Id" : "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
                "Name": "Data_Set_Hello_World_One" 
            },
            {
                "Id" : "5bgd734EXAMPLE100f7gdd9EXAMPLEe9",
                "Name": "Data_Set_Hello_World_Two" 
            }
        ],
        "Product":  {
            "Id" : "prod-uEXAMPLEabc1d",
            "Name": "Product_Hello_World" 
        }
    }
}
```

## Events for adding revisions
<a name="events-add-revisions"></a>

When a provider adds a data set to a product and publishes it, the subscriber receives an event with the `Revision Published To Data Set` detail type. 

The following example shows the event body for the detail type. 

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Revision Published To Data Set",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2020-07-29T04:16:28Z",
    "region": "us-east-1",
    "resources":  [
        "aae4c2cdEXAMPLE54f9369dEXAMPLE66" 
    ],
    "detail":  {
        "RevisionIds":  [
            "3afc623EXAMPLE099e6fcc8EXAMPLEe7" 
        ],
        "Revisions": [
            {
                "Id" : "3afc623EXAMPLE099e6fcc8EXAMPLEe7",
                "Comment": "Revision_Comment_One" 
            }
         ],
        "DataSets":  [
            {
                "Id" : "aae4c2cdEXAMPLE54f9369dEXAMPLE66",
                "Name": "Data_Set_Hello_World_One" 
            }
         ],
        "Product":  {
            "Id" : "prod-uEXAMPLEabc1d",
            "Name": "Product_Hello_World" 
        }
    }
}
```

## Events for adding Amazon S3 data access data set revisions
<a name="events-add-s3-revisions"></a>

When a provider adds an Amazon S3 data access data set revision to a product and publishes it, the subscriber receives an event with the `Revision Published To Amazon S3 Data Access Data Set` detail type.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Revision Published to S3 Data Access Data Set(s)",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2020-07-29T04:16:28Z",
    "region": "us-east-1",
    "resources":  [
        "aae4c2cdEXAMPLE54f9369dEXAMPLE66" 
    ],
    "detail":  {
        "RevisionIds":  [
            "3afc623EXAMPLE099e6fcc8EXAMPLEe7" 
        ],
        "Revisions": [
            {
                "Id" : "3afc623EXAMPLE099e6fcc8EXAMPLEe7",
                "Comment": "Revision_Comment_One" 
            }
         ],
        "DataSets":  [
            {
                "Id" : "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
                "Name": "Data_Set_Hello_World_One" 
            }
         ],
        "Product":  {
            "Id" : "prod-uEXAMPLEabc1d",
            "Name": "Product_Hello_World" 
        }
    }
}
```

## Events for adding AWS Lake Formation data permission data set revisions (Preview)
<a name="events-add-LF-revision"></a>

When a provider adds an AWS Lake Formation data permission data set revision to a product and publishes it, the subscriber receives an event with the `Revision Published to Lake Formation Data Permission Data Set` detail type.

The following example shows the event body for the detail type. 

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Revision Published to Lake Formation Data Permission Data Set",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2021-12-15T18:24:04Z",
    "region": "us-east-1",
    "resources": [
        "prod-uEXAMPLEabc1d"
    ],
    "detail": {
        "DataSetIds": [
            "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
            "5bgd734EXAMPLE100f7gdd9EXAMPLEe9"
        ],
        "DataSets": [
            {
                "Id": "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
                "Name": "Data_Set_Hello_World_One"
            },
            {
                "Id": "5bgd734EXAMPLE100f7gdd9EXAMPLEe9",
                "Name": "Data_Set_Hello_World_Two"
            }
        ],
        "Product": {
            "Id": "prod-uEXAMPLEabc1d",
            "Name": "Product_Hello_World"
        }
    }
}
```

## Events for adding Amazon Redshift datashare data set revisions
<a name="events-add-RS-revision"></a>

When a provider adds an Amazon Redshift datashare data set revision to a product and publishes it, the subscriber receives an event with the `Revision Published To Redshift Data Shares Data Set` detail type.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Revision Published To Redshift Data Shares Data Set",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2021-12-15T18:24:04Z",
    "region": "us-east-1",
    "resources":  [
        "aae4c2cdEXAMPLE54f9369dEXAMPLE66" 
    ],
    "detail":  {
        "RevisionIds":  [
            "3afc623EXAMPLE099e6fcc8EXAMPLEe7" 
        ],
        "Revisions": [
            {
                "Id" : "3afc623EXAMPLE099e6fcc8EXAMPLEe7",
                "Comment": "Revision_Comment_One," 
            }
         ],
        "DataSets":  [
            {
                "Id" : "aae4c2cdEXAMPLE54f9369dEXAMPLE66",
                "Name": "Data_Set_Hello_World_One" 
            }
         ],
        "Product":  {
            "Id" : "prod-uEXAMPLEabc1d",
            "Name": "Product_Hello_World" 
        }
    }
}
```

## Events for adding Amazon API Gateway API data set revisions
<a name="events-add-api-gateway-api-data-sets-revisions"></a>

When a provider adds an Amazon API Gateway API data set revision to a product and publishes it, the subscriber receives an event with the `Revision Published To API Gateway Data Set` detail type.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Revision Published To API Gateway API Data Set",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2021-12-15T18:24:04Z",
    "region": "us-east-1",
    "resources":  [
        "aae4c2cdEXAMPLE54f9369dEXAMPLE66" 
    ],
    "detail":  {
        "RevisionIds":  [
            "3afc623EXAMPLE099e6fcc8EXAMPLEe7" 
        ],
        "Revisions": [
            {
                "Id" : "3afc623EXAMPLE099e6fcc8EXAMPLEe7",
                "Comment": "Revision_Comment_One" 
            }
         ],
        "DataSets":  [
            {
                "Id" : "aae4c2cdEXAMPLE54f9369dEXAMPLE66",
                "Name": "Data_Set_Hello_World_One" 
            }
         ],
        "Product":  {
            "Id" : "prod-uEXAMPLEabc1d",
            "Name": "Product_Hello_World" 
        }
    }
}
```

The following table describes the API Gateway API data set revision error codes.


| Error code | Message | Description | 
| --- | --- | --- | 
| CLUSTER\$1DELETED | The datashare is unavailable because the provider deleted their cluster. Please contact the provider for more information. | This message is sent when the datashare is no longer available because the provider deleted the cluster containing the datashare. | 
| CLUSTER\$1ENCRYPTION\$1DISABLED | The datashare is unavailable because the provider disabled encryption on their cluster. Please contact the provider for more information. | This message is sent when the datashare is no longer available because the provider disabled encryption on their cluster. To use a datashare, both the provider and the subscriber must have encryption enabled. | 
| DATASHARE\$1DELETED | The datashare is unavailable because the provider deleted the datashare. Please contact the provider for more information. | This message is sent when the datashare is no longer available because the provider deleted it. The provider must create a new datashare so that you can regain access to the data. | 
| DATASHARE\$1DEAUTHORIZED | The datashare is unavailable because the provider de-authorized the datashare. Please contact the provider for more information. | This message is sent when the datashare is no longer available because the provider reauthorized the datashare. The provider must create a new datashare so that you can regain access to the data. | 
| DATASHARE\$1PUBLIC\$1CONSUMER\$1BLOCKED | You cannot access a non-publicly accessible datashare from a publicly accessible cluster. You must turn off public accessibility on your cluster to access this datashare. Please contact your provider for more information. |  This message is sent when a provider sets the **Publicly accessible** option to **Disable** on the cluster that contains their datashare. If the subscriber's cluster has the **Publicly accessible** option set to **Disable**, it will not affect their ability to access the datashare. For the subscriber to access the datashare, either the subscriber must set the **Publicly accessible** option to **Disable ** on their cluster, or the provider must set the **Publicly accessible** option to **Enable** on their cluster. Disable  on the cluster that contains their datashare. If the subscriber's cluster has the Publicly accessible option set to Disable, it will not affect their ability to access the datashare. For the subscriber to access the datashare, either the subscriber must set the Publicly accessible option to Disable  on their cluster, or the provider must set the Publicly accessible option to Enable  on their cluster. | 

## Events for revoking revisions
<a name="events-revoke-revisions"></a>

When a provider revokes a revision to a product and publishes it, the subscriber receives an event with the `Revision Revoked` detail type.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Revision Revoked",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2022-02-17T21:25:06Z",
    "region": "us-east-1",
    "resources":  [
        "aae4c2cdEXAMPLE54f9369dEXAMPLE66" 
    ],
    "detail":  {
        "RevisionIds":  [
            "3afc623EXAMPLE099e6fcc8EXAMPLEe7" 
        ],
        "RevocationComment": "example revocation comment",
        "Revisions": [
            {
                "Id" : "3afc623EXAMPLE099e6fcc8EXAMPLEe7",
                "Comment": "Revision_Comment_One" 
            }
         ],
        "DataSets":  [
            {
                "Id" : "aae4c2cdEXAMPLE54f9369dEXAMPLE66",
                "Name": "Data_Set_Hello_World_One" 
            }
         ],
        "Product":  {
            "Id" : "prod-uEXAMPLEabc1d",
            "Name": "Product_Hello_World" 
        }
    }
}
```

## Events for an action performed on an Amazon Redshift resource
<a name="events-RS-action"></a>

When a provider takes an action on their Amazon Redshift resources that *might* remove access from a subscriber, the subscriber receives an event with the `Action Performed On Redshift Data Share By Provider` detail type.

For example, if a provider changes the data share's public accessibility setting from `true` to `false`, the subscriber receives an event.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Action Performed On Redshift Data Share By Provider",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2021-12-15T18:24:04Z",
    "region": "us-east-1",
    "resources":  [
        "arn:aws:redshift:us-east-1:098765432123:datashare:01234567-2590-7654-1234-f57ea0081234/test_data_share" 
    ],
    "detail":  {
        "Message": "This is an example message which explains why you may have lost access.",
        "AssociatedProducts":  [
            {
                "ProductId": "aae4c2cdEXAMPLE54f9369dEXAMPLE66",
                "DataSetIds":  [
                    "4afc623EXAMPLE099e6fcc8EXAMPLEe8" 
                ],
                "DataSets":  [
                    {
                        "Id" : "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
                        "Name": "Data_Set_Hello_World_One" 
                    }
                ],
                "Product":  {
                    "Id" : "aae4c2cdEXAMPLE54f9369dEXAMPLE66",
                    "Name": "Product_Hello_World" 
                }
            }
        ]
    }
}
```

## Events for losing access to an Amazon Redshift datashare
<a name="events-RS-lost-access"></a>

When a provider takes an action on their Amazon Redshift resources that removes access from a subscriber, the subscriber receives an event with the `Redshift Data Share Access Lost` detail type.

For example, if a provider deletes an Amazon Redshift datashare or deletes a cluster, the subscriber receives an event.

The following example shows the event body for the detail type. 

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Redshift Data Share Access Lost",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2021-12-15T18:24:04Z",
    "region": "us-east-1",
    "resources":  [
        "arn:aws:redshift:us-east-1:098765432123:datashare:01234567-2590-7654-1234-f57ea0081234/test_data_share" 
    ],
    "detail":  {
        "Message": "This is an example message which explains why you may have lost access.",
        "AssociatedProducts":  [
            {
                "ProductId": "aae4c2cdEXAMPLE54f9369dEXAMPLE66",
                "DataSetIds":  [
                    "4afc623EXAMPLE099e6fcc8EXAMPLEe8" 
                ],
                "DataSets":  [
                    {
                        "Id" : "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
                        "Name": "Data_Set_Hello_World_One" 
                    }
                ],
                "Product":  {
                    "Id" : "prod-uEXAMPLEabc1d",
                    "Name": "Product_Hello_World" 
                }
            }
        ]
    }
}
```

## Events for an auto-export job completed
<a name="events-auto-export-job-complete"></a>

After an auto-export job moves all the data in a newly published File data set revision to the subscriber's chosen Amazon S3 bucket, the subscriber receives an event with the `Auto-export Job Completed` detail type.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Auto-export Job Completed",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2020-07-29T18:24:04Z",
    "region": "us-east-1",
    "resources": [
        "prod-uEXAMPLEabc1d"
    ],
    "detail": {
        "RevisionIds": [
            "3afc623EXAMPLE099e6fcc8EXAMPLEe7"
        ],
        "Revisions": [{
            "Id": "3afc623EXAMPLE099e6fcc8EXAMPLEe7",
            "Comment": "Revision_Comment_One"
        }],
        "DataSetIds": [
            "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
        ],
        "DataSets": [{
            "Id": "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
            "Name": "Data_Set_Hello_World_One"
        }, ],
        "Product": {
            "Id": "prod-uEXAMPLEabc1d",
        }
    }
}
```

## Events for an auto-export job failed
<a name="events-auto-export-job-failed"></a>

When an auto-export job fails, the subscriber receives an event with the `Auto-export Job Failed` detail type.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Auto-Export job failed",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2020-07-29T18:24:04Z",
    "region": "us-east-1",
    "resources": [
        "prod-uEXAMPLEabc1d"
    ],
    "detail": {
        "RevisionIds": [
            "3afc623EXAMPLE099e6fcc8EXAMPLEe7"
        ],
        "Revisions": [{
            "Id": "3afc623EXAMPLE099e6fcc8EXAMPLEe7",
            "Comment": "Revision_Comment_One"
        }],
        "DataSetIds": [
            "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
            "5bgd734EXAMPLE100f7gdd9EXAMPLEe9"
        ],
        "DataSets": [{
                "Id": "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
                "Name": "Data_Set_Hello_World_One"
            },
            {
                "Id": "5bgd734EXAMPLE100f7gdd9EXAMPLEe9",
                "Name": "Data_Set_Hello_World_Two"
            }
        ],
        "Product": {
            "Id": "prod-uEXAMPLEabc1d",
        }
    }
}
```

## Events for a provider-generated notification of a data update
<a name="events-provider-generated-notification-of-data-update"></a>

When a provider sends a notification for a data update, the subscriber receives an event with the `Data Updated in Data Set` detail type.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Data Updated in Data Set",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2023-08-21T10:29:48Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:dataexchange:us-east-1::data-sets/b5538f9f45e4613d448eb9eEXAMPLEc6"
    ],
    "detail": {
        "DataSet": {
            "Id": "b5538f9f45e4613d448eb9eEXAMPLEc6",
            "Name": "Example Data Set",
            "AssetType": "S3_DATA_ACCESS"
        },
        "Product": {
            "Id": "prod-7ip6EXAMPLEhs",
            "Name": "Example Data Product",
            "ProviderContact": "no-reply@marketplace.aws"
        },
        "Notification": {
            "Comment": "This is a test DATA_UPDATE notification.",
            "Type": "DATA_UPDATE",
            "Details": {
                "DataUpdate": {
                    "DataUpdatedAt": "2023-07-12T00:00:00Z"
                }
            },
            "Scope": {
                "S3DataAccesses": [{
                    "KeyPrefixes": [
                        "KeyPrefix"
                    ],
                    "Keys": [
                        "KeyA",
                        "KeyB"
                    ]
                }]
            }
        }
    }
}
```

## Events for a provider-generated notification of a schema change
<a name="events-provider-generated-notification-of-schema-change"></a>

When a provider sends a notification for a schema change, the subscriber receives an event with the `Schema Change Planned for Data Set` detail type.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Schema Change Planned for Data Set",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2023-08-21T10:29:48Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:dataexchange:us-east-1::data-sets/b5538f9f45e4613d448eb9eEXAMPLEc6"
    ],
    "detail": {
        "DataSet": {
            "Id": "b5538f9f45e4613d448eb9eEXAMPLEc6",
            "Name": "Example Data Set",
            "AssetType": "S3_DATA_ACCESS"
        },
        "Product": {
            "Id": "prod-7ip6EXAMPLEhs",
            "Name": "Example Data Product",
            "ProviderContact": "no-reply@marketplace.aws"
        },
        "Notification": {
            "Comment": "This is a test SCHEMA_CHANGE notification.",
            "Type": "SCHEMA_CHANGE",
            "Details": {
                "SchemaChange": {
                    "Changes": [{
                            "Type": "ADD",
                            "Description": "This object is being added to the bucket, or a field is being added to the object.",
                            "Name": "KeyA"
                        },
                        {
                            "Type": "REMOVE",
                            "Description": "This object is being removed from the bucket or a field is being removed from the object.",
                            "Name": "KeyB"
                        },
                        {
                            "Type": "MODIFY",
                            "Description": "The usage or meaning of this key prefix is changing, or something is changing about every file under this key prefix.",
                            "Name": "KeyPrefix"
                        }
                    ],
                    "SchemaChangeAt": "2023-09-08T13:46:01Z"
                }
            },
            "Scope": {
                "S3DataAccesses": [{
                    "KeyPrefixes": [
                        "KeyPrefix"
                    ],
                    "Keys": [
                        "KeyA",
                        "KeyB"
                    ]
                }]
            }
        }
    }
}
```

## Events for a provider-generated notification of a data delay
<a name="events-provider-generated-notification-of-data-delay"></a>

When a provider sends a notification for a data delay, the subscriber receives an event with the following detail type: **Data Set Update Delayed**.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Data Set Update Delayed",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2023-08-21T10:29:48Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:dataexchange:us-east-1::data-sets/b5538f9f45e4613d448eb9eEXAMPLEc6"
    ],
    "detail": {
        "DataSet": {
            "Id": "b5538f9f45e4613d448eb9eEXAMPLEc6",
            "Name": "Example Data Set",
            "AssetType": "S3_DATA_ACCESS"
        },
        "Product": {
            "Id": "prod-7ip6EXAMPLEhs",
            "Name": "Example Data Product",
            "ProviderContact": "no-reply@marketplace.aws"
        },
        "Notification": {
            "Comment": "This is a test DATA_DELAY notification.",
            "Type": "DATA_DELAY",
            "Scope": {
                "S3DataAccesses": [{
                    "KeyPrefixes": [
                        "KeyPrefix"
                    ],
                    "Keys": [
                        "KeyA",
                        "KeyB"
                    ]
                }]
            }
        }
    }
}
```

## Events for a provider-generated notification of a data deprecation
<a name="events-provider-generated-notification-of-data-deprecation"></a>

When a provider sends a notification for a data deprecation, the subscriber receives an event with the `Deprecation Planned for Data Set` detail type.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Deprecation Planned for Data Set",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2023-08-21T10:29:48Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:dataexchange:us-east-1::data-sets/b5538f9f45e4613d448eb9eEXAMPLEc6"
    ],
    "detail": {
        "DataSet": {
            "Id": "b5538f9f45e4613d448eb9eEXAMPLEc6",
            "Name": "Example Data Set",
            "AssetType": "S3_DATA_ACCESS"
        },
        "Product": {
            "Id": "prod-7ip6EXAMPLEhs",
            "Name": "Example Data Product",
            "ProviderContact": "no-reply@marketplace.aws"
        },
        "Notification": {
            "Comment": "This is a test DEPRECATION notification.",
            "Type": "DEPRECATION",
            "Details": {
                "Deprecation": {
                    "DeprecationAt": "2023-09-08T13:46:01Z"
                }
            },
            "Scope": {
                "S3DataAccesses": [{
                    "KeyPrefixes": [
                        "KeyPrefix"
                    ],
                    "Keys": [
                        "KeyA",
                        "KeyB"
                    ]
                }]
            }
        }
    }
}
```

## Events for accepting a data grant
<a name="data-grant-accepted-event"></a>

When a data consumer accepts a data grant, the data owner receives an event with the `Data Grant Accepted` detail type.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Data Grant Accepted",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2022-02-17T21:25:06Z",
    "region": "us-east-1",
    "resources":  [
        "arn:aws:dataexchange:us-east-1::data-sets/4afc623EXAMPLE099e6fcc8EXAMPLEe8" 
    ],
    "detail":  {
        "DataSets":  [
            {
                "Id" : "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
                "Name": "Data_Set_Hello_World_One" 
            }
         ],
        "DataGrant":  {
            "Arn" : "arn:aws:dataexchange:us-east-1:123456789012:data-grants/4afc623EXAMPLE099e6fcc8EXAMPLEe9",
            "Name": "DataGrant_Hello_World" 
        }
    }
}
```

## Events for extending data grants
<a name="data-grant-extended-event"></a>

When a data owner extends a data grant, the data consumer receives an event with the `Data Grant Extended` detail type.

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Data Grant Extended",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2022-02-17T21:25:06Z",
    "region": "us-east-1",
    "resources":  [
        "arn:aws:dataexchange:us-east-1::data-sets/4afc623EXAMPLE099e6fcc8EXAMPLEe8"
    ],
    "detail":  {
        "DataSets":  [
            {
                "Id" : "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
                "Name": "Data_Set_Hello_World_One" 
            }
         ],
         "DataGrant":  {
            "Arn" : "arn:aws:dataexchange:us-east-1:123456789012:data-grants/4afc623EXAMPLE099e6fcc8EXAMPLEe9",
            "Name": "DataGrant_Hello_World" 
        }
    }
}
```

## Events for revoking a data grant
<a name="data-grant-revoked-event"></a>

When a data owner revokes a data grant, the data consumer receives an event with the `Data Grant Revoked` detail type. 

The following example shows the event body for the detail type.

```
{
    "version": "0",
    "id": "dc529cb6-2e23-4c5f-d020-EXAMPLE92231",
    "detail-type": "Data Grant Revoked",
    "source": "aws.dataexchange",
    "account": "123456789012",
    "time": "2022-02-17T21:25:06Z",
    "region": "us-east-1",
    "resources":  [
        "arn:aws:dataexchange:us-east-1::data-sets/4afc623EXAMPLE099e6fcc8EXAMPLEe8"
    ],
    "detail":  {
        "DataSets":  [
            {
                "Id" : "4afc623EXAMPLE099e6fcc8EXAMPLEe8",
                "Name": "Data_Set_Hello_World_One" 
            }
         ],
         "DataGrant":  {
            "Arn" : "arn:aws:dataexchange:us-east-1:123456789012:data-grants/4afc623EXAMPLE099e6fcc8EXAMPLEe9",
            "Name": "DataGrant_Hello_World" 
        }
    }
}
```

# AWS User Notifications for AWS Data Exchange events
<a name="user-notifications"></a>

You can use [AWS User Notifications](https://docs.aws.amazon.com/notifications/latest/userguide/what-is-service.html) to set up delivery channels that notify you about AWS Data Exchange events. You receive a notification when an event matches a specified rule. You can receive notifications for events through multiple channels, including email, Amazon Q Developer in chat applications chat notifications, or AWS Console Mobile Application push notifications. You can also see notifications using the Console Notifications Center in the AWS User Notifications console. AWS User Notifications supports aggregation, which can reduce the number of notifications you receive during specific events. For more information, see the [AWS User Notifications User Guide](https://docs.aws.amazon.com/notifications/latest/userguide/what-is-service.html).

To use AWS User Notifications, you must have the correct AWS Identity and Access Management (IAM) permissions. For more information about configuring your IAM permissions, see [Configuring AWS User Notifications](https://docs.aws.amazon.com/notifications/latest/userguide/getting-started.html#getting-started-step1) in the *AWS User Notifications User Guide*. 

The following table provides more information about the notifications that you can configure for AWS Data Exchange events using AWS User Notifications.


| Actions | Notification received by subscriber | 
| --- | --- | 
| Adds a file-based data set to a product and publishes it | Data Sets Published To Product | 
| Adds an Amazon Redshift data set to a product and publishes it | Redshift Data Shares Data Sets Published To Product | 
| Adds a file-based data set revision to a product and publishes it | Revision Published To Data Set | 
| Revokes revision to a product | Revision Revoked | 
| Adds an Amazon Redshift data set revision to a product and publishes it | Revision Published To Redshift Data Shares Data Set | 
| Takes an action on Amazon Redshift resources that might remove access from a subscriber | Action Performed On Redshift Data Share By Provider | 
| Takes an action on Amazon Redshift resources that removes access from a subscriber | Redshift Data Share Access Lost | 
| Adds an Amazon API Gateway data set to a product and publishes it | API Gateway API Data Sets Published To Product | 
| Adds an Amazon API Gateway data set revision to a product and publishes it | Revision Published To API Gateway API Data Set | 
| Adds an AWS Lake Formation data set to a product and publishes it (Preview) | Lake Formation Data Permission Data Sets Published To Product (Preview) | 
| Adds an AWS Lake Formation data set revision to a product and publishes it (Preview) | Revision Published To Lake Formation Data Permission Data Set (Preview) | 
| Auto-export job completed | Auto-export Job Completed | 
| Auto-export job failed | Auto-export Job Failed | 
| Sends notification for a data update | Data Updated in Data Set | 
| Sends notification for a schema change | Schema Change Planned for Data Set | 
| Sends notification for a data delay | Data Set Update Delayed | 
| Sends notification for a data deprecation | Deprecation Planned for Data Set | 

# Logging AWS Data Exchange API calls with AWS CloudTrail
<a name="logging-api-calls-with-cloudtrail"></a>

 AWS Data Exchange is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in AWS Data Exchange. AWS CloudTrail captures all calls to AWS Data Exchange API operations as events, including calls from the AWS Data Exchange console and from code calls to the AWS Data Exchange API operations.

If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon Simple Storage Service (Amazon S3) bucket, including events for AWS Data Exchange. If you don't configure a trail, you can still view the most recent events in the CloudTrail console in **Event history**. Using the information collected by CloudTrail, you can determine the request that was made to AWS Data Exchange, the IP address from which the request was made, who made the request, when it was made, and other details.

**Important**  
Some actions you can take are console-only actions. There is no corresponding API in the AWS SDK or AWS Command Line Interface (AWS CLI). These are actions that rely on AWS Marketplace functionality, such as publishing or subscribing to a product. AWS Data Exchange provides CloudTrail logs for a subset of these console-only actions. See the following list of console-only actions for which CloudTrail logs are provided.  
For more information, see [What Is AWS CloudTrail?](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/)

In addition to CloudTrail events for all the [AWS Data Exchange APIs](https://docs.aws.amazon.com/data-exchange/latest/apireference) and corresponding console actions, AWS Data Exchange also provides CloudTrail trails for a subset of the AWS Marketplace-backed console-only actions. AWS Data Exchange provides a CloudTrail log for the following console-only actions:

**Subscriber actions**
+ Subscribe to a product
+ Send subscription verification request
+ Enable subscription auto-renewal
+ Disable subscription auto-renewal
+ Cancel subscription verification request
+ List active subscriptions
+ Check subscription status
+ List targeted private offers
+ View details of a specific product and offer
+ View details of a specific subscription
+ View details of a specific subscription verification request

**Provider actions**
+ Publish a product
+ Unpublish a product
+ Edit a product
+ Create custom offer
+ Edit custom offer
+ Approve subscription verification request
+ Decline subscription verification request
+ Delete subscriber contact information
+ List subscription verification requests
+ View details of a specific subscription verification request
+ Send a notification for a data set

## AWS Data Exchange information in CloudTrail
<a name="information-in-cloudtrail"></a>

CloudTrail is enabled when you create your AWS account. When activity occurs in AWS Data Exchange, the activity is recorded in a CloudTrail event along with other AWS service events in **Event history**. You can view, search, and download recent events in your AWS account. For more information, see [Viewing Events with CloudTrail Event History](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html) in the *AWS CloudTrail User Guide*.

For an ongoing record of events in your AWS account, including events for AWS Data Exchange, create a trail. CloudTrail uses this trail to deliver log files to an S3 bucket. By default, when you use the console to create a trail, it applies to all AWS Regions. The trail logs events from all Regions and delivers the log files to the S3 bucket that you specify. You can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see:
+ [Overview for Creating a Trail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)
+ [CloudTrail Supported Services and Integrations](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html#cloudtrail-aws-service-specific-topics-integrations)
+ [Configuring Amazon SNS Notifications for CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/getting_notifications_top_level.html)
+ [Receiving CloudTrail Log Files from Multiple Regions](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html)
+ [Receiving CloudTrail Log Files from Multiple Accounts](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)

 All AWS Data Exchange actions are documented in the *AWS Data Exchange API Reference*. Every AWS Data Exchange action, except for `SendAPIAsset`, is logged by CloudTrail. For example, calls to the `CreateDataSet`, `StartImportAssetsFromS3Workflow`, and `ListRevisionAssets` API operations generate entries in the CloudTrail log files.

Every event or log entry contains information about who generated the request. The identity information helps you determine the following:
+ Whether the request was made with root or AWS Identity and Access Management (IAM) credentials.
+ Whether the request was made with temporary security credentials for a role or federated user.
+ Whether the request was made by another AWS service.

For more information, see [CloudTrail userIdentity Element](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html).

## Understanding AWS Data Exchange log file entries
<a name="understanding-log-entries"></a>

A trail is a configuration that makes it possible to deliver events as log files to an S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files are not an ordered stack trace of the public API calls, so they do not appear in any order.

**Note**  
These examples have been formatted to improve readability. In a CloudTrail log file, all entries and events are concatenated into a single line. This example has been limited to a single AWS Data Exchange entry. In a real CloudTrail log file, you see entries and events from multiple AWS services.

The following example shows a CloudTrail log entry that demonstrates the `CreateDataSet` operation.

```
{
    "eventVersion": "1.05",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AIDACKCEVSQ6C2EXAMPLE:account_name",
        "arn": "arn:aws:sts::123456789012:user/Mary_Major",
        "accountId": "123456789012",
        "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
        "sessionContext": {
            "attributes": {
                "mfaAuthenticated": "false",
                "creationDate": "2018-06-20T18:32:25Z"
            },
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AIDACKCEVSQ6C2EXAMPLE",
                "arn": "arn:aws:iam::123456789012:role/Admin",
                "accountId": "123456789012",
                "userName": "username"
            }
        }
    },
    "eventTime": "2018-06-20T19:04:36Z",
    "eventSource": "dataexchange.amazonaws.com",
    "eventName": "CreateDataSet",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "203.0.113.12",
    "userAgent": "console.amazonaws.com",
    "requestParameters": {
        "Name": "MyDataSet",
        "AssetType": "S3_SNAPSHOT",
        "Description": "This is my data set"
    },
    "responseElements": {
        "Origin": "OWNED",
        "AssetType": "S3_SNAPSHOT",
        "Name": "MyDataSet",
        "CreatedAt": 1726255485679,
        "UpdatedAt": 1726255485679,
        "Arn": "arn:aws:dataexchange:us-east-1:123456789012:data-sets/DataSetIdentifier",
        "Id": "DataSetIdentifier",
        "Description": "This is my data set"
    },
    "requestID": "cb8c167e-EXAMPLE",
    "eventID": "e3c6f4ce-EXAMPLE",
    "readOnly": false,
    "eventType": "AwsApiCall",
    "recipientAccountId": "123456789012"
}>
```

# Upcoming changes in AWS Data Exchange CloudTrail logging
<a name="upcoming-changes-in-cloudtrail-logging"></a>

This section summarizes the upcoming changes for logging API calls in AWS CloudTrail for AWS Data Exchange. The effective date for the change is on or after September 1, 2023. We recommend reviewing your CloudTrail usage to make sure this change will not impact your monitoring, analysis, or auditing. For questions or concerns, please send an email message to [Support](https://console.aws.amazon.com/support/home#/case/create%3FissueType=customer-service).


| Customer persona | Event description | Previous eventName | New eventName | Previous eventSource | New eventSource | 
| --- | --- | --- | --- | --- | --- | 
| Subscriber | Subscribe to a product | Subscribe | CreateAgreementRequest and AcceptAgreementRequest | aws-marketplace.amazonaws.com | agreement-marketplace.amazonaws.com | 
| Subscriber | Send subscription verification request | Subscribe | CreateAgreementRequest and AcceptAgreementRequest | aws-marketplace.amazonaws.com | agreement-marketplace.amazonaws.com | 
| Subscriber | Enable subscription auto-renewal | Subscribe | CreateAgreementRequest and AcceptAgreementRequest | aws-marketplace.amazonaws.com | agreement-marketplace.amazonaws.com | 
| Subscriber | Disable subscription auto-renewal | Unsubscribe | CreateAgreementRequest and AcceptAgreementRequest | aws-marketplace.amazonaws.com | agreement-marketplace.amazonaws.com | 
| Subscriber | Cancel subscription verification request | CancelAgreementRequest | CancelAgreementRequest | aws-marketplace.amazonaws.com | agreement-marketplace.amazonaws.com | 
| Provider | Publish a product | StartChangeSet | StartChangeSet | aws-marketplace.amazonaws.com | marketplacecatalog.amazonaws.com | 
| Provider | Edit a product | StartChangeSet | StartChangeSet | aws-marketplace.amazonaws.com | marketplacecatalog.amazonaws.com | 
| Provider | Unpublish a product | StartChangeSet | StartChangeSet | aws-marketplace.amazonaws.com | marketplacecatalog.amazonaws.com | 
| Provider | Create custom offer | StartChangeSet | StartChangeSet | aws-marketplace.amazonaws.com | marketplacecatalog.amazonaws.com | 
| Provider | Edit custom offer | StartChangeSet | StartChangeSet | aws-marketplace.amazonaws.com | marketplacecatalog.amazonaws.com | 
| Provider | Approve subscription verification request | AcceptAgreementApprovalRequest | AcceptAgreementApprovalRequest | aws-marketplace.amazonaws.com | agreement-marketplace.amazonaws.com | 
| Provider | Decline subscription verification request | RejectAgreementApprovalRequest | RejectAgreementApprovalRequest | aws-marketplace.amazonaws.com | agreement-marketplace.amazonaws.com | 
| Provider | Delete subscriber contact information | UpdateAgreementApprovalRequest | UpdateAgreementApprovalRequest | aws-marketplace.amazonaws.com | agreement-marketplace.amazonaws.com | 