Skip to content

LambdaAnnotations | Proper use of HttpResults and [FromBody] attribute. #1569

Answered by normj
sergio-asenjo asked this question in Q&A
Discussion options

You must be logged in to vote

Seeing the base64 is a bug in the mock test tool. I think what is going on is the following block of code from the tool does not have a check in the non Task else block to check if the return is a stream and return it like the first Task if block. So the Stream is accidentally being run the the ILambdaSerializer. @ashishdhingra can you convert this into a issue tag as a bug.

https://github.com/aws/aws-lambda-dotnet/blob/master/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/Runtime/LambdaExecutor.cs#L184

// If the return was a Task then wait till the task is complete.
if (lambdaReturnObject is Task task)
{
    await task;

    // Check to see if the Task returns back an object.
    // The…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@github-actions
Comment options

Comment options

You must be logged in to vote
1 reply
@ashishdhingra
Comment options

Answer selected by ashishdhingra
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants