Skip to content

Inconsistent AWS Lambda Integration Behavior in APIM #3414

@ashanhr

Description

@ashanhr

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions