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

Inconsistent AWS Lambda Integration Behavior in APIM #3414

Open
ashanhr opened this issue Dec 3, 2024 · 0 comments
Open

Inconsistent AWS Lambda Integration Behavior in APIM #3414

ashanhr opened this issue Dec 3, 2024 · 0 comments
Labels

Comments

@ashanhr
Copy link

ashanhr commented Dec 3, 2024

Description

When invoking a AWS lambda function the payload contains body as a JSON object instead of a string. According to the AWS requirement[1] body should be a string.

[1] https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html

Steps to Reproduce

  • Followed the document[2[ to create the sample AWS Lambda API on the APIM 4.2.0 update level 79 pack.
  • Created a simple AWS Lambda function in the Lambda-Acc account and deployed it:
  • Selected the “Using stored AWS credentials” option as the Access Method when defining the endpoint in the publisher portal.
  • Provided the access key, secret key, and the region which we obtained from the previously created AWS account.
  • Created a resource and configured the AWS Lambda settings with the relevant ARN and published the API.
  • Enabled the debug logs for the "AWSLambdaMediator".
  • Invoked the API and observe the body property in the payload log.

[2] https://apim.docs.wso2.com/en/4.2.0/tutorials/create-and-publish-awslambda-api/

Version

4.2.0

Environment Details (with versions)

No response

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

No branches or pull requests

1 participant