什么会导致AWS Lambda不写信给CloudWatch?
我有一个简单的AWS lambda函数,但并不总是写入CloudWatch日志。
我添加了对函数何时登录的功能的反击,并且何时未记录,并且可以看到大多数情况下未记录第一个调用我第二次调用功能的结果:
我以为是我在代码中所做的事情,但是在缺少“ start request requestId”条目的情况下得到了此结果(是的,我已经达到了顶级重试链接):
据我所知,我绝对没有什么可以阻止AWS基础架构记录请求的开始和结束,因为这是在我的代码之外进行管理的代码还可以运行并正确返回,但是它并不总是创建日志,而其他时候则不会创建整个日志。
与现有lambdas的唯一真正区别是,我是从lambda函数URL称之为的。
关于我为什么看到这个以及如何解决的任何想法?我很确定这不是编码问题。
I have a simple AWS Lambda function that runs but does not always write to the cloudwatch log.
I've added a counter to the function to track when it logs and when it doesn't and can see that most of the time the first invocation is not recorded, but subsequent ones are (the counter starts at 0, so below is the result of me invoking the function for the second time:
I assumed that it was something that I was doing in code but got this result where the "START RequestId" entry was missing (yes I have hit the top retry link):
As far as I know there is absolutely nothing that I can do to stop the AWS infrastructure from recording the start and end of a request as this gets managed outside of my code. The code also runs and returns correctly, but it just doesn't always create a log, and other times doesn't create a whole log.
The only real difference to this from existing lambdas is that I am calling this from a Lambda Function Url.
Any ideas on why I'm seeing this and how to resolve? I'm pretty certain that its not a coding issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于没有代码更改,日志似乎正在起作用,因此我只能猜测AWS中的某种系统错误持续了一段时间。
With no code changes the logs seem to be working, so I can only guess that it was some kind of system error within AWS that went on for some time.