I have a method "DB_Update" in a module.
This method requires several Parameters as Input (InputA, InputB and InputC)
module.exports.DB_Update = async (event) =>
{
//extract Parameters from event
InputA= event.pathParameters.InputA
InputB= event.pathParameters.InputB
InputC= event.pathParameters.InputC
// Update Items in DB based on Input
//...
}
I would like to invoke the function via an API request using serverless and AWS API Gateway
Hence in my serverless yml file I have added the function
DB_Update:
handler: ../DB_Update
events:
- http:
path: DB_Update/{InputA, InputB, InputB}
method: get
and finally I invoke the endpoint via Postman using the parameters
http://localhost:3000/dev/DB_Update/InputA=9783404163809&InputB=111&InputC=BB
However regardless of which alternation I try I don't get it to work. Either yml does not accept the combination of Input Parameters or I dont get an event object back.
Hence it would be great if you could give me a hint how to make this work. Thanks!