Closed ashwinspg closed 5 months ago
@ashwinspg what's the LWA version you have this issue? Could you share one sample request as well?
This issue is associated with LWA version: 0.3.2
.
Enabling 'Multi value headers' in target group on AWS console and using LWA itself is creating a problem (throwing 502
) irrespective of with/without multi value query string parameter.
@bnusunny
0.3.2
is an old version. I tested with the latest version 0.8.3
. It does not throw 502
and should work with "Multi value headers". Let me know if it works for you.
@ashwinspg
Updating the version to 0.8.3
resolves the problem.
Thank you for the support 👍
@bnusunny
Description
In our use case, we configured ALB by pointing lambda as target. This lambda is deployed with AWS Lambda Web Adapter to run http service.
In one of our API endpoint, we had a requirement on query parameters with multiple values for the same key. It is working as expected when the web application is deployed locally for testing.
What is the problem?
When we deployed the same to AWS environment using AWS Lambda Web Adapter. We observe that the application logic can get only last value of the query parameter.
To resolve this, we come to know about this: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html#multi-value-headers
By default 'Multi value headers' is disabled. Based on this, we enabled 'Multi value headers' in the target group.
After this configuration, we get '502 Bad Gateway' as response for every API requests even without multiple values for the same key.
In the logs, we see following error: