> ## Documentation Index
> Fetch the complete documentation index at: https://ampersand-24eb5c1a-rajatspawar-eng-4200-readd-blob-storage.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon EventBridge destinations

For more information on destinations, see the [Destinations](/destinations) page.

When new data is read from a SaaS instance via a [Read Action](/read-actions) or [Subscribe Action](/subscribe-actions), Ampersand publishes the payload as events to your Amazon EventBridge event bus.

## Prerequisites

Before setting up an EventBridge destination, ensure that you have:

* An AWS account with an EventBridge event bus
* AWS credentials with `events:PutEvents` permission on that event bus

## Data format

Ampersand publishes each read or subscribe message to your event bus. The message payload is carried in the event's `detail` field, and its schema is defined in [webhook.yaml](https://github.com/amp-labs/openapi/blob/main/webhook/webhook.yaml).

## Create an EventBridge destination

Go to the [Destinations page](https://dashboard.withampersand.com/projects/_/destinations) in the Ampersand Dashboard and create a new EventBridge destination.

You'll need to provide:

| Field                     | Type   | Required | Example                | Description                                                       |
| ------------------------- | ------ | -------- | ---------------------- | ----------------------------------------------------------------- |
| **Destination name**      | string | Yes      | `ampersandEventBridge` | Alias to reference in your `amp.yaml` file                        |
| **Event bus name**        | string | Yes      | `default`              | Name of your EventBridge event bus                                |
| **Region**                | string | Yes      | `us-west-2`            | AWS region where your event bus is located                        |
| **AWS Access Key ID**     | string | Yes      | `AKIAIOSFODNN7EXAMPLE` | AWS access key with `events:PutEvents` permission                 |
| **AWS Secret Access Key** | string | Yes      |                        | AWS secret access key                                             |
| **Detail type**           | string | No       | `ampersand.record`     | Value to set as the EventBridge `detail-type` on published events |

## Refer to the destination in your integration

After creating your EventBridge destination, reference it in your `amp.yaml` file:

```yaml theme={null}
specVersion: 1.0.0
integrations:
  - name: salesforceToEventBridge
    displayName: Salesforce to EventBridge
    provider: salesforce
    read:
      objects:
        - objectName: account
          destination: ampersandEventBridge
        - objectName: contact
          destination: ampersandEventBridge
```
