简体   繁体   English

带有 S3 触发器的 aws lambda 未触发

[英]aws lambda with S3 trigger is not firing

I have a lambda function, which I deployed with a container image.我有一个 lambda function,我使用容器映像部署了它。 The function itself is super simple, and it basically prints something stupid. function 本身超级简单,它基本上打印了一些愚蠢的东西。 When I'm testing it using the "test" tab in the console I get "Execution succeeded":当我使用控制台中的“测试”选项卡对其进行测试时,我得到“执行成功”: 在此处输入图像描述

But when I add a s3 trigger - nothing happens when I upload a file to the S3 bucket!但是当我添加一个 s3 触发器时 - 当我将文件上传到 S3 存储桶时没有任何反应!

This is the function overview:这是 function 概述:

在此处输入图像描述

This is the Execution role:这是执行角色: 在此处输入图像描述

And this is the relevant policy in the "simple role" role, which should grant access to S3:这是“简单角色”角色中的相关策略,应该授予对 S3 的访问权限:

在此处输入图像描述

Here is the relevant bucket, when I upload file to it nothing happens in the Lambda!这是相关的存储桶,当我将文件上传到它时,Lambda 没有任何反应!

在此处输入图像描述

Any help will be appreciated!任何帮助将不胜感激!

It is likely that the function did execute, but you cannot see its output. function 很可能确实执行了,但您看不到它的 output。

The IAM policy associated with the AWS Lambda function should have, at minimum, the AWSLambdaBasicExecutionRole , which grants permission to upload logs to CloudWatch.AWS Lambda function关联的IAM 策略至少应具有AWSLambdaBasicExecutionRole ,它授予将日志上传到 CloudWatch 的权限。 This way, you can debug the function.这样就可以调试function。

Without those permissions, the only indication that the function executed would be the 'Invocations' graph in the Monitoring section of the function.如果没有这些权限,则执行 function 的唯一指示将是 function 的监控部分中的“调用”图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM