scar
scar copied to clipboard
Responses larger than Lambda-imposed 6MB limit
I've run into a use case where the response when running a Lambda function via an HTTP POST to an API Gateway endpoint will likely exceed the Lambda imposed limit if 6MB. I have made a modification to SCAR to inspect the size of the response, and deliver it via a write to S3 with a pre-signed URL delivered via a 302 redirect.
Interested to know if there are any other approaches that have been tried.
Hi, for large responses we always use an S3 bucket to store the output. The scripts that we use in our different examples are in charge of creating/moving the output files generated by the container in the output folder that the supervisor will check when the execution is finished. If for any reason you could not create or move this files, your alternative could be valid. Also, if the user already defined an output bucket/folder we could use it as default instead of the pre-signed URL. I can add this check, but if you already have it working I encourage you to do a PR so we can add it to our framework :smiley: