> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

> Deliver BigCommerce webhook events to Amazon EventBridge as an alternative to HTTPS callbacks, using a serverless event bus that scales automatically.

Amazon EventBridge is a serverless event bus that distributes events to connect application components and build highly scalable, resilient, event-driven applications. It provides a simple way to consume BigCommerce webhook events at scale, and it is an alternative to [HTTPS](/developer/docs/integrations/webhooks/https) and [Google Cloud Pub/Sub](/developer/docs/integrations/webhooks/gcp-pubsub) delivery.

To deliver webhooks to Amazon EventBridge, complete the following steps:

* [Set up an event source](#set-up-an-event-source)
* [Associate your event source with an event bus](#associate-an-event-bus)
* [Create a rule for the event bus](#create-a-rule)
* [Apply a target to the rule](#apply-a-target-to-the-rule)
* [Create an Amazon EventBridge webhook](#create-an-amazon-eventbridge-webhook)

## Prerequisites

To send the following GraphQL queries and view responses, import the examples into [Postman](https://www.getpostman.com/) or any other tool that supports GraphQL queries. Set the following variables before you start:

| Credentials       | Variables    |
| :---------------- | :----------- |
| Store variables   | `zone`       |
|                   | `store_hash` |
| OAuth credentials | `client_id`  |

> **Note**
>
> GraphQL Admin API endpoints use the `X-Auth-Token` header to authenticate to BigCommerce servers. To call the Admin GraphQL API, use an API client tool such as Postman.

## Set up an event source

Setting up an event source with EventBridge lets you send event data directly to Amazon services instead of receiving that traffic yourself through a front-end web server. Create an event source with the `createEventSource` mutation.

#### Request

**`Example query: Create Amazon event source`**

```graphql title="Example query: Create Amazon event source" showLineNumbers={false}
POST https://{{zone}}/stores/{{store_hash}}/graphql
mutation createEventSource($input: CreateEventSourceInput!){
    webhook {
        createEventSource(input: $input) {
            eventSource {
                id
                awsAccount
                arn
                eventSourceName
                eventSourceRegion
            }
        }
    }
}
```

**`GraphQL variables`**

```graphql title="GraphQL variables" showLineNumbers={false}
{
    "input" : {
        "awsAccount": "649666292244",
        "eventSourceName": "Final-Test-1",
        "eventSourceRegion": "US_EAST_1",
        "clientId": "4yk6pb824t53hirbuz5akdr652lpjb2"
    }
}
```

#### Response

**`Example response: Create Amazon event source`**

```graphql title="Example response: Create Amazon event source" showLineNumbers={false}
{
  "data":{
    "webhook": {
       "createEventSource": {
          "eventSource": {
              "id": "bc/store/eventSource/9",
              "awsAccount": "932486483912",
              "arn": "arn:aws:us-east-1::event-source/aws.partner/bigcommerce.com/test/75fq9aqffI1I19pgc20b3xs8pulgqynm/final-test-1",
              "eventSourceName": "final-test-1",
              "eventSourceRegion": "US_EAST_1"
              }
            }
          }
        }
}
```

> **Note**
>
> #### Make note of the `event_source_arn` and `event_source_name`
>
> Obtain the `event_source_arn` and `event_source_name` from the `createEventSource` mutation response. You use these values in the following steps, so save them as environment variables in Postman.

## Associate an event bus

Next, associate the event source with an event bus:

#### Request

**`Example query: Create an Amazon event bus`**

```graphql title="Example query: Create an Amazon event bus" showLineNumbers={false}
POST https://events.{{region}}.amazonaws.com/?Action=CreateEventBus&Version=2015-10-07
{
  "EventSourceName": "{{event_source_name}}",
  "Name": "{{event_source_name}}"
}
```

#### Response

**`Example response: Create an event bus`**

```graphql title="Example response: Create an event bus" showLineNumbers={false}
{
  "EventBusArn": "arn:aws:events:us-east-1:932486483912:event-bus/aws.partner/bigcommerce.com.test/75fq9aqffI1I9pgc20b3xs8pulgqynm/final-test-1"
}
```

## Create a rule

Create a rule to route specified events to the event bus. Without a rule, all events are ignored.

#### Request

**`Example query: Create a rule`**

```graphql title="Example query: Create a rule" showLineNumbers={false}
POST https://events.{{regions}}.amazonaws.com/?Action=PutRule&Version=2015-10-07
{
  "Description": "Default rule to route all bigcommerce events.",
  "EventBusName": "{{event_source_name}}",
  "EventPattern": "{\"detail-type\":[\"bigCommerceWebhook\"]}",
  "Name": "{{rule_name}}",
  "State": "ENABLED"
}
```

#### Response

**`Example response: Create a rule`**

```graphql title="Example response: Create a rule" showLineNumbers={false}
{
  "RuleArn": "arn:aws:events:us-east-1:932486483912:rule/aws.partner/bigcommerce.com.test/75fq9aqffI1I9pgc20b3xs8pulgqynm/final-test-1/GenericRuleForBcEvents"
}
```

## Apply a target to the rule

Add the target to the specified rule. This step lets Amazon SQS receive message requests so you can verify end-to-end delivery.

#### Request

**`Example query: Put targets`**

```graphql title="Example query: Put targets" showLineNumbers={false}
POST https://events.{{regions}}.amazonaws.com/?Action=PutTargets&Version=2015-10-07
{
  "EventBusName": "{{event_source_name}}",
  "Rule": "{{rule_name}}",
  "Targets": [
    {
      "Arn": "arn.aws:sqs:us-east-1:932486483912:{{sqs_name}}",
      "Id": "{{sqs_id}}"
    }
]
}
```

#### Response

**`Example response: Put targets`**

```graphql title="Example response: Put targets" showLineNumbers={false}
{
  "FailedEntries": [],
  "FailedEntryCount": 0
}
```

## Create an Amazon EventBridge webhook

Create the webhook with the `createEventBridgeWebhook` mutation, using the event source ARN as the destination.

#### Request

**`Example query: Create Amazon EventBridge webhook`**

```graphql title="Example query: Create Amazon EventBridge webhook" showLineNumbers={false}
POST https://{{zone}}/stores/{{store_hash}}/graphql
mutation createAwsEventBridgeWebhook($input: CreateEventBridgeWebhookInput!){
    webhook {
        createEventBridgeWebhook(input: $input) {
            webhook {
                id
                scope
                destination
                isActive
                createdAt
            }
        }
    }
}
```

**`GraphQL variables`**

```graphql title="GraphQL variables" showLineNumbers={false}
{
  "input": {
    "destination": "{{event_source_arn}}",
    "isActive": true,
    "scope": "store/category/updated"
     }
}
```

#### Response

**`Example response: Create Amazon EventBridge webhook`**

```graphql title="Example response: Create Amazon EventBridge webhook" showLineNumbers={false}
{
  "data": {
    "webhook": {
      "createEventBridgeWebhook": {
          "webhook": {
              "id": "bc/store/webhook/29458",
              "scope": "store/category/updated",
              "destination": "arn:aws:events:us-east-1::event-source/aws.partner/bigcommerce.com/test/75fq9aqffI1I9pgc20b3xs8pulgqynm/final-test-1",
              "isActive": true,
              "createdAt": "2023-05-31T17:17:17z"
                  }
                }
            }
          }
      }
```

## Receive the event message

Trigger the event to receive the event message. Although the SQS API has limited JSON support, you can use SQS Receive Messages to view the event message.

For a complete reference of all BigCommerce webhook events and their callback payloads, see [Webhook Events](/developer/docs/integrations/webhooks/event-reference).

## Troubleshooting

**Field validation errors**

To resolve a validation error, update the specified field to a valid value.

**Internal validation errors**

Retry the request after a short delay to resolve an internal error.

## Related resources

### Articles

* [Webhooks Overview](/developer/docs/integrations/webhooks)
* [Google Cloud Pub/Sub Webhooks](/developer/docs/integrations/webhooks/gcp-pubsub)
* [Webhook Events](/developer/docs/integrations/webhooks/event-reference)

### Endpoints

* [Webhooks Reference](/developer/docs/integrations/webhooks)