I have an AWS Connect Contact Flow… it invokes a Lambda Function as below:
Now, I’ve followed the docs and set my destination key aligned to the name of the parameter in my Lambda function.
But now matter what I try even setting a phone number manually… the flow sends an empty JSON object to my lambda function.
This is eating my lunch, anyone have a solution?
3
Answers
This issues is with the object being passed from AWS connect to the Lambda function. The custom json items are attached to the "Parameters" object on the "Details" object.
Looks like you are not publishing your flow and you are retrying just by saving the flow.
I think I have solved this. You need to create the same class structure for the Contact flow. What I create is below and I just added custom name under "Parameters" which is the "DialedNumber" and I have put the same name in the Function Input parameters in Invoke AWS Lambda Function under the "Destination Key" and to test I set the value to manually but it will depend on your logic. Then you need to put the class in your function as the 2nd image.
1st Image in AWS Lambda Function input parameter
2nd Image in c# Function