By using AWS re:Post, you agree to the Terms of Use

Lambda Events not triggering EventBridge destination


I am using the Amazon Selling Partner API (SP-API) and am trying to set up a Pub/Sub like system for receiving customer orders etc.

The Notifications API in SP-API sends notifications of different types in 2 different ways depending on what event you are using. Some send directly to eventBridge and others are sent to SQS.

I have correctly set up the notifications that are directly sent to eventBridge, but am struggling to work the SQS notifications. I want all notifications to be send to my own endpoint.

For the SQS model, I am receiving notifications in SQS, which is set as a trigger for a Lambda function (This part works). The destination for this function is set as another eventBridge (this is that part that doesn't work). This gives the architecture as: SQS => Lambda => eventBridge => my endpoint

Why is lambda not triggering my eventBridge destination in order to send the notifications?

Execution Role Policies:

  • Lambda
    1. AWSLambdaBasicExecutionRole
    2. AmazonSQSFullAccess
    3. AmazonEventBridgeFullAccess
    4. AWSLambda_FullAccess
  • EventBridge
    1. Amazon_EventBridge_Invoke_Api_Destination
    2. AmazonEventBridgeFullAccess
    3. AWSLambda_FullAccess

EventBridge Event Pattern:

{"source": ["aws.lambda"]}

Execution Role Trusted Entities:

  • EventBridge Role "Service": [ "", "", "" ]
  • Lambda Role "Service": [ "", "", "" ]

Lambda Code:

exports.handler = function(event, context, callback) {
   console.log("Received event: ", event);
   context.callbackWaitForEmptyEventLoop = false
   callback(null, event);
   return {
      statusCode: 200,
1 Answer
Accepted Answer

If you are using Lambda Destination to trigger EventBridge that will not work. The reason is that Lambda Destinations works only for Asynchronous invocation. In the case of SQS -> Lambda it is an Event source mapping invocation, which under the hood uses Synchronous invocations.

If you need to send an event to EventBridge, just send it from your Lambda code.

profile picture
answered 5 months ago
  • Thank you, I have now managed to get it working using the lambda script.

  • This seems to contradict the documentation on Destinations [1]: "Previously, you needed to write the SQS/SNS/EventBridge handling code within your Lambda function and manage retries and failures yourself."

    If I hard-code the EventBridge details into my Lambda, what does the Destination configuration do?


You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions