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) TenetsShould this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET
Metadata
Metadata
Assignees
Type
Projects
Status
Shipped
Milestone
Relationships
Development
No branches or pull requests
Activity
github-actions commentedon Jul 3, 2024
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
github-actions commentedon Jul 11, 2024
This is now released under 2.41.0 version!