[英]aws lambda not logging print statements
I have a lambda_handler function like:我有一个 lambda_handler function 像:
def lambda_handler(event, context):
print('test')
I can see the log output is passing to CloudWatch just fine.我可以看到日志 output 正在正常传递到 CloudWatch。 I can see the Start, End, Syntax errors, etc. so I don't think it's a permissions thing, but I cannot see my print statements anywhere.
我可以看到开始、结束、语法错误等,所以我认为这不是权限问题,但我在任何地方都看不到我的打印语句。 I have the following allowed in my IAM role:
我的 IAM 角色允许以下内容:
Allow: logs:CreateLogGroup允许:日志:CreateLogGroup
Allow: logs:CreateLogStream允许:日志:CreateLogStream
Allow: logs:PutLogEvents允许:日志:PutLogEvents
I was facing the same problem.我面临同样的问题。 For me the missing step was to hit the "deploy" button.
对我来说,缺少的一步是点击“部署”按钮。
As silly as it sounds, it might save some time to a future reader.尽管听起来很愚蠢,但它可能会为未来的读者节省一些时间。
Hey i just faced exactly the same problem.嘿,我刚刚遇到了完全相同的问题。 I added several print statements to some very long dicts and afterwards i was not able to display additional print statements (The old print statements were still displayed).
我在一些很长的字典中添加了几个打印语句,之后我无法显示额外的打印语句(旧的打印语句仍然显示)。 I deleted some of the print statements with higher data volume and now it just works fine.
我删除了一些数据量较大的打印语句,现在它可以正常工作了。 SO i guess it is a kind of storage problem.
所以我想这是一种存储问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.