Closed
Description
Use case
There are times when I only need to return a 200 response without a body. Currently, if I return the Response
class without a body while using the ALBResolver
, the load balancer will return a 502, even when the lambda successfully returns a response.
Solution/User Experience
When returning Response(status_code=200)
the body would default to an empty string rather than None
.
I did take a look at the ALB docs and it does state:
The response from your Lambda function must include the Base64 encoding status, status code, and headers. You can omit the body.
So maybe there is another issue causing the 502 that I was seeing.
Alternative solutions
No response
Acknowledgment
- This feature request meets Powertools for AWS Lambda (Python) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET
Metadata
Metadata
Assignees
Type
Projects
Status
Shipped