Skip to content

Feature request: Default ALBResolver Response body to empty string instead of None #4671

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

Closed
2 tasks done
TonySherman opened this issue Jul 2, 2024 · 2 comments
Closed
2 tasks done
Labels
feature-request feature request triage Pending triage from maintainers

Comments

@TonySherman
Copy link
Contributor

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

Copy link
Contributor

github-actions bot commented Jul 3, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

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.

Copy link
Contributor

This is now released under 2.41.0 version!

@github-actions github-actions bot removed the pending-release Fix or implementation already in dev waiting to be released label Jul 11, 2024
@leandrodamascena leandrodamascena moved this from Coming soon to Shipped in Powertools for AWS Lambda (Python) Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request feature request triage Pending triage from maintainers
Projects
Status: Shipped
Development

No branches or pull requests

2 participants