3

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

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
osya
  • 91
  • 2
  • 10

2 Answers2

1

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

Rupali Pemare
  • 540
  • 1
  • 9
  • 24
1

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.

Kelly Norton
  • 487
  • 2
  • 4
  • 19