[英]Error: Runtime exited with error: exit status 129
I have added the following code to the lambda function to get a part of a zip file uploaded to my s3 bucket.我已将以下代码添加到 lambda function 以获取上传到我的 s3 存储桶的 zip 文件的一部分。
const AWS = require("aws-sdk");
const s3 = new AWS.S3();
const file = require('fs').createWriteStream('part1');
exports.handler = (event, context, callback) => {
const params = {
Bucket: 'myBucketName',
Key: 'myFolder/testZip.zip',
Range: 'bytes=0-3652539'
};
s3.getObject(params).createReadStream().pipe(file);
};
The response to the lambda is throwing an error as follows.对 lambda 的响应抛出如下错误。
Response:
{
"errorMessage": "RequestId: c1e4d549-b4f5-47b7-bcde-bc9a31faf731 Error: Runtime exited with error: exit status 129",
"errorType": "Runtime.ExitError"
}
Please Help me to download the chunk i have mentioned from lambda.请帮助我从 lambda 下载我提到的块。
The const file
should be var file
and the file path should be /tmp/test1
: const file
应该是var file
,文件路径应该是/tmp/test1
:
const AWS = require("aws-sdk");
const s3 = new AWS.S3();
var file = require('fs').createWriteStream('/tmp/part1');
exports.handler = (event, context, callback) => {
const params = {
Bucket: 'myBucketName',
Key: 'myFolder/testZip.zip',
Range: 'bytes=0-3652539'
};
s3.getObject(params).createReadStream().pipe(file);
};
Note: The above should address your current issue (exit status 129
).注意:以上内容应该可以解决您当前的问题(退出状态129
)。 I can't verify that everything else is correct or that it works.我无法验证其他一切是否正确或是否有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.