My Lambda function is not getting invoked all of a sudden.

2

Hi,I had written a lambda function, and it was working as per the requirement. But suddenly past 2 days the lambda function is not getting invoked. I'm invoking the lambda function from java end using the "invokeAsync(req)" method. But same function if run on the AWS console,it works fine. I am using US-EAST-1 region. It was working fine for the past 25 days but stopped working for the past 2 days. ie the lambda function is not getting invoked by the "invokeAsync (req)" method from Java end. I am stuck in this for the past 2 days and not getting where I am going wrong. Please can anyone help? I tried asking it on stack overflow.But my question is getting downvoted and deleted though I had uploaded my code and all the dependencies I am using. Any help appreciated. Thanks!

3回答
1

Debug issue :

  1. First make sure that the IAM Role attached to your Lambda function has CloudWatch log write access.
  2. Now try to invoke the lambda function and switch to monitor tab in lambda console and click the CloudWatch log button.
  3. You will be redirected to the logs, open the latest log and see if there are some error logged.
  4. Make sure that the service that invokes the lambda function has sufficient permission.

**Maybe its region issue : **

If you are experiencing issues for Lambda service in us-east-1 region.

You can check the health status here.

**Still facing issue : **

Please contact the AWS Support team. They might be able to look into your lambda function and account to find the cause.

回答済み 2年前
  • How do I contact AWS support? is there any email? I was redirected back to ask the question here. Please can you send their email id?

0

Start with the CloudWatch logs (check under the monitor tab in the console for a link to the logs if you don't know where they are) and check if the lambda is being triggered at all. If it is then there is an issue with the lambda and add some debug output to check in cloudwatch, if it's not then it could be a policy issue. Maybe invoke it synchronously from java and see if you have any error messages you can work with.

回答済み 2年前
  • Hi , Sorry I forgot to mention about the cloud watch logs, the cloud watch logs are empty, meaning the most recent logs are the logs, from 2 days prior(as I have mentioned in the question.) After that I havent got any logs. I can post a pic here of them, but I dont think theres an option to post a pic here.

  • Then your lambda isn't being triggered, or doesn't have permission to log to cloudwatch (that doesn't make sense if you can run it from the console and it logs).

    Something changed in the last 2 days, probably some configuration/permission..

    I would start by eliminating the obvious:

    • test that it is still working via the console
    • call it asynchronously in the code you have
    • add a DLQ maybe?
    • call it in the same way you are in java, but from a different environment
    • check your environment that you are calling the lambda from
0

What calls the Lambda function? Is it tied to an API gateway? An S3 event? An EventBridge rule? Directly from a client application?

The first place I'd check is in the CloudWatch logs to see if any errors are being reported.

The second place I'd check is CloudTrail to see what happened around the time that the Lambda function stopped working. Is it possible that someone updated an IAM role or policy? Maybe a new SCP was enabled? Perhaps a NACL or security group is preventing a call from getting to your Lambda?

profile pictureAWS
エキスパート
回答済み 2年前
  • Hi , Sorry I forgot to mention about the cloud watch logs, the cloud watch logs are empty, meaning the most recent logs are the logs, from 2 days prior(as I have mentioned in the question.) After that I havent got any logs. I can post a pic here of them, but I dont think theres an option to post a pic here.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ