Lambda error: Calling the invoke API action failed with this message: Network Failure

0

I have a lambda function that writes ~6000 retained messages to IoT Core. I am able to run this function locally without problem. In Lambda after about half of the data has been processed, it stops running with the error: Calling the invoke API action failed with this message: Network Failure

This error does not get piped to CloudWatch, but I do see it if I manually execute a Test in the Lambda console.

It seems that it might be exceeding the IoT quota for 'Retained message inbound publish requests per second per topic', which is fixed at 1 per second. But since I am able to run it locally and successfully publish the retained messages, that seems like it might not be the problem.

질문됨 일 년 전1701회 조회
2개 답변
0

There can be many reasons for things to fail - it's unfortunate in this case that the error message isn't more detailed. Is it possible to enable additional debugging to see what the underlying problem is?

I agree that it's highly probably that there is some sort of throttling happen - and the debugging might throw some light on that.

That said, in the bigger picture there are always going to be cases where things fail and the code needs to retry. Worth reading: https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter/

profile pictureAWS
전문가
답변함 일 년 전
0

The function is running today with no errors. No code changes. It takes about 500s to complete, so it is on the longer side for a lambda function.

Since nothing is logged to CloudWatch upon failure, it seems like some lambda supervisor process was killing the function.

The lambda function is triggered by EventBridge. Is there any way to know that the lambda function failed like that to be able to retry?

답변함 일 년 전

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

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

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

관련 콘텐츠