untarring files to S3 fails, not sure why

后端 未结 2 529
一个人的身影
一个人的身影 2021-01-07 03:53

(new information below) I am trying to set up a lambda function that reacts to uploaded tgz files by uncompressing them and writing the results back to S3. The unzip and unt

2条回答
  •  忘掉有多难
    2021-01-07 04:31

    In my case running the stream through stream.PassThrough helped.

    var PassThrough = require('stream').PassThrough;
    
    var stream = getStreamSomeHow();
    var passthrough = new PassThrough();
    
    stream.pipe(passthrough);
    
    s3.upload({...,Body:passthrough}) // 
    

提交回复
热议问题