Lambda destination for other Lambda is not invoked

0

Hello,

In the diagram below the Lambda Function L2 is a successful asynchronous destination for Lambda Function L1.
Enter image description here

When the event comes from SQS, L2 is not invoked.
When the event comes from S3, L2 is invoked.
When event comes from Actor that test in Lambda screens from Management Console, L2 is not invoked.
When L1 is invoked from L3 using asynchronous invocation, L2 is not invoked.

 private AWSLambdaAsync lambda = null;
    
    public LambdaFunctionHandler() {
    	lambda = AWSLambdaAsyncClientBuilder.standard()
    			.withRegion(Regions.US_EAST_2)
    			.build();
    }
Future<InvokeResult> future_res = lambda.invokeAsync(req);

Could you please explain the above behaviours ? Is the L2 invocation related to how the event is sent to L1 (synchronous/ asynchronous) ?

Could you please specify how to send SQS events so that L2 to be invoked ?

Thank you,
Mihai ADAM

1 Answer
2
Accepted Answer

Hi,

you are seeing this behavior because the Lambda function L2 is configured as a successful asynchronous destination. That means, it is only invoked when the initial invoke was a async request. So, in your case,

Basically, the destination is only invoked for asynchronous requests.

To add some context: The primary use case of Destinations is to know about the async execution results of Lambda functions, primarily to get more visibility into the execution details like request and response contexts, payloads, exception stack traces and so on.

profile pictureAWS
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
profile picture
EXPERT
reviewed a month ago
profile picture
EXPERT
reviewed a month ago
profile picture
EXPERT
reviewed a month ago
  • Thanks a lot, it worked, L2 was invoked after I changed the InvocationType to Event in L3

  • The described L2 behaviour applies also to an SNS. The SNS destination is used only if the L1 request is asynchronous.

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