[英]AWS LAMBDA function "Cannot read property 's3' of undefined"
I am using lambda AWS to convert mp4 to HLS and when I put my hostname: I am getting an error of the following:我正在使用 lambda AWS 将 mp4 转换为 HLS,当我输入我的主机名时:我收到以下错误:
{
"errorType": "TypeError",
"errorMessage": "Cannot read property 's3' of undefined",
"trace": [
"TypeError: Cannot read property 's3' of undefined",
" at Runtime.exports.handler (/var/task/index.js:14:35)",
" at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
]
}
It looks like the event your Lambda function is not a valid S3 event .看起来您的 Lambda 函数不是有效的 S3 事件。
At a guess, you are manually triggering your Lambda function with a test event from the AWS console and you have supplied an non-conformant JSON structure.猜测一下,您正在使用来自 AWS 控制台的测试事件手动触发您的 Lambda 函数,并且您提供了一个不符合标准的 JSON 结构。
Here is a minimal example of what you need in the test event:这是您在测试活动中需要的一个最小示例:
{
"Records": [
{
"s3": {
"bucket": {
"name": "my-s3-bucket"
},
"object": {
"key": "HappyFace.jpg"
}
}
}
]
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.