Skip to content

Provision Connect Chat Widget using Cloudformation or other tools?

0

is there a workaround to create an amazon connect communication widget using cloudformation or other tools? I was looking at the Cloudformation resource and property reference for ChatWidget but there is none. How can I work around it? EDIT: I already have an existing amazon connect instance and a contact flow that uses Amazon Q, I want my provisioned chat widget to connect to this instance/flow

2 Answers
0

Currently, there isn't a direct CloudFormation resource for creating Amazon Connect communication widgets. However, you can use a combination of approaches to automate the creation and deployment of chat widgets:

  1. Use the Amazon Connect open source library on GitHub, which provides a CloudFormation template that sets up an Amazon API Gateway endpoint and initiates a Lambda function. This template can serve as a starting point for your implementation.

  2. After creating the CloudFormation stack, you can call the API from your application, import the pre-built communications widget, and pass the response to start chatting.

  3. For a more programmatic approach, you could create a custom resource in CloudFormation that uses Lambda to interact with the Amazon Connect API to create and configure the chat widget.

  4. Alternatively, you could use infrastructure as code tools like AWS CDK or Terraform, which might provide more flexibility for creating custom resources that interact with the Amazon Connect APIs.

  5. You could also script the creation of the communication widget using AWS CLI or SDK calls as part of your deployment pipeline, and then store the generated widget code in a central location for your applications to access.

When implementing any of these approaches, remember that you'll need to handle the customization options for the widget, such as styling, pre-chat forms, and text formatting capabilities. For example, to enable rich text formatting, you would need to include the appropriate code in your widget configuration.
Sources
Customize chat with the Amazon Connect open source example - Amazon Connect
Add a chat user interface to your website hosted by Amazon Connect - Amazon Connect
Enable text formatting in Amazon Connect for your customer's chat experience - Amazon Connect

answered 2 months ago
0

Currently, there is no direct CloudFormation resource type for creating an Amazon Connect chat widget. However, there are some workarounds you can consider:

Using AWS SDK/API:

  • You can use the CreateContactFlowAsync API to create the contact flow
  • Use StartChatContact API to initiate chats
  • Implement the widget using the Amazon Connect Chat JS library

Alternatively, you can use CloudFormation for creating the base resources (Instance, Contact Flows, etc.) and then create a Custom Resource in CloudFormation that uses Lambda to:

  • Configure the chat widget settings
  • Generate and store the widget configuration
  • Return the widget URL and credentials

The Lambda function would use the AWS SDK to configure the chat widget settings and then return the configuration details as CloudFormation outputs.

AWS
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.