Code Monkey home page Code Monkey logo

Comments (5)

Noob7 avatar Noob7 commented on August 24, 2024 1

The whole point of sending files through lambda is to get some additional functionality. In my case I need to collect all files in a folder and zip them before sending. Is there a way to do it via a lambda without having to load all files in the lambda memory :(

from lambda-api.

nathan-osg avatar nathan-osg commented on August 24, 2024

Grr... looking a little further, it would seem that the JS version of Lambda may not have a way to return a stream back to API gateway, however. :( (The Java version does)

https://stackoverflow.com/questions/39381139/how-to-stream-aws-lambda-response-in-node

from lambda-api.

nathan-osg avatar nathan-osg commented on August 24, 2024

Just FYI, I posted to the AWS forums asking if there were any plans to add stream input/output support to Lambda on Node... not sure if it will bear any fruit.

https://forums.aws.amazon.com/thread.jspa?threadID=286462

This is a pretty big bummer for me... :(

from lambda-api.

jeremydaly avatar jeremydaly commented on August 24, 2024

Yes, Lambda doesn't support file streaming to API Gateway. Lambda API isn't really designed for loading really large files anyway. However, if you did need to let users download large files from S3, you could use Lambda API to generate access tokens and then use res.redirect() to send them to the S3 bucket URL.

from lambda-api.

jeremydaly avatar jeremydaly commented on August 24, 2024

I did a little more research, and you can use getSignedUrl(), documented here: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getSignedUrl-property

This would create a temporary link that you could then redirect the user to. I think I'm going to add this as a feature.

from lambda-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.