-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output buffer is size 0 on AWS lambda #207
Comments
Hi @Gr33nLight, usually this can happen if dependencies are not correctly installed. In your case you are adding them in lambda layers. Please check if they are actually available for use.
|
Thanks for the response @mskec . I tried using the public layers but unfortunately it seems it is not configured to be accessible by the aws region eu-south-1 (that I'm using) the error is as follows ( searching this error online seems to confirm this):
Thats why I think the only way is to use the version i built locally but as I mentioned earlier I get no output it seems, not even error which is weird, just a size 0 buffer (also tried base64). |
I will be trying to build an older graphicsmagick version to see if it fixes the issue |
I tried building it myself some months ago and published everything in this repo https://github.com/mskec/gm-lambda-layer Check it out and compare with how you are building them. |
@mskec I've used your gm-lambda-layer repo to build the layer and I'm still getting the same issue, i.e. empty Buffer. I've got 2 layers installed on the lambda, ghostscript and graphicsmagik, both installed local to the AWS account I'm working out of Unfortuantely, I cannot get any PDF doc to correctly convert to an image using this setup |
@steadweb can you send me your lambda zip and PDF you are trying to convert? You can use my email which should be visible in my profile. |
@steadweb I had the same issue. Recreating the function to use x86 fixed it for me. |
Hello I'm currently developing a function to extract an image of the first page of a pdf. I get the source pdf from s3 and upload the result to s3 as well.
I added ghostscript and graphicsmagick layers to the lambda, this is a snippet of my sst config
And this is the lambda code
As you can see from my code I logged both the input and output buffers. The input buffer has the correct value (not 0) but the output buffer length is always 0, what other checks can I do?
Thanks!!
The text was updated successfully, but these errors were encountered: