AWS Contact Center

Manage prompts programmatically with Amazon Connect


Contact centers use prompts to interact with customers, to obtain information from customers and to provide updates to customers. Prompts are recorded audio files played in call flows. Contact center administrators need to react quickly to the business needs by adding new prompts or changing existing prompts.

Tracking and managing large numbers of prompts is a time-consuming task. Managing prompts across channels and using multiple languages complicates this further. Propagating prompts across deployment environments adds another dimension of complexity. Minor errors during manual prompt updates can result in inconsistent customer messaging, customer confusion, and potential misrouting of contacts. With Amazon Connect, businesses can use Prompts API operations to programmatically manage prompts using automation tools to streamline the prompt creation and management process.

In this blog post, you will learn how to deploy a web-based application to manage prompts in Amazon Connect using API operations. The post uses six prompt-specific API actions (List prompts, Create prompt, Update prompt, Describe prompt, Delete prompt, and Retrieve prompt file).

Overview of solution

This solution is deployed using an AWS CloudFormation template. It creates an Amazon S3 bucket and loads all the assets into Amazon CloudFront. Users invoke Amazon CloudFront URL to view the web User Interface(UI). Based on the prompt specific API operations you choose, this UI initiates the appropriate API operation in Amazon Connect.

Note: This sample project is designed to be deployed for experimentation. The Identity Access Management (IAM) policy permissions use least privilege, however the Amazon CloudFront deployed is publicly accessible. Please take the appropriate measures to secure your CloudFront distribution as required.


For this blog post, it is assumed that you understand the use of the services below and you have the following prerequisites:

Following is a sample policy with least minimum required access permissions:

    "Version": "2012-10-17",
    "Statement": [
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
            "Resource": [
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": [
            "Resource": "arn:aws:connect:YOUR_REGION:YOUR_ACCOUNT_ID:instance/YOUR_INSTANCE_ID/prompt/*"
            "Sid": "VisualEditor2",
            "Effect": "Allow",
            "Action": "connect:ListInstances",
            "Resource": "*"

Deploy the solution

  1. Sign in to the AWS Management Console and select the same Region as your Amazon Connect instance.
  2. Click on to launch the AWS CloudFormation template.
  3. Enter a unique Stack name (e.g. prompts-api-web-ui).
  4. Select the check the box to acknowledge the IAM resource creation.
  5. Choose Create Stack. The AWS CloudFormation template takes about 10 minutes to create all the resources. Once done, the status changes to CREATE_COMPLETE.
  6. Navigate to the Outputs section of the newly created stack.
  7. Copy the value of CloudFrontEndpoint.
  8. Paste the URL in a new web browser tab/window to navigate to the CloudFront web UI.

How to access the web UI to manage prompts

Initial Configuration

  1. Enter the IAM User Access ID, Secret Access Key and Region (To get your access key ID and secret access key).
  2. Enter the Amazon Connect ARN (Find your Amazon Connect instance ARN).
  3. Choose Save Configurations.

Test the solution for managing the prompts in your Amazon Connect instance

Next, we will test the six prompts API operations on the navigation pane.

  1. List Prompts
    1. On the navigation menu, choose List Prompts
    2. This lists all prompts associated with your Amazon Connect instance in a tabular format on the center panel. Results can be sorted based on the prompt name. The right panel shows a JSON listing with the Prompt Id, ARN, and name.
    3. Log in to your Amazon Connect console and verify the prompts across both user interfaces.
  2. Create Prompt
    1. On the navigation menu, choose Create Prompt.
    2. Enter a unique name for the prompt
    3. Enter a valid description
    4. Enter the Amazon S3 URI for the prompt (Amazon S3 Location from where the prompt should be imported into the Amazon Connect instance)
    5. Choose Create Prompt. Results display the new prompt in the table along with updated JSON output.
    6. Verify the newly created prompt on the Amazon Connect console.
  3. Update Prompt
    1. In the center panel, select the prompt file name for the prompt to be updated.
    2. On the navigation menu, choose Update Prompt.
    3. The Update Prompt pop-up window pre-fills the name and description.
    4. Modify the values and click on Update Prompt on this window. In this example, you can see the description is updated with a new value.
    5. Verify the updated prompt description on the Amazon Connect console.
  4. Describe Prompt
    1. In the center panel, select the prompt file name.
    2. On the navigation panel, choose Describe Prompt.
    3. The right panel (Prompt ARN, Id, Name, Description and Tags) shows the updated description from the earlier Update Prompt API action.
  5. Get Prompt File
    1. Select the prompt you would like to listen to, or download by clicking on the prompt file name in the center panel.
    2. Click on the Get Prompt File button on the navigation pane.
    3. The right panel shows the API response with the prompt specific presigned URL.
    4. Prompt file plays in a new tab.
  6. Delete Prompt
    1. Select the prompt you would like to delete by clicking on the prompt file name in the center panel
    2. Click on the Delete Prompt button on the left panel
    3. Click on Yes to confirm deletion of the prompt.
    4. Once the prompt is deleted, you will see an updated list of prompts on the table (center panel) and JSON Output (Right Panel)

Clean up

To avoid incurring future charges, remove all the contents in the Amazon S3 bucket that you created as part of this blog. Empty the Amazon S3 bucket, then delete the bucket. You can remove all other created resources by deleting the AWS CloudFormation stack.


This blog post demonstrated how the newly launched Amazon Connect Prompts API operations can be used to programmatically manage prompts using a web UI example. Customers can now use API operations to extract prompts stored within Amazon Connect and back them up in an Amazon S3 bucket. They can programmatically swap out existing audio files, for example if they hire a new celebrity for recorded greetings. Prompts change logs are stored and presented to customers within the admin website. The prompts API operations support AWS CloudTrail, AWS CloudFormation and tagging.

Related links

To learn more about the technologies or features used to create this solution, see the following: