I'm deeply confused trying to integrate AWS API Gateway with AWS Lambda, because i'm trying to execute a lambda function through the GET method and always my function is returning invalid parameter.
{"errorMessage":"Error - Invalid Group ID - undefined - alexa id: undefined"}|
It happens because the parameters was not arriving to the function and idgrupo variable is <=0.
I'm trying to execute a lambda function with URL at this form:
domain.execute-api.us-east-1.amazonaws.com/prod/chkneopairtoken?idgrupo=3823&clientId={321356-6666-4745}&keypair=90809276
And in my Lambda function i'm doing it:
var idgrupo = event.idgrupo;
var alexaClientId = event.clientId;
var keypair = event.keypair;
if (idgrupo > 0){
} else{
console.log("Error - Invalid Group ID - " + idgrupo + " - alexa id: " + alexaClientId + " - ");
//callback(null, "Error - Invalid Group ID - " + idgrupo + " - alexa id: " + alexaClientId);
context.fail("Error - Invalid Group ID - " + idgrupo + " - alexa id: " + alexaClientId);
}
Are there the possibility to do what i'm trying to do? I think it is not an integration error between API Gateway and AWS Lambda, because the function returns my custom error message, and I believe it is a transfer parameters error.