Amazon Q in Connect features a native Integration with Amazon S3. Please refer to the Amazon Connect Admin Guide: https://docs.aws.amazon.com/connect/latest/adminguide/enable-q.html to enable Amazon Q in Connect and Integrate with Amazon S3.
This repository is sample code to migrate customers away from using the deprecated amazon-connect-wisdom-s3-sync deployments.
Table of Contents
- Amazon Q in Connect - S3 Integration Template
- Description
- Tenets
- Key Features
- Project Status
- Architecture
- Authors
- Contributing
- Security
- License
- Amazon Q in Connect Resources
- Additional Resources
- Getting Started
Amazon Q in Connect, an evolution of Amazon Connect Wisdom, uses generative AI to deliver agents suggested responses and actions to address customer questions, providing faster issue resolution and improved customer satisfaction. Knowledge articles, wikis, and FAQs can be spread across separate repositories. Agents waste time trying to navigate these different sources of information while the customer waits for an answer. Amazon Q in Connect uses the real-time conversation with the customer, along with relevant company content, to automatically recommend what to say or what actions an agent should take to better assist customers. With Amazon Q, agents can also use natural language to search across connected knowledge sources to receive generated responses, recommended actions, and links to more information.
Amazon Q in Connect - S3 Integration Template enables customers to quickly deploy all of necessary resources to create an Amazon Q in Connect Knowledge Base using Amazon S3 as its data source. Contact center administrators can easily create, update, and remove knowledge content (TXT/HTML/PDF/DOCX) using familiar Amazon S3 object actions.
The following tenets guide the development of Amazon Q in Connect - S3 Integration Template:
- Accelerate Customer Adoption: Reduce the friction in adopting Amazon Q in Connect; automating the deployment and configuration of the capability, all deployed with a single AWS CloudFormation template.
- Composable and Reusable: Ensure the deployment artifacts are composed of unit-tested "building blocks" that can be easily understood and reused by customers.
- Best Practices: Leverage software and security best practices throughout the solution, limit external dependencies, handle failures, and ensure least privilege permissions.
This project features a single CloudFormation template that will deploy Amazon Connect Q in Connect configured with an Amazon S3-backed knowledge base.
This deployment will deploy and configure the following resources:
- An Amazon S3 Bucket - Store and Manage Knowledge base Content
- Amazon Q in Connect - Domain/Assistant, KnowledgeBase, Assistant Association
- AWS AppIntegrations:DataIntegration between the KnowledgeBase and Amazon S3.
- An AWS KMS Key (CMK) to encrypt Amazon Q in Connect knowledge base content
- Amazon Connect Contact Flow pre-configured with Contact Lens for Amazon Connect and Amazon Q in Connect
Open Source Release
Main Template (v2024-03-21) Amazon Q in Connect - S3 Integration Template
- Section 1: Amazon Q in Connect Constructs and Integration 1-amazon-qic-integration
- Section 2: Amazon Q in Connect (Agent Assist) Contact Flow 2-amazon-q-connect-contact-flow
Taylan Unal, Specialist Solutions Architect - CXE
Please see CONTRIBUTING.md
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.
- Agent Empowerment Suite on Amazon Connect - Amazon Q in Connect
- Amazon Q in Connect - Admin Guide
- Amazon Q in Connect - API Reference
- Amazon Q Connect JS - SDK
- Amazon Q in Connect - Service Quotas
- Amazon Q in Connect - AWS Region Availability
- DEPRECATED - Amazon Connect Wisdom S3 Sync
- Github - Amazon Connect Wisdom API Snippet (NodeJS) - Resources to complete the Amazon Connect Wisdom API blog
- AWS Blog - Ingesting content to power real-time recommendations and search with Amazon Connect Wisdom - Use the AWS CLI to create Amazon Connect Wisdom Constructs, Integrations, Query an Amazon S3 Knowledge Base
The following instructions will detail deploying the amazon-q-in-connect-s3-integration-template.yaml
template onto your AWS Account.
NOTE: For more detailed, step-by-step guidance, please visit: Enabling Amazon Q in Connect
- An AWS Account
- An AWS User with AdministratorAccess IAM Policy attached.
- An existing Amazon Connect Instance deployed in an AWS Region where Amazon Q in Connect is available.
- Familiarity with the AWS Management Console, AWS CloudFormation, and Amazon Connect
This Deployment WILL NOT:
- Delete any existing Amazon Connect Wisdom/Amazon Q in Connect Resources (Assistants, Knowledge Bases, Assistant Associations) that were not created by this template.
- Delete the Amazon S3 Bucket created by this deployment, or any of the files uploaded to it.
- Amazon Q in Connect - Amazon Q in Connect Assistant, Amazon Q in Connect Knowledge Base, Assistant Association (Assistant-Knowledge Base)
- Verify that you are not exceeding any of your Amazon Q in Connect Service Quotas
- Amazon S3 Bucket, used to store and manage knowledge base content used by Amazon Q in Connect.
- Amazon AppIntegrations - DataIntegration, handles the synchronization of objects stored in the Amazon S3 bucket with Amazon Q in Connect.
- AWS Lambda** - An AWS Lambda function that will integrate Amazon Q in Connect Constructs (WISDOM_ASSISTANT and WISDOM_KNOWLEDGE_BASE) with the provided Amazon Connect instance using the Connect CreateIntegrationAssociation API.
- Amazon Connect Contact Flow - An Amazon Connect Contact Flow preconfigured with Contact Lens for Amazon Connect and Amazon Q in Connect to start testing Amazon Connect's Real-time Agent Assist capabilities.
In this section, we will deploy an AWS CloudFormation template that will create Amazon Connect Wisdom constructs, integrate those Wisdom resources with an Amazon Connect Instance, and deploy the required artifacts to use Amazon S3 as a knowledge base for Amazon Connect Wisdom.
Step 1: Download the Amazon Q in Connect S3 Sync
CloudFormation Template
Navigate to the repository root directory, and open the amazon-q-in-connect-s3-integration-template.yaml
file and download the file to your local machine.
Step 2: Navigate to AWS CloudFormation Navigate to AWS CloudFormation on your AWS Management Console (Ex. https://us-east-1.console.aws.amazon.com/cloudformation/)
Step 3: Create a CloudFormation Stack
- On the AWS CloudFormation Landing page, select
Create Stack
- Prerequisite - Prepare template - In this section, choose
Template is ready
- Specify template - choose
Upload a template file
and select theChoose file
button to upload a CloudFormation template from your local machine.- Upload the template for this deployment that you've downloaded, or download the CloudFormation template now here
- To accept your settings, choose
Next
to proceed to theSpecify stack details
page.
Step 4: Specify Stack Details In this section, we'll specify the After selecting a stack template, specify the stack name and values for the parameters that were defined in the deployment template.
Stack Name
: Choose a stack name like:amazon-qic-s3-integration
oramazon-q-in-connect-workshop
- The stack name is an identifier that helps you find a particular stack from a list of stacks. A stack name can contain only alphanumeric characters (case-sensitive) and hyphens. It must start with an alphabetic character and can't be longer than 128 characters.
AmazonConnectInstanceARN
: Enter your Amazon Connect Instance ARN - Find your Amazon Connect instance ID/ARN- For the best results, specify an Amazon Connect Instance without an existing Wisdom Deployment
S3BucketName
: Provide a globally unique name for a new Amazon S3 Bucket, which will be used to store knowledge content for Amazon Q in Connect.- Do not enter an existing S3 bucket. This process will create a new one in the account, and will require you to retry the process if a S3 bucket with this name already exists.
- We recommend making this value unique, such as
s3-amazon-q-in-connect-bucket
as long as the name is less than 63 characters and all lowercase. You can find all the S3 bucket naming rules here.
After configuring your Stack name and parameters, click the Next
button to continue.
Step 5: Configure stack options
Leave all options on the Step 3 - Configure stack options
page as defaults, scroll to the bottom of the page, and click the Next
button to continue.
Step 6: Review The review page is the final step before your stack is deployed, please review the parameter values you entered in the previous steps.
- If you need to change any of the values before launching the stack, choose Edit on the appropriate section to go back to the page that has the setting that you want to change.
- After you review the stack creation settings, choose
Create stack
to launch your stack.
NOTE: This AWS CloudFormation deployment should take less than 5 minutes to complete.
- Once the stack was successfully deployed, you will see the stack status change to CREATE_COMPLETE.
After the stack has deployed successfully, we will upload the sample password-reset.html
file into the Amazon S3 Bucket that was created as a part of this deployment.
After the AWS CloudFormation Stack from the previous section has successfully deployed, you can manage knowledge content by (Creating, Updating, Deleting) Knowledge content files (HTML/PDF/DOCX) files on the S3 Bucket created by the deployment.
-
Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/
-
From the list of Amazon S3 Buckets, you should see new Amazon S3 bucket created by the CloudFormation template. Select the bucket name to open it.
-
Download the following sample file:password-reset.html to upload into your Amazon S3 bucket. . This HTML file is from the Amazon Connect Admin Guide (https://docs.aws.amazon.com/connect/latest/adminguide/password-reset.html), and provides guidance on how to reset an Amazon Connect user's password.
-
Drag and drop the
password-reset.html
file into your Amazon S3 bucket. Select Upload at the bottom of the screen. -
You will see a green banner showing Upload succeeded. Select close.
NOTE: Make sure that your Amazon Connect User has the appropriate Security Profile permission:
Agent Applications -> Amazon Q in Connect -> View
to access to Amazon Q in Connect on the Agent Workspace. Admin Guide - Update security profiles
Now that you have deployed Amazon Q in Connect and uploaded your first knowledgebase file, it's time to test Amazon Q in Connect and it's real-time agent assist capabilities.
NOTE The following steps will detail testing Amazon Q in Connect with a Chat Contact, but note that all of the same functionality is available for Voice contacts.
Review Contact Flow
- Navigate to Amazon Connect Console
- Using the navigation bar on the left side of your screen, Navigate to Flows, review the Contact Flow called
RealtimeAgentAssistFlow-abc123
- Note that the QueueARN for
BasicQueue
and your Amazon Q in ConnectAssistantARN
have been pre-defined within the Contact Flow.
Test Chat:
- Navigate to "Test Chat" "https://[INSTANCENAME].my.connect.aws/test-chat"
- Click on Test Settings
- Select the Contact Flow named
RealtimeAgentAssistFlow-abc123
- An Amazon Connect Chat widget will appear and initiate a contact that will be routed to the default "BasicQueue" defined on your Amazon Connect Instance.
Agent Workspace:
- Navigate to the Amazon Connect Agent Application to Access Amazon Q in Connect. You can launch the agent application from the top right-hand corner of the Amazon Connect console by selecting "Agent application" or by using the URL below.
https://instancename.my.connect.aws/agent-app-v2/
- Once you have reached the Amazon Connect Agent Workspace, to recieve the Chat contact initiated in the previous step, Set your status to Available in the top left corner of the Agent Workspace.
- Accept the incoming Chat contact.
Testing Realtime Agent Assist:
Reference: Use real-time recommendations from Amazon Q in Connect
- Navigate back to the Chat Widget that you had opened earlier.
- As the "Customer", ask questions related to the
password-reset
document, likeCan you help me reset my password?
orI need to reset my password
- Within seconds, Amazon Q in Connect will display: the detected issue,the Generative AI-powered response, generated solution, and References to relevant knowledge content.
- Click on
password-reset
to open the document within the Agent Workspace as a new tab.
Testing Manual Agent Assist:
- Within the Amazon Connect Agent Workspace, click on the the "Amazon Q in Connect" search bar on the top right corner of the page.
- Search for terms related to the knowledge article you uploaded, like "password reset".
- Within seconds, Amazon Q in Connect will display a Generative AI-powered Solution and References to relevant knowledge content based on the query.
- Within the References section, you should see the
password-reset
document that you uploaded earlier in this guide. - Click on
password-reset
to open the document within the Agent Workspace as a new tab.
Congratulations! You have successfully deployed and tested Amazon Q in Connect's Realtime Agent Assist capabilities.
You have successfully deployed Amazon Q in Connect on your Amazon Connect instance, uploaded knowledge content to your Amazon S3 KnowledgeBase, and tested Amazon Q in Connect's Real-time Agent Assist capabilities!