|
| 1 | +--- |
| 2 | +title: AWS EventBridge Logs Integration Guide |
| 3 | +description: Stream AWS API activity logs to OpenObserve using CloudTrail, EventBridge, and Kinesis Firehose. |
| 4 | +--- |
| 5 | + |
| 6 | +# Integration with AWS EventBridge |
| 7 | + |
| 8 | +This guide explains how to *stream AWS management activity events* to OpenObserve using AWS CloudTrail, Amazon EventBridge, and Kinesis Firehose. |
| 9 | + |
| 10 | +## Overview |
| 11 | + |
| 12 | +Monitor and analyze AWS API activity (e.g., EC2 starts, IAM changes, S3 access) by routing events from **CloudTrail → EventBridge → Firehose → OpenObserve**. |
| 13 | + |
| 14 | +- **CloudTrail** captures management-level API calls across AWS services |
| 15 | +- **EventBridge** filters and routes specific CloudTrail events |
| 16 | +- **Kinesis Firehose** delivers those events reliably to OpenObserve over HTTP |
| 17 | + |
| 18 | +> **Note:** EventBridge *can* send events directly to OpenObserve using its HTTP target support. |
| 19 | +> However, we recommend using **Kinesis Firehose** in production for: |
| 20 | +> |
| 21 | +> - Built-in retry logic and failure handling |
| 22 | +> - Optional S3 backup for undelivered events |
| 23 | +
|
| 24 | + |
| 25 | +## Steps to Integrate |
| 26 | + |
| 27 | +??? "Prerequisites" |
| 28 | + - OpenObserve account ([Cloud](https://cloud.openobserve.ai/web/) or [Self-Hosted](../../../quickstart/#self-hosted-installation)) |
| 29 | + - AWS account with: |
| 30 | + - CloudTrail enabled for management events |
| 31 | + - IAM permissions to create EventBridge rules and Firehose streams |
| 32 | + |
| 33 | + |
| 34 | +??? "Step 1: Ensure CloudTrail Management Events Are Enabled" |
| 35 | + |
| 36 | + 1. Go to **AWS Console → CloudTrail → Trails** |
| 37 | + 2. Check if a trail exists that logs **management events** |
| 38 | + 3. If not: |
| 39 | + - Click **Create trail** |
| 40 | + - Name the trail (e.g., `DefaultManagementTrail`) |
| 41 | + - Enable **Management events** (Read/Write or Write-only) |
| 42 | + - Choose an S3 bucket for storage (existing or new) |
| 43 | + - Complete the trail creation |
| 44 | + |
| 45 | + > CloudTrail acts as the *source* of API activity events across AWS. |
| 46 | + |
| 47 | + |
| 48 | +??? "Step 2: Get OpenObserve Ingestion URL and Access Key" |
| 49 | + |
| 50 | + 1. In OpenObserve: go to **Data Sources → Recommended → AWS** |
| 51 | + 2. Copy the HTTP ingestion URL and Access Key |
| 52 | + |
| 53 | +  |
| 54 | + |
| 55 | + > Example ingestion URL: |
| 56 | + > ``` |
| 57 | + > https://<your-openobserve-domain>/aws/default/cloudtrail-events/_kinesis_firehose |
| 58 | + > ``` |
| 59 | + |
| 60 | + |
| 61 | +??? "Step 3: Create Firehose Delivery Stream to OpenObserve" |
| 62 | + |
| 63 | + 1. In AWS Kinesis Firehose, Create delivery stream with Source: `Direct PUT` and Destination: `HTTP Endpoint`. |
| 64 | + 2. Provide OpenObserve's HTTP Endpoint URL and Access Key, and set an S3 backup bucket. |
| 65 | + 3. Give the stream a meaningful name and Create it. |
| 66 | + |
| 67 | + |
| 68 | +??? "Step 4: Create EventBridge Rule to Forward CloudTrail Events" |
| 69 | + |
| 70 | + 1. Go to **EventBridge > Rules** and click **Create rule** |
| 71 | + 2. Name it (e.g., `ForwardCloudTrailEvents`) |
| 72 | + 3. Choose: |
| 73 | + - **Event Source**: `AWS events or EventBridge partner events` |
| 74 | + - **Event Pattern**: |
| 75 | + ```json |
| 76 | + { |
| 77 | + "source": ["aws.cloudtrail"], |
| 78 | + "detail-type": ["AWS API Call via CloudTrail"] |
| 79 | + } |
| 80 | + ``` |
| 81 | + 4. Set the target to **Kinesis Firehose** and choose the delivery stream |
| 82 | + 5. Click **Create rule** |
| 83 | + |
| 84 | + |
| 85 | +??? "Step 5: Verify Logs in OpenObserve" |
| 86 | + |
| 87 | + 1. Go to **Logs** → select your log stream → Set time range → Click **Run Query** |
| 88 | + 2. You should see logs like: |
| 89 | + ```json |
| 90 | + { |
| 91 | + "eventSource": "ec2.amazonaws.com", |
| 92 | + "eventName": "StartInstances", |
| 93 | + "userIdentity": { ... }, |
| 94 | + "awsRegion": "us-east-1", |
| 95 | + ... |
| 96 | + } |
| 97 | + ``` |
| 98 | + |
| 99 | + |
| 100 | +??? "Troubleshooting" |
| 101 | + |
| 102 | + **No logs appearing in OpenObserve?** |
| 103 | + |
| 104 | + - CloudTrail: |
| 105 | + - Ensure management events are enabled and recent API activity has occurred. |
| 106 | + |
| 107 | + - EventBridge: |
| 108 | + - Confirm the rule is matching events. |
| 109 | + - Check the Monitoring tab for recent invocations or matched event counts. |
| 110 | + |
| 111 | + - Firehose: |
| 112 | + - Verify the delivery stream is active and error-free. |
| 113 | + - Review the Monitoring tab and look for failed deliveries. |
| 114 | + |
| 115 | + - OpenObserve: |
| 116 | + - Confirm the HTTP ingestion URL and access key are correct. |
| 117 | + - In the Logs view, select the correct stream and expand the time range to view recent data. |
| 118 | + |
| 119 | + |
0 commit comments