---
title: Sending Events and Logs to Datadog with Amazon EventBridge API Destinations
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Log Management > Logs Guides > Sending Events and Logs to Datadog with
  Amazon EventBridge API Destinations
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Sending Events and Logs to Datadog with Amazon EventBridge API Destinations

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

Amazon EventBridge is a serverless event bus that enables you to build event-driven applications. EventBridge can integrate with your AWS services, but the API destinations feature lets you push and pull data from outside of AWS using APIs. This guide gives steps for sending your events and logs from EventBridge to Datadog. For more information about pushing your events from Datadog to EventBridge, [see the EventBridge integration docs](https://docs.datadoghq.com/integrations/amazon_event_bridge.md).

## Setup{% #setup %}

Before you begin, you need a [Datadog account](https://www.datadoghq.com/free-datadog-trial/), with [an API key](https://docs.datadoghq.com/account_management/api-app-keys.md#api-keys), and you need access to [Amazon Eventbridge API destinations](https://aws.amazon.com/eventbridge/).

### Configuration{% #configuration %}

1. Follow the steps in the [Amazon Create an API destination docs](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html#eb-api-destination-create) to add Datadog as an API destination.

   - Use API key authorization, with `DD-API-KEY` as your key name and your [Datadog API key](https://docs.datadoghq.com/account_management/api-app-keys.md#api-keys) as the value.
   - For your destination endpoint, use `https://  /api/v2/logs` for logs and `https://event-management-intake.  /api/v2/events` for events, and set `POST` as the HTTP method. For more information about the differences between logs and events, see [Reducing Data Related Risks](https://docs.datadoghq.com/data_security.md#other-sources-of-potentially-sensitive-data/).

1. Once you have set up the destination, see the Amazon documentation to [create an EventBridge rule](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rules.html), where you set Datadog as your destination.

If you're using the events endpoint, configure an [input transformer](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-transform-target-input.html) on the target so the rule sends events in the format the endpoint expects. Use the following input path to extract values from the original event:

   ```json
   {
     "detailType": "$.detail-type",
     "source": "$.source",
     "time": "$.time"
   }
   ```

Then, use the following input template to build the request body:

   ```json
   {
     "data": {
       "type": "event",
       "attributes": {
         "title": <detailType>,
         "message": "<detailType> from <source>",
         "category": "alert",
         "timestamp": <time>,
         "tags": ["source:<source>"],
         "attributes": {
           "status": "ok"
         }
       }
     }
   }
   ```

Set `status` to `warn` or `error` for events that represent a problem. For AWS events that represent a configuration change, you can instead send `"category": "change"` with a `changed_resource` object. For the full list of accepted fields, see [Post an event](https://docs.datadoghq.com/api/latest/events.md#post-an-event).

1. Once you have set up the rule with Datadog as the destination, trigger an event by posting an event to EventBridge. For more information about pushing events to EventBridge from Datadog, see the [EventBridge integration documentation](https://docs.datadoghq.com/integrations/amazon_event_bridge.md). For example, to trigger a test event by [uploading the objects to an S3 bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html) in your account, use this AWS CloudShell command:

   ```bash
   echo "test" > testfile.txt
   aws s3 cp testfile.txt s3://YOUR_BUCKET_NAME
   ```

1. Once events and logs are sending, after about five minutes, the data is available in the Datadog [Logs Console](https://app.datadoghq.com/logs) or [Events Explorer](https://app.datadoghq.com/event/explorer), depending on which endpoint you are sending them to.

## Troubleshooting{% #troubleshooting %}

To see more details about the payloads sent to Datadog and to view the response of the API endpoints, set up an Amazon SQS queue:

1. Create a queue in [Amazon SQS](https://console.aws.amazon.com/sqs/).
1. Go to the [EventBridge rule](https://console.aws.amazon.com/events/) that you created in the Configuration section.
1. Select the Targets tab and click Edit.
1. Expand the Additional settings section.
1. In the Dead-letter queue section, choose Select an Amazon SQS queue in the current AWS account to use as the dead-letter queue.
1. Select the SQS queue that you just created.
1. Update the rule.

## Further Reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [AWS Blog with example API destination use cases](https://aws.amazon.com/blogs/compute/using-api-destinations-with-amazon-eventbridge/#sending-aws-events-to-datadog)
- [How to send logs to Datadog while reducing data transfer fees](https://docs.datadoghq.com/logs/guide/reduce_data_transfer_fees.md)
