You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the above code prints "SELECT a.source_name". I've validated that it works correctly with queries without commas. I am unaware of any other characters that cause this behavior.
Code snippet
See above. This can be easily recreated by passing a Bedrock action group query parameter with a comma in it to the resolver.
Possible Solution
This may be related to how the resolver inherits from the ApiGateway resolver and passes the parameters as query parameters.
Steps to Reproduce
Create a Bedrock Agent Resolver instance and add a POST route with a string parameter
Pass a valid minimum test payload to the handler instance with a parameter value including a comma, such as a complex SQL query
Check the parameter as passed to the route function
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.12
Packaging format used
Lambda Layers
Debugging logs
The text was updated successfully, but these errors were encountered:
Thanks for opening your first issue here! We'll come back to you as soon as we can.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link
Hi @mkkatica, thanks for opening this issue! I think I know what's going on here! When we parse the event that tries to determine if the request contains a multi-valued parameter, we are incorrectly parsing data where the comma is actually expected, as in your case.
I need to see how to fix this, but will add in our backlog to take a look this week.
Thanks @leandrodamascena! I was able to work around this by reading the event directly in my route function using app.current_event for now, but it will be nice to have it parse correctly.
Expected Behaviour
Given an input:
The expected parameters passed to the function registered at the endpoint should include the entire query:
Current Behaviour
Currently, the above code prints "SELECT a.source_name". I've validated that it works correctly with queries without commas. I am unaware of any other characters that cause this behavior.
Code snippet
See above. This can be easily recreated by passing a Bedrock action group query parameter with a comma in it to the resolver.
Possible Solution
This may be related to how the resolver inherits from the ApiGateway resolver and passes the parameters as query parameters.
Steps to Reproduce
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.12
Packaging format used
Lambda Layers
Debugging logs
The text was updated successfully, but these errors were encountered: