AWS lambda - unable to invoke Lambda using AWS lambda connector

0
Hi all, I am facing an error while using InvokeFunction Java action of AWS Lambda connector module. I am not sure whether I am doing in a correct way or not. Below in detail We have one Lambda function URL . That will get a question as a input request and gives answer in a JSON format.   From postman , I am setting authorization as AWS signature , AccessKey , Secret access key, Service name, region  and I am getting the answer without any error.  Now I want to implement the same in Mendix using Lambda connector module. For InvokeFunction I need to pass Credentials, Region, InvokeFunctionRequest Objects.  1. For credentials, I am using Static credentials ( Calling Get Static Credentials microflow ) 2. Region , I using an enum that also present in AWS module 3. For InvokeFunctionRequest I am setting Function name : ABC Payload : { "query" :"What is ABC "} Invocation Type : AWSLambdaConnector.ENUM_InvocationType.REQUEST_RESPONSE The response I am getting is  : {"errorMessage": "'body'", "errorType": "KeyError", "requestId": "30654d4f-3a90-4a45-9ee1-076e7b0d7a81", "stackTrace": ["  File \"/var/task/main.py\", line 6, in handler\n    print(f\"EVENT BODY: {event['body']}\")\n"]}{"errorMessage": "'body'", "errorType": "KeyError", "requestId": "30654d4f-3a90-4a45-9ee1-076e7b0d7a81", "stackTrace": ["  File \"/var/task/main.py\", line 6, in handler\n    print(f\"EVENT BODY: {event['body']}\")\n"]}.   If anyone know what mistake i did or how to resolve my issue please help here.  Thanks.  See below screenshots for more understanding From Postman From Mendix
asked
1 answers
0

The error says "KeyError" so it must be the Function Name. I digged a little deeper and found that the Java call uses the Lambda ARN as the function name. See the screenshot below.

Screenshot 2024-05-02 at 12.19.46 PM.jpg

answered