Generative AI presents many advantages for each you, as a software program supplier, and your end-users. AI assistants can assist customers generate insights, get assist, and discover info that could be exhausting to floor utilizing conventional means. As well as, they can assist your workers cut back repetitive duties and deal with high-value work. Nonetheless, including generative AI assistants to your web site or internet software requires vital area information and the technical experience to construct, deploy, and keep the infrastructure and end-user expertise. These challenges fall outdoors of some software program suppliers’ core area, creating boundaries to providing AI assistants to customers.
Amazon Q Enterprise is a generative AI assistant that may reply questions, present summaries, generate content material, and securely full duties based mostly on information and data in your enterprise programs. Amazon Q Enterprise securely unites disparate information with over 40 built-in connectors to fashionable enterprise purposes, doc repositories, chat purposes, and information administration programs. You should use pure language to request info or help to generate content material. Amazon Q Enterprise handles the complexity of deploying and sustaining the infrastructure required for generative AI assistants so you possibly can deal with creating a pleasant end-user expertise.
Amazon Q embedded is a characteristic that permits you to embed a hosted Amazon Q Enterprise assistant in your web site or software to create extra customized experiences that increase end-users’ productiveness. You’ll be able to configure the assistant with guardrails to outline international and topic-level controls on your surroundings. With an embedded Amazon Q Enterprise assistant, end-users can obtain rapid, permission-aware responses out of your information sources, with citations.
On this publish, we exhibit the way to use the Amazon Q embedded characteristic so as to add an Amazon Q Enterprise assistant to your web site or internet software utilizing primary HTML or React. We additionally present you the way to use the characteristic with content material administration programs like WordPress and Drupal. This publish features a pattern webpage for Amazon Q Enterprise that permits you to rapidly take a look at and exhibit your AI assistant. This lets you develop the modifications in your web site or software in parallel whereas refining your Amazon Q Enterprise configurations.
Resolution overview
Embedding Amazon Q Enterprise offers your customers entry to a generative AI assistant with out leaving your web site or internet software. Integrating the assistant includes creating an Amazon Q Enterprise software, including customers or teams, connecting related information sources, allowlisting your area, and eventually including an HTML inline body (iframe) aspect to your web site or internet software.
Conditions
On this part, we stroll by the way to arrange an Amazon Q Enterprise software, permissions, and person entry.
Amazon Q Enterprise software
The Amazon Q embedded characteristic requires an Amazon Q Enterprise software. If you happen to don’t have an current software, you possibly can create an software built-in with AWS IAM Id Heart or AWS Id and Entry Administration (IAM) id federation. Consult with Configuring an Amazon Q Enterprise software utilizing AWS IAM Id Heart, or Creating an Amazon Q Enterprise software utilizing Id Federation by IAM if it’s essential make a brand new software.
Permissions
Configuring the Amazon Q embedded characteristic IAM permissions that mean you can use and handle Amazon Q Enterprise. Your permission coverage should at the very least permit the Amazon Q Enterprise CreateWebExperience and UpdateWebExperience actions:
When creating the IAM permission coverage, the IAM Visible coverage creator is an effective way to see the choices accessible. Utilizing the least privileged entry strategy, you possibly can limit the useful resource during which the permission grants entry to a particular AWS Area, account ID, software ID, and internet expertise ID.
You will discover your software ID on the Amazon Q Enterprise console below Utility settings or from the list-applications command within the AWS Command Line Interface (AWS CLI). You will discover your internet expertise ID with the list-web-experiences AWS CLI command. For instance:
Consumer entry
Amazon Q Enterprise requires authentication earlier than customers can have interaction with the assistant. If you happen to use AWS IAM Id Heart, you possibly can grant customers entry to the assistant by including the customers or teams to your Amazon Q Enterprise software. If you happen to use IAM id federation, Amazon Q Enterprise mechanically subscribes customers to the subscription kind you choose whenever you create the appliance. For extra info on managing customers, seek advice from Managing person subscriptions for IAM Id Heart-integrated purposes, or see Updating and cancelling person subscriptions for purposes utilizing IAM Federation.
Allowlisting your web site or internet software
To embed Amazon Q Enterprise in your web site or internet software, you will need to first allowlist your area. This restricts your assistant to solely websites you belief and stops others from embedding your assistant. You’ll be able to add a number of domains for various providers or growth cases used for testing. Full the next steps:
- Open the Amazon Q Enterprise console.
- Subsequent, choose your Amazon Q Enterprise software.
- From the menu, select Amazon Q embedded below the Enhancements part, then select Add allowed web site.
- For Enter web site URL, enter the bottom URL of the web site or internet software you wish to allowlist for Amazon Q Enterprise, for instance
https://www.instance.com(trailing / not required), and select Add.
Amazon Q Enterprise hosts the net expertise on an AWS area. To search out the URL, navigate to the primary web page of your Amazon Q Enterprise software and replica the worth for Deployed URL, for instance https://1234abcdef5678.chat.qbusiness.instance.on.aws/, within the Internet expertise settings part. Now you possibly can embed this assistant into the web site or internet software hosted on the area you allowlisted.
Customizing the person expertise
You’ll be able to customise the person expertise feel and look on your group. Customization choices embrace the assistant title, subtitle, welcome message, font, colour, and brand. You may as well allow pattern prompts. Consult with Customizing an Amazon Q Enterprise internet expertise to see the accessible customization choices.
The next screenshots present the default Amazon Q Enterprise person expertise (left) and an Amazon Q Enterprise person expertise with a customized title, subtitle, and welcome message (proper).
![]() |
![]() |
Add Amazon Q Enterprise to your web site or internet software
Earlier than persevering with, be sure you have allowlisted your area as described earlier on this publish.
You’ll be able to select from the next embedding choices:
- Utilizing an HTML iframe aspect
- Utilizing a React element
- Utilizing a content material administration system
Embed Amazon Q Enterprise utilizing an HTML iframe aspect
You’ll be able to embed Amazon Q Enterprise in your web site or internet software utilizing an iframe aspect, which is an HTML aspect that you should use to insert one other HTML web page into the present one. Different embedding choices construct upon this foundational HTML aspect. The next is a pattern iframe aspect:
You’ll be able to customise the iframe aspect with numerous attributes such because the width, top, and title. Setting the Amazon Q Enterprise deployed URL as the worth for the src attribute will show the Amazon Q Enterprise internet expertise throughout the iframe. The next code reveals an instance iframe aspect with the id, title, width, top, and src attributes set to instance values:
Consult with <iframe>: The Inline Frame element to be taught extra concerning the iframe aspect.
Embed Amazon Q Enterprise utilizing a React element
You’ll be able to embed Amazon Q Enterprise in your web site or internet software utilizing a React element. React parts provide extra customizations and modularity than a regular iframe. On this publish, we’ve included a pattern React element that wraps an iframe aspect and provides skills similar to an increasing and collapsing chat interface and exhibiting a loading spinner when the web page first masses.
To make use of this React element, obtain the pattern code from the Embed GenAI chat into React GitHub repo and add it to your React supply code. Then you possibly can import the element into your web site or internet software and add the Chat aspect with at the very least the embedUrl attribute set to the deployed URL of your Amazon Q Enterprise software. The next instance code reveals the choices of the pattern React element:
Embed Amazon Q Enterprise utilizing a content material administration system
You’ll be able to embed Amazon Q Enterprise on a web site printed by a content material administration system that permits you to add HTML parts to the content material. We’ve included examples for WordPress and Drupal, each of which you’ll be able to deploy with Amazon Lightsail.
Embedding on a WordPress website
To embed Amazon Q Enterprise in your WordPress website, first entry the WordPress admin web page. Optionally, add a block group wrapper to constrain iframe sizing with the values of your selecting. For instance, you could possibly set the structure content material top to 650px, width to 620px, a width of 100% within the iframe to fill the container, and choose a full-size block merchandise. Lastly, add a customized HTML block and insert the iframe code. The next code is a pattern iframe aspect:
The next screenshot reveals an instance of including a block to a WordPress website.

The next screenshot reveals an instance of including an iframe to the block.

The next screenshot reveals an instance of Amazon Q Enterprise in a WordPress website.

Embedding on a Drupal website
To embed Amazon Q Enterprise in your Drupal website, full the next steps:
- Open the Drupal admin web page.
- Select Content material, Blocks, and Add content material block.
- Give your content material block an outline and alter the textual content format to HTML.
- Select the Supply
- Add your iframe to the Physique part of the block, then select Save and configure.

- When configuring your content material block, the visibility choices are non-compulsory and may be left with the default values.
- Select a Area to show this block, similar to Content material Above or Sidebar, then select Save block.

The next screenshot reveals an instance of Amazon Q Enterprise embedded with the Content material Above possibility.

The next screenshot reveals an instance of Amazon Q Enterprise embedded with the Sidebar possibility.

Pattern web site
That can assist you get began embedding Amazon Q Enterprise, we now have included a pattern web site which you can deploy on AWS Amplify with an AWS CloudFormation stack. The pattern web site incorporates an HTML iframe aspect along with your Amazon Q Enterprise assistant. To make use of the web site, full the next steps:
- First acquire your Amazon Q Enterprise software ID and make an observation. You will discover your software ID on the Amazon Q Enterprise console as described earlier on this publish.
- Obtain our YAML sample CloudFormation template to your workstation.
- Deploy the stack both utilizing the AWS CloudFormation console or utilizing the AWS CLI.


- After importing the pattern CloudFormation template, enter a stack identify, an internet web page identify, and your Amazon Q Enterprise software ID within the Utility ID enter subject.
- You’ll be able to depart all different settings at their default values.

- After the stack absolutely deploys, navigate to the Outputs tab on the AWS CloudFormation console and replica the Amplify URL.

- Return to the Amazon Q Enterprise console, choose your Amazon Q Enterprise software, and select Amazon Q Embedded so as to add your Amplify URL to the Allowed web sites record as described earlier on this publish.
- Navigate to your Amplify URL in your internet browser to see your pattern web site with Amazon Q Enterprise. Chances are you’ll have to Check in to Q Enterprise.

Clear Up
To keep away from future prices in your account from Amplify you possibly can delete the sources you created within the earlier part walkthrough on making a pattern web site.
- On the CloudFormation console, within the navigation pane, select Stacks.
- Choose the stack you launched within the earlier step, then select Delete.
Conclusion
On this publish, we confirmed you numerous strategies of embedding Amazon Q Enterprise, which permits customers to have pure language conversations and get significant help straight in your web site or internet software. We mentioned creating an Amazon Q Enterprise software and the way to allowlist your URL. We then walked by including Amazon Q Enterprise with a regular HTML iframe, a React element, and the way to replace a WordPress or Drupal website.
To get began, seek advice from Getting began with Amazon Q Enterprise to create an Amazon Q Enterprise software. For extra info on the Amazon Q embedded characteristic, see Amazon Q embedded. Consult with Enhancing an Amazon Q Enterprise software surroundings for steering on integrating your information sources, which might embrace your web site content material, to counterpoint the solutions Amazon Q Enterprise can present your web site or internet software customers.
Concerning the authors
Bobby Williams is a Senior Options Architect at AWS. He has a long time of expertise designing, constructing, and supporting enterprise software program options that scale globally. He works on options throughout trade verticals and horizontals and is pushed to create a pleasant expertise for each buyer.
David Girling is a Senior AI/ML Options Architect with over 20 years of expertise in designing, main, and creating enterprise programs. David is a part of a specialist staff that focuses on serving to clients be taught, innovate, and make the most of these extremely succesful providers with their information for his or her use circumstances.
Philip Whiteside is a Options Architect (SA) at Amazon Internet Companies. Philip is keen about overcoming boundaries by using expertise.



