Manage Shopify webhooks using our new Amazon EventBridge integration

Highlighted
Community Manager
Community Manager
487 28 699

We’re proud to introduce a new integration which will help you easily manage large volumes of webhooks by integrating your app with Amazon EventBridge. EventBridge is a serverless, event-driven alternative to receiving webhooks via HTTP. If your app is hosted on AWS you can use EventBridge to handle significant scale while reducing your infrastructure cost and complexity.

 

Checkout the tutorial in our developer documentation to learn how to set up an event source and manage your app’s webhooks with EventBridge.

 

Questions about EventBridge?

Post them in this thread to discuss your integrations with other developers and Shopify staff.

TyW | Online Community Manager @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

2 Likes
Highlighted
Shopify Partner
5 0 0

Followed Step 1 and 2 from tutorial, everything worked smoothly .
But when trying to follow step 3 for creating rule 

i'm not able to find  Shopify in Service name drop-down.
check screenshot attached 
provider.png

 

 

0 Likes
Highlighted
Community Manager
Community Manager
487 28 699

Thanks! I’ve notified the team and will update when I know more.

 

In the meantime, there are two other options you can use.

 

Under ‘Event matching pattern’, choose ‘Pre-defined pattern by service’ and then select ‘All Events’ from the ‘Service provider’ drop-down. This will allow all events sent to that event source to trigger your rule.

 

Alternatively, under ‘Event matching pattern’, choose ‘Custom pattern’. Then define the pattern that you would like the rule to filter on in the text area on the right and click Save. Here’s an example event pattern for filtering based on a specific webhook topic:

 

{
  "detail-type": [
    "shopifyWebhook"
  ],
  "detail": {
    "metadata": {
      "X-Shopify-Topic": [
        "products/update"
      ]
    }
  }
}

TyW | Online Community Manager @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
Shopify Partner
10 0 1

There seems to be a BUG...?

 

Went pretty far with the setup, but...

 

Shopify is displaying an error when subscribing to the webhook via the API with an "ARN" address.

 

I've completed the setup, have used the "unstable" API version as specified in the tutorial ( https://shopify.dev/tutorials/manage-webhook-events-with-eventbridge#4-create-webhook-subscriptions-... ).

Tried both APIs, the REST & GraphQL and get the same error on both.

 

Error: "Address is not a valid AWS ARN"

 

Any ideas?

0 Likes
Highlighted
Community Manager
Community Manager
487 28 699

Hi @Mets

 

Are you able to share the ARN (address) tha you are trying to subscribe to the webhook with so the team can review? Feel free to send it to as a private message

Thanks!

TyW | Online Community Manager @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
New Member
2 0 2

I got an error, this is my ARN arn:aws:events:us-east-2::event-source/aws.partner/shopify.com/3929673/product-label-pro-dev.

I used koa-shopify-webhook to register webhook, but this library didn't support ARN. I tried to edit the shopify-koa-webhook to accept ARN. This is error message:

Failed to register webhook for PRODUCTS_CREATE {
  data: {
    eventBridgeWebhookSubscriptionCreate: { userErrors: [], webhookSubscription: [Object] }
  },
  extensions: {
    cost: {
      requestedQueryCost: 10,
      actualQueryCost: 10,
      throttleStatus: [Object]
    }
  }
}

Please help, I don't want to use a REST service from API gateway directly!

 

 

0 Likes
Highlighted
New Member
2 0 2

If I use shopify admin to register webhook, the same error happens.

image.png

2 Likes
Highlighted
New Member
3 0 0

I get the same kind of error when trying to register a webhook.

{
    "errors": {
        "address": [
            "is invalid",
            "is an AWS ARN and includes api_client_id '3985939' instead of '3986211'"
        ]
    }
}
0 Likes
Highlighted
New Member
3 0 0

I am also having the same issue.

Did anyone found the solution for it?

Any update from Shopify Team?

Call:

curl -X POST \
  https://xxxxxxxxx.myshopify.com/admin/api/2020-07/webhooks.json \
  -H 'authorization: Basic xxxxxxxxxxxx=' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 9b6249b5-9296-3dbb-d724-1225bd051dd0' \
  -d '{
"webhook": {
    "topic": "customers/create",
    "address": "arn:aws:events:us-east-1:xxxxxxxxxx:event-bus/store-webhooks-but",
    "format": "json"
  }
}'

 

Response:

{
    "errors": {
        "address": [
            "is invalid",
            "is not a valid AWS ARN"
        ]
    }
}

 

0 Likes
Highlighted
New Member
3 0 0

In my case it looks like there is a problem when Shopify register the event partner source in Event Bridge and dosent put valid information.

0 Likes