Lambda only sporadically logs to cloudwatch and publishes events

0

I've seen a pattern in one of our lambdas where sometimes the lambda just doesn't log to cloudwatch or publish its events to eventbridge. The lambda seems to otherwise be executing fine--the expected changes to the database are always made--but sometimes there just aren't any associated cloudwatch logs or events. I have no idea what could be causing this so I was wondering if you guys can think of anything which would result in this behavior.

1개 답변
0

Hi, I guess that you're speaking of logs written by your own code (not those written by lambda runtime). In that case, I would create a CloudTrail track to locate all calls to CW APIs by your Lambda and see if they are all present (by comparing to the Lambda invocation unique ids).

If calls to CW match Lambda invocations, then it may be an issue with CW itself for which more investigation will be needed. Otherwise, it's the application code that may not handle CW logging properly.

Additionally, I'd sugggest to mirror the calls to CW with equivalent messages in a SQS queue to see if they match

Best,

Didier

profile pictureAWS
전문가
답변함 8달 전

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

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

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

관련 콘텐츠