为什么 aws Step Func 说它调用了我的 lambda fn,但该 lambda 没有日志组?

发布于 2025-01-12 12:35:35 字数 804 浏览 2 评论 0原文

我有一个调用 lambda 函数的状态机。当我执行状态机时,它说执行成功。当我单击 Lambda 步骤时,我可以看到它应该调用的 lambda 的 ARN、输入和输出 (null)。该输出不是预期的。当我点击该功能的 CloudWatch 日志组链接时,发现过去几个小时内没有日志组。这表明 lambda 当前正在被调用。

这是基本工作流程:
输入图片此处描述

这是该 Lambda 状态的配置:
输入图片此处描述

这是状态机的执行:
输入图片此处的描述

同样,输出为 null,并且此 lambda 的 cloudWatch 日志组不包含最近的日志记录。

我确实必须重新部署 lambda 来解决管道问题。在这次改变之前它是有效的。为了解决这个问题,我删除了状态机的内容并从头开始重新创建它。

我缺少什么?

谢谢

I have a state machine that calls a lambda function. When I execute the state machine, it says the execution was successful. When I click on the Lambda step, I can see the ARN of the lambda it should be calling, I can see the input, and I can see the output (null). That output is not expected. And when I follow the link to the CloudWatch log group for that function, there's no log group in last few hours. This suggests that the lambda is even being invoked currently.

Here's the basic workflow:
enter image description here

Here's the configuration for that Lambda state:
enter image description here

Here's an execution of the state machine:
enter image description here

Again, output is null and the cloudWatch log group for this lambda contains no recent log records.

I did have to redeploy the lambda to fix a pipeline issue. It was working before that change. To account for that I deleted the contents of the state machine and re-created it from scratch.

What am I missing?

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

卷耳 2025-01-19 12:35:35

如果您确信 Lambda 函数确实执行了,但没有写入 CloudWatch Logs,那么这可能是由于缺乏日志记录权限造成的。

典型 Lambda 函数的 IAM 角色有权写入 CloudWatch Logs。以下是此类政策的示例。或者,您可以使用 Lambda 的 AWS 托管策略,例如 AWSLambdaBasicExecutionRole。

If you're confident that the Lambda function did execute but no CloudWatch Logs were written then that is probably caused by lack of logging permissions.

A typical Lambda function's IAM role has permission to write to CloudWatch Logs. Here is an example of such a policy. Alternatively, you can use one of the AWS managed policies for Lambda, for example AWSLambdaBasicExecutionRole.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文