# AWS EventBridge Integration with Kloudfuse

Kloudfuse integrates with AWS EventBridge service. To successfully integrate AWS with Kloudfuse through EventBridge, complete these tasks:

- [Prerequisites](https://docs.kloudfuse.com/platform/3.5.0/cloud-service-aws-eventbridge/#prerequistes)
- [Create EventBridge Connection](https://docs.kloudfuse.com/platform/3.5.0/cloud-service-aws-eventbridge/#connection)
- [Create EventBridge API Destination](https://docs.kloudfuse.com/platform/3.5.0/cloud-service-aws-eventbridge/#destination)
- [Create EventBridge Rule](https://docs.kloudfuse.com/platform/3.5.0/cloud-service-aws-eventbridge/#rule)

## Prerequisites

AWS requires an external endpoint with `https`. The default installation of Kloudfuse enables an ingress service with external IP enabled, but does not provide `https` support.

To configure an external IP, run the following command:

```console
kubectl get svc | grep kfuse-ingress-nginx-controller
```

For help setting up https on an external endpoint, contact our [Support team](mailto:support@kloudfuse.com).

## Create EventBridge Connection

1. [Login](https://us-east-2.signin.aws.amazon.com/oauth?client_id=arn%3Aaws%3Asignin%3A%3A%3Aconsole%2Fevents&code_challenge=-bOM41N8rmtlOaZhznmqGL28nMhT4eKsqlp5_iBJGXU&code_challenge_method=SHA-256&response_type=code&redirect_uri=https%3A%2F%2Fconsole.aws.amazon.com%2Fevents%3FhashArgs%3D%2523%26isauthcode%3Dtrue%26oauthStart%3D1734467089331%26state%3DhashArgsFromTB_us-east-2_6732731e1ed886d5) on the EventBridge console.

2. In the **Navigation pane**, choose **API destinations**.

3. Click the **Connections** tab, and then select **Create connection**.

4. Specify these attribute values:
   - Destination type: Other
   - Authorization type: API key
   - API key name: `Kf-Api-Key`
   - Value: `KFUSE-API-VALUE`

5. Click **Create**.

## Create EventBridge API Destination

2. In the **Navigation pane**, choose **API destinations**.

3. Choose to **Create API destination**.

4. Specify these attribute values:
   - Name: <API destination name>
   - Description: <API destination description>
   - API destination endpoint: `https://<external facing endpoint of Kfuse cluster>/ingester/eventbridge.`
   - HTTP method: `POST`
   - Connection: Choose **Use an existing connection**, and supply the new connection from [Create EventBridge Connection](https://docs.kloudfuse.com/platform/3.5.0/cloud-service-aws-eventbridge/#connection).

5. Click **Create**.

## Create EventBridge Rule

01. [Login](https://us-east-2.signin.aws.amazon.com/oauth?client_id=arn%3Aaws%3Asignin%3A%3A%3Aconsole%2Fevents&code_challenge=-bOM41N8rmtlOaZhznmqGL28nMhT4eKsqlp5_iBJGXU&code_challenge_method=SHA-256&response_type=code&redirect_uri=https%3A%2F%2Fconsole.aws.amazon.com%2Fevents%3FhashArgs%3D%2523%26isauthcode%3Dtrue%26oauthStart%3D1734467089331%26state%3DhashArgsFromTB_us-east-2_6732731e1ed886d5) on the EventBridge console.

02. In the navigation pane, choose **Rules**.

03. Choose **Create rule**.

04. Specify these attribute values:
   - Name: <Rule name>
   - Description: <Rule description>
   - Event bus: default
   - Rule type: Rule with an event pattern

05. Click **Next**.

06. Specify these attribute values:
   - Event source: Other
   - Event pattern: Use the following code to send everything; change the pattern to match specific events:

```yaml
{
  "source": [{
    "exists": true
  }]
}
```

07. Click **Next**.

08. Specify these attribute values:
   - Target types: EventBridge API destination
   - API destination: Choose **Use an existing API destination**, and supply the new destination from [Create EventBridge API Destination](https://docs.kloudfuse.com/platform/3.5.0/cloud-service-aws-eventbridge/#destination).
   - Execution role: Create a new role for this specific resource

09. Click **Next**.

10. Click **Next**.

11. Verify details of the rule and click **Create rule**.
