-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Bug: 'isBase64Encoded: true' not working in local sam. #6452
Comments
Hi @dyingsunlight, thanks for reporting the issue. I tried to deploy the app and browse the URL but could not see the image. As for the |
It's not working... I tried setting The debug logs:
I believe the issue is that, according to the documentation, the |
Marking this as a bug for the team to investigate the right behavior here. |
Hi, It looks like because in the template provided the api definition does not have anything declared for the BinaryMediaTypes property SAM CLI does not try to decode the image. Changing the template to the following fixed the issue for me
Alternatively changing the event type to |
Thanks, it's looks working now! |
|
Description:
I wan to draw image in lambda as response, but it seems broken when i using
isBase64Encoded: true
as response option.The debug output shows generated events are
isBase64Encoded: false
and output the original body as ouput.Steps to reproduce:
My project files:
lambda/hello-world.mjs
lambda/package.json
template.json
The example project can be found in https://github.com/dyingsunlight/aws-sam-bug-isBase64Encoded
Observed result:
The image is broken
When edit the content as text that the text is extracly set to body before.
Response body
Expected result:
I also deploy the same code to aws lambda in production...
The response should be this
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Add --debug flag to command you are running
DEBUG outputs
The text was updated successfully, but these errors were encountered: