2 Answers
0
Accepted Answer
Hey Pier, you are right. My answer was wrong in your context, sorry about that. But the body being string is by design as noted by Uri.
answered a month ago
0
This is by design.
I think you are only able to change it using API Gateway. Lambda functions with PROXY integration accelerates your integration process as you don't need to create the request and response templates. And, as the Lambda can receive binary payload in BASE64, the body
should have a type for this case also, as, the payload is not JSON.
You can still receive the payload as JSON if you setup the request and response templates by yourself.
answered a month ago
Relevant questions
How do I query X-ray using a http URL, where that URL is not the first part of the request?
asked 3 months agoInternal Server Error/502 Bad Gateway testing a Lambda Function via the Function URL
asked a month agoPOST request to presigned AWS Lambda Function URL with unsigned payload
asked a month agoWhy does Lambda URL convert the request body from JSON to string?
Accepted Answerasked a month agoConverting existing, manually created Lambda with triggers and Function URL to SAM
asked a month agonew Lambda Function URL with Terraform
Accepted Answerasked 4 months agoUnable to use X-Http-Method-Override header with Lambda Function URL
asked a month agoHow to retrieve path parameters from websocket url in lambda functions
Accepted Answerasked 8 months agoError "The security token included in the request is invalid" invoking lambda function url
asked 2 months agoConnecting Cloudfront to Lambda Function Url Always Result in forbidden
Accepted Answerasked 3 days ago
Thank you for your answer, Eduardo.
How can set up a request template for a Lambda URL? I haven't seen that being supported for Lambda URLs. The link you posted is for API Gateway.
The reason provided by Eduardo is correct, although the details relate to API Gateway with Lambda and not Lambda Function URLs.
I think that depending on the programming language, you should be able to parse it easily, e.g., in Python use something like
body = json.loads(event.body)