-
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
Multiline output from local invoke gets chopped short #3770
Comments
I've reproduced the issue. Will bring this up with team and prioritize fixing it. |
Is there a workaround for this? this seriously hampers debugging. EDIT: this doesn't seem specific to "sam local invoke", it also affects "aws lambda invoke" called locally (eg after a "am local start-lambda") |
Also for visibility, it seems like the bot removed what might be an important label? |
same behavior during |
I'd like to add that this behaviour appeared somewhere around mid 2021. Previous SAM versions didn't have this behaviour. It's a problem for the following reason: when running or building Lambda locally and an exception occurs, you're forced to always debug instead of getting the trace from the console. |
This behavior is fixed with this PR: #4563 Next SAM CLI release should resolve this isssue. |
Fix is released with v1.71.0 |
|
upgraded to console.log(`multi line
1
2
3
4
msg
end here`); print out within single line like below:
|
Also still experiencing this on 1.73.0. tagging @mndeveci for visibility. Thanks |
On a mac - used the following ugly workaround |
Hello, is there a workarround for linux base systems? $ sam local invoke -e ./lambda/lambda_event.json LambdaDemoFunction $ sam --version |
Did you guys find a workaround for this? |
@scerelli - As per the following, apparently it is fixed? (I haven't tested) |
Hey all, it should be fixed as I tried to reproduce the issue just a moment ago:
|
|
Description:
When locally invoking lambdas via
local invoke
, multi-line console logs are typically cut short, causing them to be illegible.Steps to reproduce:
Observed result:
Expected result:
lambda is invoked, and multiline console log is formatted correctly, i.e. all lines appear in terminal as intended. Note: the "specified bucket does not exist" line is expected, as i'm configuring environment variables. however the entire output of the console.error is being truncated which is the issue.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Linux xx 5.13.0-35-generic Missing Makefile? #40-Ubuntu SMP Mon Mar 7 08:03:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
sam --version
: SAM CLI, version 1.37.0The text was updated successfully, but these errors were encountered: