Lambda response payload size being exceeded #118
-
What happened?Hello I am using onLambda() to generate my PDF with sidecar which is all okay except I'm wondering if it's possible to run both on lambda and also save directly to S3 within Lambda? I know that this is possible in Browsershot however I can't work out how to achieve this with this pdf package. I'm exceeding the response payload size however I don't want to have it respond the file, just save it straight to S3. Please could someone advise on how I can achieve this? How to reproduce the bugCreate a PDF with x amount of content, run on lambda and try to save to S3 using ->disk() Package Version1.4 PHP Version8.2 Laravel Version10.0 Which operating systems does with happen with?Linux NotesNo response |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hi, I forked the repository and made a quick & dirty usage of the feature in browser shot. If anyone needs a quick solution it's here: https://github.com/astra-telematics/laravel-pdf/tree/save-to-s3-in-lambda |
Beta Was this translation helpful? Give feedback.
-
I'm wondering if @freekmurze would accept a PR for this? I could also use a stable way to save pdfs directly to s3. Or what could make it work for you? |
Beta Was this translation helpful? Give feedback.
-
If you check out my fork linked above you will be able to see how I got it to work. It's dirty and not ready for a PR but I'm happy to implement it properly for PR if one would be accepted |
Beta Was this translation helpful? Give feedback.
-
@freekmurze @james-astra I am facing the same problem, is there any way to get this as part of the default package? |
Beta Was this translation helpful? Give feedback.
This package uses browsershot :) I would recommend using this package and use my fork if you would like to save directly to S3 from your lambda. Here is how you can use it: