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개 답변
2
수락된 답변

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
전문가
답변함 2달 전
profile picture
전문가
검토됨 2달 전
profile picture
전문가
검토됨 2달 전
profile picture
전문가
검토됨 2달 전
profile picture
전문가
검토됨 2달 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠