Closed jackie-linz closed 2 months ago
I have a lambda function with function URL that returns status code of 400
export const handler = async (event) => { return { statusCode: 400, body: JSON.stringify({data: 'Hello from Lambda!'}), }; };
I call this function with awscurl and I'd expect that the command exit with non-zero exit code, but got zero instead.
awscurl
$ awscurl --service lambda https://<my-function-url>.lambda-url.ap-southeast-2.on.aws/ {"data":"Hello from Lambda!"} $ echo $? 0
Looks like this line of code is missing a return?
return
https://github.com/okigan/awscurl/blob/master/awscurl/awscurl.py#L573
I have a lambda function with function URL that returns status code of 400
I call this function with
awscurl
and I'd expect that the command exit with non-zero exit code, but got zero instead.Looks like this line of code is missing a
return
?https://github.com/okigan/awscurl/blob/master/awscurl/awscurl.py#L573