Back to Blog
Amazon ConnectAWSIVR

Getting Started with Amazon Connect

  May 2025   8 min read   Sushil Kumar

If you’ve ever called a bank’s helpline and navigated through a phone menu — “Press 1 for account balance, Press 2 for card services” — you’ve already experienced an IVR (Interactive Voice Response) system. Amazon Connect is AWS’s cloud-based contact center service that lets you build these kinds of systems without managing any telephony infrastructure.

In this post I’ll walk you through the core concepts and show you how to build your first real contact flow from scratch.

What is Amazon Connect?

Amazon Connect is a self-service, omnichannel cloud contact center. At its core it provides:

Cost model: You pay per minute of usage and per active agent. There is no upfront commitment and the free tier covers 90 minutes/month.

Key Concepts You Must Know First

Contact Flows

A contact flow is the brain of your IVR. Think of it as a flowchart where each box is a block. Blocks can play audio, get input, invoke a Lambda, transfer to a queue, or disconnect. Connect has several flow types:

Queues and Routing Profiles

A queue holds contacts waiting for an agent. A routing profile maps queues to agents, with priority and delay settings so you can control which queue an agent picks up from first.

Contact Attributes

Attributes are key-value pairs that travel with the contact throughout its lifecycle. You set them using the Set contact attributes block and read them anywhere downstream — in Lambda functions, in whisper flows, or in reporting.

Building Your First Flow: A Simple Balance Inquiry IVR

We’ll build a flow that:

  1. Greets the caller.
  2. Asks them to press 1 for account balance or 2 to speak to an agent.
  3. On press 1 — invokes a Lambda to fetch a mock balance and reads it back.
  4. On press 2 — transfers the caller to a queue.

Step 1 — Create your Connect instance

In the AWS Console, open Amazon Connect and click Create instance. Choose Store users in Amazon Connect, set an access URL (e.g., mybank.my.connect.aws), skip data storage customisation for now, and finish the wizard.

Step 2 — Claim a phone number

In your Connect instance dashboard go to Channels → Phone numbers → Claim a number. Pick a DID number in your country. Leave the contact flow as Default inbound flow for now — we’ll change it after we build ours.

Step 3 — Create the Lambda function

Our flow will call a Lambda to retrieve a balance. Create a Python Lambda with this handler:

import json

def lambda_handler(event, context):
    # event['Details']['ContactData']['CustomerEndpoint']['Address'] gives the caller's phone number
    caller = event['Details']['ContactData']['CustomerEndpoint']['Address']

    return {
        "balance": "2,450.00",
        "currency": "USD",
        "caller": caller
    }

After deploying, go to your Connect instance in the console → Flows → AWS Lambda and add the function ARN so Connect is allowed to invoke it.

Step 4 — Build the contact flow

Open Routing → Contact flows → Create contact flow. You’ll see a canvas with just an Entry point block.

  1. Play prompt — drag a Play prompt block, set text-to-speech text: “Welcome to Sudoshil Bank. For account balance press 1. To speak to an agent press 2.”
  2. Get customer input — add a Get customer input block. Set the prompt to silence (already announced above), type DTMF, timeout 5 seconds, add two options: 1 and 2.
  3. Branch on 1 — Invoke AWS Lambda: select your function. Store the returned balance in a contact attribute called AccountBalance.
  4. Play balance — Play prompt using dynamic text: “Your current balance is $.Attributes.AccountBalance dollars.”
  5. Disconnect — Add a Disconnect / hang up block after the balance readback.
  6. Branch on 2 — Add a Set working queue block pointing to your BasicQueue, then a Transfer to queue block.

Wire all the blocks together, connect the Timeout and Error branches to a friendly error prompt followed by disconnect, and click Save & Publish.

Step 5 — Assign the flow to your phone number

Go back to Channels → Phone numbers, edit your claimed number, and change Contact flow / IVR to your new flow. Call the number — you should hear your greeting!

Common Gotchas

What’s Next?

Once you’re comfortable with basic flows, the natural next step is adding conversational AI with Amazon Lex so callers can say “What’s my balance?” instead of pressing keys. I cover that in depth in the next post.

Further reading: The official Amazon Connect documentation is surprisingly good. The Administrator Guide is especially useful for understanding routing and metrics.
Previous Python Asyncio: The Zen of Not Waiting All Posts Next Amazon Lex V2: Speech & Intent Handling