Can't get sls and AWS to handle a binary file, even with the simplest code #12110
Unanswered
mike-hogan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, this is a cross post from stackoverflow
I have made a super simple serverless.com repo here that makes an endpoint in AWS that accepts a PDF and returns it, as a test case to learn how binary files are handled.
Here is the serverless.yml
Here is the handler:
And here is the package.json
I run it offline like this:
And I invoke the endpoint like this:
The posted PDF is 1.3MB in size, and I get 489 bytes back, and its gibberish.
How do I make this work?
I want to make clear that I want to be able to post a binary PDF to this endpoint, not a base64 encoded one.
Beta Was this translation helpful? Give feedback.
All reactions