# Amazon EventBridge Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Alias](/docs/segment/connections/spec/alias), [Group](/docs/segment/connections/spec/group), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Amazon EventBridge** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)

### Components

* Server

## Connection Modes

[Learn more about connection modes.](/docs/segment/connections/destinations/#connection-modes)

### Device-Mode

* web: no
* mobile: no
* server: no

### Cloud-Mode

* web: yes
* mobile: yes
* server: yes

[Amazon EventBridge](https://aws.amazon.com/eventbridge/) is the easiest way to onboard your Segment data into the AWS ecosystem.

In addition to already supported destinations like Kinesis, S3, and Redshift, you can use EventBridge to selectively route streaming data into Amazon SQS, SNS, and any service supported by [AWS CloudWatch Events](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/WhatIsCloudWatchEvents.html).

## Getting started

To set up:

1. In Segment, provide your AWS Account ID and the region you'd like to configure the Segment Partner Event Source in. Ensure the same region is selected in both Segment and AWS.
2. Once you send an event through with the destination enabled, Segment creates a Partner Event Source in Amazon EventBridge. You can then activate this source in the AWS Console.
3. Use the [AWS Console](http://console.aws.amazon.com/events/) to configure rules and destinations for the events in your Segment Partner Event Source.

The Event Source will be denoted by your Segment Source ID, which you can find in Source Settings under API Keys.

All messages in the source (pending any Destination Filters you've enabled) are fowarded to the Segment Partner Event Source, created in EventBridge.

> \[!NOTE]
>
> Segment recommends that you create a separate Segment source for testing if you use a test Account ID. You **cannot change** the test Account ID to a production Account ID later.

## Page

If you're not familiar with the Segment Specs, review the [Page method](/docs/segment/connections/spec/page/) docs for more detail. An example Page call is as follows:

```javascript
  analytics.page();
```

## Identify

If you're not familiar with the Segment Specs, review the [Identify method](/docs/segment/connections/spec/identify/) docs for more detail. An example Identify call is as follows:

```javascript
analytics.identify('97980cfea0085', {
  email: 'gibbons@example.com',
  name: 'John Gibbons'
});
```

## Track

If you're not familiar with the Segment Specs, review the [Track method](/docs/segment/connections/spec/track/) docs for more detail. An example Track call is as follows:

```javascript
analytics.track("User Registered", {
  checkinDate: new Date(),
  myCoolProperty: "foobar",
});
```

## FAQs

#### Can I change my AWS Account ID?

You can only configure one AWS Account ID per source. Once you've configured your Amazon EventBridge destination with an AWS Account ID, you cannot modify it. If you need to change the AWS Account ID, you need to create a new Segment source and configure a new destination.

Alternatively, you can sync a [Repeater destination](/docs/segment/connections/destinations/catalog/repeater/) to your existing source. It repeats the events through the new source you've created. This new source can then be connected to a new EventBridge destination which can be configured with a new Account ID in the settings.

## Engage

You can send computed traits and audiences generated using [Engage](/docs/segment/engage) to this destination as a **user property**. To learn more about Engage, schedule a [demo](https://segment.com/contact/demo).

For user-property destinations, an [identify](/docs/segment/connections/spec/identify/) call is sent to the destination for each user being added and removed. The property name is the snake\_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property `order_completed_last_30days: true`. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to `false`.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

> \[!NOTE]
>
> Real-time audience syncs to Amazon EventBridge  may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.

## Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

| Field          | Description                                              | Required | Type   |
| -------------- | -------------------------------------------------------- | -------- | ------ |
| AWS Account ID | The ID of the AWS Account you'd like us to send data to. | Yes      | string |
| Region         | The EventBridge Firehose AWS region key.                 | Yes      | string |
