Flow block: Invoke AWS Lambda function
Description
-
Calls AWS Lambda, and optionally returns key-value pairs.
-
The returned key-value pairs can be used to set contact attributes.
-
For an example, see Tutorial: Create a Lambda function and invoke in a flow.
Supported channels
The following table lists how this block routes a contact who is using the specified channel.
Channel | Supported? |
---|---|
Voice |
Yes |
Chat |
Yes |
Task |
Yes |
Flow types
You can use this block in the following contact flow types:
-
Inbound flow
-
Customer Queue flow
-
Customer Hold flow
-
Customer Whisper flow
-
Agent Hold flow
-
Agent Whisper flow
-
Transfer to Agent flow
-
Transfer to Queue flow
Properties

Note the following properties:
-
Timeout: Enter how long to wait for Lambda to time out.
If your Lambda invocation gets throttled, the request is retried. It is also retried if a general service failure (500 error) happens.
When a synchronous invocation returns an error, Amazon Connect retries up to three times, for a maximum of 8 seconds. At that point, the contact is routed down the Error branch.
Configuration tips
-
To use an AWS Lambda function in a flow, first add the function to your instance. For more information, see Add a Lambda function to your Amazon Connect instance,
-
After you add the function to your instance, you can select the function from the Select a function drop-down list in the block to use it in the flow.
Configured block
When this block is configured, it looks similar to the following image:

Sample flows
Scenarios
See these topics for scenarios that use this block: