Connect LabAmazon Connect study

Lambda

When the work is slower than eight seconds

Learn it in 5 minutes

HTML

About five minutes of reading

Silence is a defect. Async plus a prompt is the pattern.

Set the block to asynchronous. Play a prompt. Use Wait if you must observe completion, up to 60 seconds. Do not chain synchronous calls until you pass 20 seconds in total.

If the result is only needed by the agent, write it to a profile or a case and let the workspace load it. The caller does not have to wait on the phone.

  • Tell the caller what is happening.
  • A timeout branch still needs a prompt.
  • Long work belongs in a queue or a task, not in the greet flow.
  • Measure duration in CloudWatch before you argue about the flow.

Number on this page: Sequence cap 20s. Across Lambda calls in the contact

Visual

HTML
When the work is slower than eight seconds

Picture from this room.

Worked example

HTML
  1. Async. Do not block the audio.
  2. Prompt. Fill the silence.
  3. Store. Profile or attribute.
  4. Agent. Reads it in the workspace.

What usually goes wrong: A synchronous chain of four CRM calls at the start of every inbound call.

Quiz

HTML

Question 1

Which term matches this description? At most 8 seconds. The function's own timeout can be longer. The flow still takes the Error or Timeout branch at 8 seconds.

Show the cited answer

At most 8 seconds. The function's own timeout can be longer. The flow still takes the Error or Timeout branch at 8 seconds. The term is Lambda synchronous timeout.

Flow block in Connect Customer: AWS Lambda function - Amazon Connect Customer AWS docs. last checked 2026-10

Question 2

Which term matches this description? The flow continues without waiting. You can wait up to 60 seconds with a Wait block. A sequence of Lambda calls must finish within 20 seconds.

Show the cited answer

The flow continues without waiting. You can wait up to 60 seconds with a Wait block. A sequence of Lambda calls must finish within 20 seconds. The term is Lambda asynchronous mode.

Flow block in Connect Customer: AWS Lambda function - Amazon Connect Customer AWS docs. last checked 2026-10

Question 3

Which term matches this description? The practical ceiling called out for a Lambda payload Connect will consume. Larger or nested payloads take the error branch when the block expects a string map.

Show the cited answer

The practical ceiling called out for a Lambda payload Connect will consume. Larger or nested payloads take the error branch when the block expects a string map. The term is 32 KB response.

Troubleshoot contact flow errors in Amazon Connect | AWS re:Post community. last checked 2026-10

Sources

HTML

Flow block in Connect Customer: AWS Lambda function - Amazon Connect Customer AWS docs. last checked 2026-10

The prose is a study paraphrase. The link is the source of the facts.

Ecosystem

HTML

Glossary

  • Lambda synchronous timeout At most 8 seconds. The function's own timeout can be longer. The flow still takes the Error or Timeout branch at 8 seconds.
  • Lambda asynchronous mode The flow continues without waiting. You can wait up to 60 seconds with a Wait block. A sequence of Lambda calls must finish within 20 seconds.
  • String map A flat object of string keys and string values. One of the two Lambda response shapes.
  • CloudFormation AWS::Connect::ContactFlow A stack resource whose content is flow-language JSON. Use it to move a flow between instances.

Mind map

Open the Lambda mind map

Sister technologies

Most 'random' flow errors are a Lambda response that missed the timeout or the shape Connect accepts.

Config and troubleshooting

A synchronous chain of four CRM calls at the start of every inbound call.

Two pieces: a resource policy that trusts connect.amazonaws.com, and an integration association so the flow can select the function. The block still waits at most 8 seconds when InvocationType is SYNCHRONOUS.

Lambda functions IntegrationAssociation

CloudFormation study snippet
Resources:
  InvokePermission:
    Type: AWS::Lambda::Permission
    Properties:
      FunctionName: !Ref FlowHook
      Action: lambda:InvokeFunction
      Principal: connect.amazonaws.com
      SourceArn: !GetAtt CampusInstance.Arn
  LambdaAssociation:
    Type: AWS::Connect::IntegrationAssociation
    Properties:
      InstanceId: !GetAtt CampusInstance.Id
      IntegrationType: LAMBDA_FUNCTION
      IntegrationArn: !GetAtt FlowHook.Arn

Integration map

Join records on ContactId. The integration map room lists the seams.

Cross-platform bridges

A CUCM calling search space is not a routing profile, but the profile is the closest idea of 'who can receive what'. A partition is not a Connect object. A UCCX CSQ and a UCCE skill group map to a queue. Precision steps map to routing criteria. A script, an Architect flow, and an Avaya vector map to a contact flow.

Open the mapping room

Future hooks

Hooks you can adopt later: EventBridge contact events, the CTR stream, agent events, Kinesis Video, Customer Profiles events, Cases, Show view, data tables, External Tool, and the flow language JSON in your pipeline. Live Sync and Agentic CX are the 2026 hooks for guided and agentic experiences.

Sources and go deeper

sources.json