Connecting data sources to an Amazon Q Business application - Amazon Q Business

Connecting data sources to an Amazon Q Business application

After you select a retriever for your Amazon Q Business application environment, you connect data sources to it. Available data sources vary based on your choice of the retriever.

If you use an Amazon Q Business retriever, you can choose from the following options:

  • Connect to any Amazon Q Business supported data source connectors by using the CreateDataSource API operation.

  • Upload documents directly by using the BatchPutDocument API operation.

If you use an existing Amazon Kendra retriever, only data sources already connected to your Amazon Kendra index are available in your application environment.

To connect data sources, choose a topic based on your data source preference for your Amazon Q Business application environment

Topics

Upload documents

To upload documents directly to an Amazon Q Business application environment, you can use the AWS Management Console or the BatchPutDocument API operation.

If you use an Amazon Kendra index to retrieve your documents, you can't directly upload documents.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

Console

To upload documents

Note

This procedure is available if you chose the Use native retriever option to configure your application environment.

  1. Sign in to the AWS Management Console and open the Amazon Q Business console.

  2. Complete the steps to create your Amazon Q Business application.

  3. Complete the steps for selecting an Amazon Q Business retriever.

  4. Then, for Upload documents, select one of the following methods to add your files:

    • Drag and drop the document files that you want to upload.

    • Add your documents to the application environment, and then select Choose files.

  5. After choosing your files, choose Upload.

    You are returned to the Amazon Q Business console while your documents are uploaded. The console displays a confirmation message when your documents are successfully uploaded.

Note

Files can only be uploaded after the Amazon Q Business retriever and index creation process has completed.

AWS CLI

To upload documents directly

aws qbusiness batch-put-document \ --application-id application-id \ --index-id index-id \ --documents documents-to-add \ --data-source-sync-id data-source-sync-id \ --role-arn roleArn

Connecting an Amazon Kendra retriever to an Amazon Q Business application

To use an Amazon Kendra index as a retriever for Amazon Q Business, you must have already configured an Amazon Kendra index and connected it with data. For more information, see What is Amazon Kendra? and Are you a first-time Amazon Kendra user? in the Amazon Kendra Developer Guide.

To add an existing Amazon Kendra retriever to your Amazon Q Business application environment, you can use the AWS Management Console or the CreateRetriever API operation. If you use the console, selecting and connecting an Amazon Kendra retriever is a two-step process. The first step is when you select an Amazon Kendra retriever. In this topic, you perform the second step—connecting an Amazon Kendra retriever.

If you use the API, you create your web experience after connecting your Amazon Kendra retriever using the CreateWebExperience API operation. If you use the console, connecting your Amazon Kendra retriever also automatically creates your Amazon Q Business web experience. At the end of the retriever connection process, your Amazon Kendra powered Amazon Q Business web experience is ready to be previewed, enhanced, and deployed.

Note

If you select an Amazon Kendra retriever, data in your Amazon Kendra is connected to your Amazon Q Business application environment.

Console

To connect an Amazon Kendra retriever

  1. Sign in to the AWS Management Console and open the Amazon Q Business console.

  2. Complete the steps to create your Amazon Q Business application.

  3. Complete the steps for selecting an Amazon Kendra retriever.

  4. Then, in Content sources, for Amazon Kendra indexes – Choose the Amazon Kendra index that you want to use for your Amazon Q Business application environment. Then, enter the following information:

    • Service access – Provide the IAM access role to connect Amazon Kendra to Amazon Q Business. Use an existing role, or create a new one.

    • Service role name – Provide a name for your IAM access role. Or, choose to use the auto-generated role that's provided.

  5. To connect your Amazon Kendra indexes to the application environment, choose Create application.

You are returned to the Amazon Q Business console while your web application environmentis created.

AWS CLI

To create and connect an Amazon Kendra retriever

aws qbusiness create-retriever \ --application-id application-id \ --display-name display-name \ --type KENDRA_INDEX \ --role-arn roleArn \ --configuration kendraIndexConfiguration="{indexId=<kendra-index-id>}"
Note

For information on managing your Amazon Kendra retriever, see Managing Amazon Kendra retrievers.

Amazon Q Business data sources

To connect a data source to your Amazon Q Business application environment, you can use the AWS Management Console or the CreateDataSource API operation.

By using the CreateDataSource API operation, you can configure tags, sync run schedules, and configure Amazon VPC settings. Then, you can use the configuration parameter to provide all other configuration information specific to your data source connector.

If you use the console, creating the data source and configuring it are a single step. After your data source is successfully configured and added, Amazon Q automatically creates a Amazon Q Business web experience for you.

If you use the API, you use the CreateWebExperience API operation after connecting your data sources to create your web experience.

Note

This procedure is available if you chose the Use native retriever option to configure your application environment.

Console

To connect a data source to an Amazon Q application

  1. Sign in to the AWS Management Console and open the Amazon Q Business console.

  2. Complete the steps to create your Amazon Q Business application.

  3. Complete the steps for selecting an Amazon Q Business retriever.

  4. Then, from Data sources – Add an available data source to connect your Amazon Q Business application environment.

    You can add up to 50 data sources.

  5. For information on configuring your chosen data source, see Supported connectors to find configuration information specific to your data source.

  6. To connect your configured data source to your application environment, choose Add data sources.

At the end of this step, your Amazon Q Business web experience is ready to be previewed, enhanced, and deployed.

AWS CLI

To connect a data source

aws qbusiness create-data-source \ --application-id application-id \ --index-id index-id \ --configuration data-source-configuration-details \ --display-name display-name \ --role-arn roleArn \ --description description \ --document-enrichment-configuration document-enrichment-configuration \ --sync-schedule sync-schedule-information \ --tags tags \ --vpc-configuration vpc-configuration