Skip to content
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

Request body is empty when calling lambda endpoint in API Manager 4.3.0 version #3376

Open
niranRameshPeiris opened this issue Nov 21, 2024 · 0 comments

Comments

@niranRameshPeiris
Copy link

Description

Hi team,

We have noticed that WSO2 does not pass the request body to the lambdas in the API Manager 4.3.0 version. However, in 4.2, the request body passes to the lambdas perfectly. The steps we have followed in both 4.2 and 4.3 are as below.

  1. Download both API Manager 4.2/4.3 pack.
  2. Update to the latest.
  3. Create and Publish an AWS Lambda API.
  4. Subscribe to an Application.
  5. Invoke both the APIs with a payload.
curl --location 'https://localhost:8243/testLambda/1.0.0' \
--header 'accept: */*' \
--header 'Authorization: Bearer eyJ4NXQiOiJPREUzWTJa....2YhNBNFeZl6IAwN8OryQ' \
--header 'Content-Type: application/json' \
--data '{
    "name": "niran"
}'

We enabled debug logs to the org.wso2.carbon.apimgt.gateway.mediators.AWSLambdaMediator class before invoking this API. While analyzing the logs we were able to identify that the body is not sending in 4.3, but in 4.2 we can see the body.

API Manager-4.2.0
"body":{"name":"niran"}

API Manager-4.3.0
"body":{}

Thanks & Regards,
Niran Peiris

Steps to Reproduce

  1. Download both API Manager 4.2/4.3 pack.
  2. Update to the latest.
  3. Create and Publish an AWS Lambda API.
  4. Subscribe to an Application.
  5. Invoke both the APIs with a payload.
curl --location 'https://localhost:8243/testLambda/1.0.0' \
--header 'accept: */*' \
--header 'Authorization: Bearer eyJ4NXQiOiJPREUzWTJa....2YhNBNFeZl6IAwN8OryQ' \
--header 'Content-Type: application/json' \
--data '{
    "name": "niran"
}'

Affected Component

APIM

Version

4.3.0

Environment Details (with versions)

No response

Relevant Log Output

No response

Related Issues

No response

Suggested Labels

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant