We use a third party app that sends event-driven webhook requests to trigger our ERP system. We have set an ERP endpoint to receive the request but due to ERP system complexibility, we must receive the request body to a predefined format. So, somehow we need to transform the webhook body and send it to our ERP API in the desired format. I am thinking of using AWS lambda.
Can anyone give me some guidelines how to trigger the AWS lambda function receiving the webhook, then transform its content to the desired format and, finally, POST the right structure to our ERP API?
CodePudding user response:
You would need to create an AWS API Gateway to receive the webhook request. You would configure the API Gateway to pass the request to an AWS Lambda function. Inside the Lambda function you would write code to parse the request, convert it into the desired format, and then perform a POST request to your ERP system.