# Amazon EventBridge

Amazon Event Bridge is a Serverless event bus that connects application data from your own apps, SaaS, and AWS services and delivers real-time data to targets such as AWS Lambda. You can set up routing rules to determine where to send your data to build application architectures that react in real time to all of your data sources. EventBridge enables you to build event-driven architectures that are loosely coupled and distributed. For more info, check out the intro video below.

Intro: <https://youtu.be/TXh5oU_yo9M>

ixHello allows for the rapid integration of Event-Bridge to various voice channels such as Alexa, Lex, Google Assistant and more.

### Objective:

The objective of this document is to allow users to integrate Amazon EventBridge with ixHello and perform basic operations such as event generation.

Here are some prerequisites that the user that need to be fulfilled to move forward:

* **An Active ixHello Account**

You can register [here](http://bots.ixhello.com) if you do not have one already.

* **An active AWS Account**

If you do not have an active AWS account, you can create one at <https://portal.aws.amazon.com/billing/signup#/start>

* **At least one Amazon EventBridge Event Bus and At least one rule defined**

If you do not have any Aurora DB instance, you can create one quickly.

* Login to AWS Management Console at <https://console.aws.amazon.com/>
* Go to Services > EventBridge > Create Rule.

<figure><img src="/files/LQ3IYBf1X3Xp7esFzY0L" alt=""><figcaption></figcaption></figure>

You can use the following details:

| **Name**: ContactFinderRule                                                      |
| -------------------------------------------------------------------------------- |
| **Description**(optional): This event triggers contact finder lambda function    |
| **Define Pattern**: Define pattern or schedule for invoking the target.          |
| **Event Pattern**: Checked                                                       |
| **Event matching pattern**: pre-defined pattern by service                       |
| **Service provider**: All Events                                                 |
| Select event bus                                                                 |
| **AWS default event bus**: Checked                                               |
| **Enable the rule on the selected event bus**: Enabled                           |
| **Target**: Lambda Function                                                      |
| **Function**: ContactFinder (Refer to this document to create a lambda function) |
| Click on **Create**                                                              |

<figure><img src="/files/zoln8EosSzh5Pt08Eft0" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/A0jdHa9fYtFc19xwNWio" alt=""><figcaption></figcaption></figure>

### Integration with ixHello

1. On the left-hand navigation panel, expand **Integration**, select **Connect System**,  and press **Connection Gallery**.

<figure><img src="/files/lcoqg0bdYSketpGrszMD" alt=""><figcaption></figcaption></figure>

2. Scroll down and find Amazon Event Bridge. Press **Connect**.

<div align="center"><figure><img src="/files/9r2ygXp2KomK7gxxaxag" alt="" width="167"><figcaption></figcaption></figure></div>

3. The Configuration screen opens. Give the instance a name and provide AWS Region, Consumer Key, and Consumer Secret. The required AWS Credentials can be found from the AWS IAM console. Visit [Video: How to get Amazon (AWS) Key and Secret](https://aws.amazon.com/premiumsupport/knowledge-center/create-access-key/)

<figure><img src="/files/GTsy09zB32BnLdJirPnE" alt=""><figcaption></figcaption></figure>

Once this is done, Create an App and a Data Source.

### Create App in ixHello

To create app, go to Apps > Custom Apps on the left-hand panel. Press **New Custom App**.&#x20;

<figure><img src="/files/37BBf4Zn7VRamryA9MQ0" alt=""><figcaption></figcaption></figure>

Enter following details in the resulting page:

<div align="center"><figure><img src="/files/nAR1bNSyMlLvZe5Tfvnv" alt="" width="375"><figcaption></figcaption></figure></div>

| Name: EventBridge       |
| ----------------------- |
| Custom App Type: Search |
| Category: Default       |

Press **Save**. The new App will appear in the Custom Apps Listing.

<figure><img src="/files/d1z4BHdWX7V6YrEzQoyK" alt=""><figcaption></figcaption></figure>

### Create Data Source

Once the App is created, go to the **Data Sources** tab and press **Create New Data Source**.

<figure><img src="/files/oDb1RVdT5MHiN0iDJ13q" alt=""><figcaption></figcaption></figure>

| Name: EventBridge DS                                                                                 |
| ---------------------------------------------------------------------------------------------------- |
| Integration Configuration: Amazon EventBridge : EventBridge ( the integration created in step above) |

![](/files/ABzeDwHvTrR3CadnaEzB)

### Create Method:

As of the publication date of this document, Event Bridge has only one method available: **PutEvent**. This method allows you to create an event on Amazon EventBridge using the ixHello platform.

In the Method tab, select create new method. Use following details to create the method.

Sample Values:

| Parameter    | Sample Value                                                  | Info                                                                                                                                                                                                   |
| ------------ | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Source       | ixHello Portal                                                | The source of the event                                                                                                                                                                                |
| Detail       | <p>{"Key":"Value"}</p><p>e.g. {"name": "eventbridge log"}</p> | The JSON object can contain fields and nested subobjects.                                                                                                                                              |
| DetailType   | <p>This is event information text</p><p>e.g. ModuleName</p>   | Free-form string used to decide which fields to expect in the event detail.                                                                                                                            |
| EventBusName | default                                                       | The event bus that will receive the event. Only the rules that are associated with this event bus can match the event.                                                                                 |
| Resources    | \["R1"]                                                       | <p>AWS resources, identified by Amazon Resource Name (ARN).</p><p>Example: \["arn:partition:service:region:account-id:resource-id", "arn:aws:iam::123456789012:user/Development/product\_1234/\*"]</p> |
| time         | 2020-06-05 13:50:10                                           | The timestamp of the event. Example: 2020-04-05 13:50:10                                                                                                                                               |

| Method Name           | TriggerEvent                                                                                |
| --------------------- | ------------------------------------------------------------------------------------------- |
| Request Type          | PutEvent                                                                                    |
| Method Output         | ListOfRecords                                                                               |
| Record Limit          | 10                                                                                          |
| Record JsonPath       | $.\[\*]                                                                                     |
| Valid Result Template | Congratulations, the following event has been generated{{Records}} How else can I help you? |
| Record Template       | {{eventId}}                                                                                 |
| Empty Result Template | How else can I help you?                                                                    |

<figure><img src="/files/EqEYTG6CbDpQWlKEJ0dZ" alt=""><figcaption></figcaption></figure>

![](/files/Ap7iQWrRZmA7Ji7Bv4Kr)

After the method has been created, we can test if the method is functional or not by clicking on Test from the action menu, if successful, it should return **“EventId**” as shown in below in the JSON tab.

![](/files/NwlKv5kytKwLkQ6y2mPO)

This shows that the EventBus default was successful in generating the event and the event rule was successful in invoking the Lamda function ContactFinder as defined in the event rule before.

### Create Intent:

Create Intent corresponding to the method.

| Name: CreateEventIntent                        |
| ---------------------------------------------- |
| Intent Type: Search                            |
| Intent Action: Execute Method                  |
| Primary Method Data Source: EventBridge DS     |
| Primary Method Data Source Method: CreateEvent |
| Save                                           |

![](/files/PyDF8tt3QnikBVmvTDy7)

### Create Utterance

Utterances are short keywords used to invoke the intent.

| Utterance Value: generate event |
| ------------------------------- |
| Custom App: EventBridge         |
| Intent: CreateEventIntent       |

![](/files/8gkrNxpWQhE0T0A0i2zb)

### Create Input

The next step is to create input corresponding to the Intent.

| Name: CreateEventInput           |
| -------------------------------- |
| Custom App: EventBridge          |
| Custom Intent: CreateEventIntent |
| Data Source: EventBridgeDS       |
| Data Source Method: CreateEvent  |
| Save                             |

![](/files/BaJkZP9j7KrcI6TMF7Qz)

### Create Publish

After all the components of the app have been created, now lets publish the app to one of the ixHello supported channels. For this document, we are demonstrating on how to publish to Amazon Lex Bot. Fill the following details and **Save**.

| Name: EventBridge                                                                          |
| ------------------------------------------------------------------------------------------ |
| App Type: Search                                                                           |
| Channel: Amazon Lex                                                                        |
| Version: Lex V1                                                                            |
| Messages: All the messages shall be auto-populated, if they do not, you can add/edit them. |
| Save                                                                                       |

![](/files/kLOxtmYPcdGcZe3VBz2N)

Once the publish profile is created, click on Actions and click on Publish to Lex. You will then be redirected to the screen where you have to choose which AWS account you want to publish the bot to.

![](/files/vesK0CpznMVcpdXm34dd)

![](/files/PjiSy9YNnadIYB81zqIn)

Click on Publish to Lex V1 and on success, you shall receive success confirmation as below:

![](/files/HIVJSHq7FmMM84aDnmFI)

Click on go to Lex Skill to test the bot.

Here is a sample success result in Amazon Lex Chatbot.

![](/files/Mr0QcfI514dzNYO4UCH6)

Congratulations, you’ve successfully completed Amazon EventBridge and ixHello integration.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ixhello.com/ixhc/connections/amazon/amazon-eventbridge.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
