I created Amazon Connect instance and take a DID phone number. Then I create Contact flow with AWS Lambda function in the same region - N. Virginia. Then I assign this Contact flow to phone number. When I tried to call to this phone number via softphone "Failed connection" error appears. When I tried to use another Contact flows without lambda, and also standard Contact flow "Sample Lambda integration" - it seems working. Please advise
-
did you already resolve you problem? – Oswaldo Zapata Sep 14 '17 at 16:06
-
The post is quite old now. Did you get the problem resolved? – Sonu Mishra Oct 06 '17 at 02:05
-
No. It was just a certain task. I finished it and never returned to the Amazon Connect – osya Oct 07 '17 at 11:01
2 Answers
Please check if the permission and policy is set for the lambda function
In the function check triggers tab in the open the view function policy. If no policy is attached , then please add required permission , you can add permission using following link http://docs.aws.amazon.com/connect/latest/adminguide/connect-lambda-functions.html#allow-call-function

- 540
- 1
- 9
- 24
I know this is an old post, but I thought I'd share my findings for anyone else that ends up here. In order for Connect to invoke a Lambda function, you need to add the Connect instance as a trigger. Unfortunately, this can not be done from the Lambda console, you must perform the operation from the console. Here is an example:
aws lambda add-permission --function-name function:my-lambda-function --statement-id 1 \
--principal connect.amazonaws.com --action lambda:InvokeFunction --source-account 123456789012 \
--source-arn arn:aws:connect:us-east-1:123456789012:instance/def1a4fc-ac9d-11e6-b582-06a0be38cccf
It is documented here:
https://docs.aws.amazon.com/connect/latest/adminguide/connect-lambda-functions.html
Also note, once you add the Connect instance as a trigger, it STILL doesn't appear in the Lambda console. Bear this in mind as it is quite odd behaviour.

- 487
- 2
- 4
- 19