Use Amazon Q to seek out solutions on Google Drive in an enterprise


Amazon Q Business is a generative AI-powered assistant designed to boost enterprise operations. It’s a completely managed service that helps present correct solutions to customers’ questions whereas adhering to the safety and entry restrictions of the content material. You possibly can tailor Amazon Q Enterprise to your particular enterprise wants by connecting to your organization’s info and enterprise methods utilizing built-in connectors to a wide range of enterprise knowledge sources. It permits customers in varied roles, corresponding to advertising managers, undertaking managers, and gross sales representatives, to have tailor-made conversations, remedy enterprise issues, generate content material, take motion, and extra, by way of an internet interface. This service goals to assist make workers work smarter, transfer sooner, and drive important impression by offering instant and related info to assist them with their duties.

One such enterprise knowledge repository you should utilize to retailer and handle content material is Google Drive. Google Drive is a cloud-based storage service that gives a centralized location for storing digital belongings, together with paperwork, data articles, and spreadsheets. This service helps your groups collaborate successfully by enabling the sharing and group of necessary information throughout the enterprise. To make use of Google Drive inside Amazon Q Enterprise, you possibly can configure the Amazon Q Business Google Drive connector. This connector permits Amazon Q Enterprise to securely index information saved in Google Drive utilizing access control lists (ACLs). These ACLs guarantee that customers solely entry the paperwork they’re permitted to view, permitting them to ask questions and retrieve info related to their work straight by way of Amazon Q Enterprise.

This publish covers the steps to configure the Amazon Q Enterprise Google Drive connector, together with authentication setup and verifying the safe indexing of your Google Drive content material.

Index Google Drive paperwork utilizing the Amazon Q Google Drive connector

The Amazon Q Google Drive connector can index Google Drive paperwork hosted in a Google Workspace account. The connector can’t index paperwork saved on Google Drive in a private Google Gmail account. Amazon Q Enterprise can authenticate along with your Google Workspace utilizing a service account or OAuth 2.0 authentication. A service account permits indexing information for consumer accounts throughout an enterprise in a Google Workspace. Utilizing OAuth 2.0 authentication permits for crawling and indexing information in a single Google Workspace account. This publish exhibits you how you can configure Amazon Q Enterprise to authenticate utilizing a Google service account.

Google prescribes that as a way to index a number of customers’ paperwork, the crawler should help the aptitude to authenticate with a service account with domain-wide delegation. This enables the connector to index the paperwork of all customers in your drive and shared drives. Amazon Q Enterprise connectors solely crawl the paperwork that the Amazon Q Enterprise utility administrator specifies have to be crawled. Directors can specify the paths to crawl, particular file identify patterns, or varieties. Amazon Q Enterprise doesn’t use buyer knowledge to coach any fashions. All buyer knowledge is listed solely within the buyer account. Additionally, Amazon Q Enterprise Connectors will solely index content material specified by the administrator. It gained’t index any content material by itself with out explicitly being configured to take action by the administrator of Amazon Q Enterprise.

You possibly can configure the Amazon Q Google Drive connector to crawl and index file types supported by Amazon Q Enterprise. Google Write paperwork are exported as Microsoft Phrase and Google Sheet paperwork are exported as Microsoft Excel through the crawling section.

Metadata

Each doc has structural attributes—or metadata—connected to it. Doc attributes can embrace info corresponding to doc title, doc creator, time created, time up to date, and doc kind.

If you join Amazon Q Enterprise to a knowledge supply, it robotically maps particular knowledge supply document attributes to fields inside an Amazon Q Enterprise index. If a doc attribute in your knowledge supply doesn’t have an attribute mapping already obtainable, or if you wish to map further doc attributes to index fields, you should utilize the customized area mappings to specify how an information supply attribute maps to an Amazon Q Enterprise index area. You possibly can create area mappings by enhancing your knowledge supply after your utility and retriever are created.

There are 4 default metadata attributes listed for every Google Drive doc: authors, supply URL, creation date, and final replace date. You can even choose further reserved data field mappings.

Amazon Q Enterprise crawls Google Drive ACLs outlined in a Google Workspace for doc safety. Google Workspace customers and teams are mapped to the _user_id and _group_ids fields related to the Amazon Q Enterprise utility in AWS IAM Identity Center. These consumer and group associations are continued within the consumer retailer related to the Amazon Q Enterprise index created for crawled Google Drive paperwork.

Overview of ACLs in Amazon Q Enterprise

Within the context of data administration and generative AI chatbot purposes, an ACL performs an important function in managing who can entry info and what actions they will carry out throughout the system. In addition they facilitate data sharing inside particular teams or groups whereas limiting entry to others.

On this resolution, we deploy an Amazon Q internet expertise to reveal that two enterprise customers can solely ask questions on paperwork they’ve entry to based on the ACL. With the Amazon Q Enterprise Google Drive connector, the Google Workspace ACL shall be ingested with paperwork. This allows Amazon Q Enterprise to regulate the scope of paperwork that every consumer can entry within the Amazon Q internet expertise.

Authentication varieties

An Amazon Q Enterprise utility requires you to make use of IAM Id Heart to handle consumer entry. Though it’s really helpful to have an IAM Id Heart occasion configured (with customers federated and teams added) earlier than you begin, you may also select to create and configure an IAM Id Heart occasion to your Amazon Q Enterprise utility utilizing the Amazon Q console.

You can even add customers to your IAM Id Heart occasion from the Amazon Q Enterprise console, for those who aren’t federating id. If you add a brand new consumer, guarantee that the consumer is enabled in your IAM Id Heart occasion and that they’ve verified their e-mail ID. They should full these steps earlier than they will log in to your Amazon Q Enterprise internet expertise.

Your id supply in IAM Id Heart defines the place your customers and teams are managed. After you configure your id supply, you possibly can search for customers or teams to grant them single sign-on entry to AWS accounts, purposes, or each.

You possibly can have just one id supply per group in AWS Organizations. You possibly can select one of many following as your id supply:

Overview of resolution

With Amazon Q Enterprise, you possibly can configure a number of knowledge sources to offer a central place to look throughout your doc repository. For our resolution, we reveal how you can index Google Drive knowledge utilizing the Amazon Q Enterprise Google Drive connector. We full the next steps:

  1. Configure Google Workspace stipulations.
  2. Configure an Amazon Q Enterprise utility.
  3. Join Google Drive to Amazon Q Enterprise.
  4. Create customers and index the information within the Google Drive.
  5. Run a pattern question to check the answer.

Configure Google Workspace stipulations

For this resolution, Amazon Q will connect with a Google Workspace and crawl Google Drive paperwork owned by enterprise customers in several teams utilizing a service account. Full the next steps to configure your Google Workspace:

  1. Log in to the Google API console as an admin consumer.
  2. Select the dropdown menu subsequent to the search field, then select New Venture.
    Create New Google API Project
  3. Enter the undertaking identify, select the Google group, and select Create.
    Enter Google API Project Name

The Google Drive and Admin SDK APIs have to be enabled for Amazon Q to crawl Google Drive information.

  1. Seek for every API on the Google Cloud console and select Allow.
    Enable Google Drive and Admin SKD APIs
  2. Seek for Service Accounts to entry the IAM & Admin navigation pane and select Create Service Account.
  3. Enter the service account identify, service account ID, and outline, and select Performed.Create Google Workspace Service Account
  4. Select the e-mail of the service account created within the earlier step.
  5. On the Keys tab, select Add Key, then select Create New Key.
  6. For Key kind, choose JSON, and select Create to obtain and domestically save a brand new personal key.Create JSON Key for Service Account

Now we allow domain-wide delegation for the 5 required API scopes on the Domain-wide Delegation web page.

  1. Select Add new.
  2. Add the next comma delimited API scopes for consumer ID generated for the personal key created within the earlier step:
    https://www.googleapis.com/auth/drive.readonly,
    https://www.googleapis.com/auth/drive.metadata.readonly,
    https://www.googleapis.com/auth/admin.listing.group.readonly,
    https://www.googleapis.com/auth/admin.listing.consumer.readonly,
    https://www.googleapis.com/auth/cloud-platform
  3. Select Authorize.
    Authorize Google API Scopes

Now we create customers and add them to teams.

  1. Navigate to the Google Workspace Admin console and select Customers within the navigation pane.
  2. Select Add new consumer to create two new enterprise customers.
    Add New Google Workspace User
  3. Select Teams within the navigation pane.
  4. Select Create group to create two Google teams and add one enterprise consumer to every group.
    Add New Google Workspace group
  5. Add information that Amazon Q supports into every enterprise consumer’s Google Drive.

On this resolution, we add the Amazon 2020 annual report to the primary enterprise consumer’s Google Drive and add the Amazon 2021 annual report and Amazon 2022 annual report to the second enterprise consumer’s Google Drive.
Upload Amazon annual reports

The enterprise consumer that uploaded the Amazon 2021 annual report can even share it with the opposite enterprise consumer’s Google group.

  1. Select the choices menu (three vertical dots) for the Google Drive file and select Share.
  2. Enter the identify of the opposite Google group and select Ship.

Create an Amazon Q Enterprise utility with a Google Drive connector

An Amazon Q Enterprise utility must be created with a Google Drive connector to crawl and index Google Drive information. To create an Amazon Q utility, full the next steps:

  1. On the Amazon Q console, select Functions within the navigation pane.
  2. Select Create utility.
  3. For Software identify, enter a reputation.
  4. Depart utility configuration settings as defaults.
  5. Select Create.
    Create Q Business Application
  6. After the applying is created, select Information Sources.
  7. Then select Choose retriever and Verify to make use of a Native retriever and Enterprise provisioning.
    Confirm Q Business Application Retriever and Index Provisioning
  8. After confirming retriever settings, select Add knowledge supply, after which select the plus signal subsequent to Google Drive.
    Select Google Drive Data Source
  9. Underneath Title and outline, enter an information supply identify and non-obligatory description.
  10. Underneath Authentication, choose Google service account and select Create a brand new secret from the AWS Secrets and techniques Supervisor secret drop right down to create an AWS Secrets Manager secret.
    Configure Google Drive Data Source
  11. Enter a secret identify, admin account e-mail, consumer e-mail, and the JSON key you downloaded earlier, then select Save.
    Enter AWS Secrets Client Id and JSON Key
  12. Underneath IAM function, select Create a brand new service function.
  13. Underneath Further Configuration, select Person e-mail, and add the 2 lately created Google Workspace enterprise consumer e-mail addresses.
    Add Google Workspace User Email Addresses
  14. Underneath Sync run schedule, for Frequency, select Run on demand.
  15. Select Add knowledge supply.
    Specify Sync Schedule and Add Data Source

Create and handle customers

To create an Amazon Q internet expertise accessible by Google Workspace customers, it’s worthwhile to create corresponding customers in IAM Id Heart. Amazon Q purposes are solely accessible by IAM Id Heart customers with consumer identities that personal listed paperwork. To create the IAM Id Heart customers, full the next steps:

  1. On the IAM Id Heart console, select Customers within the navigation pane.
  2. Select Add consumer.
  3. Create IAM Id Heart customers that mirror your Google Workspace customers by coming into the required consumer info.
  4. Settle for the IAM Id Heart invitation despatched by way of e-mail to every new enterprise consumer and set every enterprise consumer’s IAM Id Heart password.
  5. On the Amazon Q Enterprise console, navigate to the applying with the Google Drive knowledge supply.
  6. Select Handle consumer entry.
  7. Select Add teams and customers, choose Assign present customers and teams, and select Subsequent.
    Add or Assign Users and Groups in Identity Center
  8. Assign customers to the Amazon Q utility, select Assign, and select Verify if every enterprise consumer is subscribed to Q Enterprise Professional.
    Add Users to Q Business Application

After you add IAM Id Heart customers to your Amazon Q utility, its internet expertise URL will seem within the Q Enterprise purposes listing. You need to use the URL to connect with the Amazon Q internet expertise with both of your Google enterprise customers. By default, every consumer can solely ask questions on paperwork of their Google Drive.

Run pattern queries in Amazon Q

To check the Amazon Q utility with the Amazon annual reviews you uploaded to Google Drive, full the next steps:

  1. On the Amazon Q Enterprise console, navigate to the information supply you created.
  2. Run an on-demand sync of the information supply by selecting Sync now.
    Run On-Demand Sync of Google Drive Data Source
  3. Navigate to the internet expertise URL in a brand new personal browser window and log in as the primary enterprise consumer.
    Amazon Q Identity Center Login
  4. Ask Amazon Q a query, corresponding to what number of workers work at Amazon.

The supply paperwork must be the Amazon 2020 and 2021 annual reviews, assuming the primary enterprise consumer uploaded the Amazon 2020 annual report and the second enterprise consumer shared the Amazon 2021 annual report with the primary enterprise consumer.
Amazon Q Conversational Interface

  1. Navigate to the online expertise URL in a brand new personal browser window and log in because the second enterprise consumer.
  2. Ask Amazon Q the identical query (what number of workers work at Amazon).

The supply paperwork must be the Amazon 2021 and 2022 annual reviews.

Troubleshooting

On this part, we share some frequent points and troubleshooting suggestions.

IAM Id Heart login error

You would possibly obtain an error on the IAM Id Heart login web page that claims “We couldn’t confirm your sign-in credentials.”
Amazon Q Identity Center Invalid Login

To troubleshoot, full the next steps:

  1. Verify that the enterprise customers that mirror the Google Workspace customers have been created in IAM Id Heart.
  2. If the customers exist, navigate to the consumer in IAM Id Heart and select Reset password, then choose Generate a one-time password and share the password with the consumer.

A password shall be supplied for login and the consumer shall be requested to alter their password after a profitable login.
Amazon Q Business Identity Center Password Reset

Google Drive knowledge supply crawling or indexing failure

If the Google Drive knowledge supply crawling or indexing fails, full the next steps:

  1. Verify the enterprise customers provisioned within the Google Workspace are members of the Google teams.
  2. Examine the Amazon CloudWatch logs for the final time the Google Drive knowledge supply was crawled for customers with Google Drive information within the Google Workspace.
  3. If the crawler didn’t efficiently log the indexing of an anticipated consumer’s information, examine the IAM Id Heart customers, then evaluate the attributes within the Secrets and techniques Supervisor secret to the corresponding Google Workspace attributes, together with consumer ID, service account e-mail, and repair account personal key.
  4. Use the Amazon Q Business document-level sync reports to verify the supposed Google Drive paperwork have been listed by Amazon Q.

Google Drive knowledge supply crawling and indexing job doesn’t crawl and index paperwork

If the Google Drive knowledge supply crawling and indexing job doesn’t crawl and index any paperwork, full the next steps:

  1. Verify the enterprise customers provisioned within the Google Workspace are members of the Google teams.
  2. Verify there are IAM Id Heart customers that mirror the Google Workspace customers.
  3. Verify each IAM Id Heart customers subscribe to Q Enterprise Professional.
  4. Verify the Google Workspace admin consumer has enabled the Google Drive API.

Amazon Q internet expertise doesn’t return anticipated solutions from the anticipated supply

If the Amazon Q internet expertise doesn’t return anticipated solutions from the anticipated supply, full the next steps:

  1. Add the anticipated supply doc into an Amazon Q Enterprise chat session by selecting the paperclip icon within the Amazon Q chat interface after which selecting the file.
    Amazon Q Conversational User Interface File Upload

After you add the doc into the session, if the anticipated solutions are generated from the anticipated doc, the doc wasn’t efficiently listed from the Google Drive knowledge supply.

  1. If Amazon Q doesn’t return the anticipated reply for the uploaded doc, modify the immediate used to ask the query.

Clear up

To stop incurring further prices, it’s important to wash up and take away any sources created through the implementation of this resolution. Particularly, you need to delete the Amazon Q utility, which can consequently take away the related index and knowledge connectors. Nonetheless, any Secrets and techniques Supervisor secrets and techniques created through the Amazon Q utility setup course of have to be eliminated individually. Failing to wash up these sources might lead to ongoing expenses, so it’s essential to take the required steps to fully take away all parts associated to this resolution.

Full the next steps to delete the Amazon Q utility, secret, and IAM Id Heart customers in your AWS account:

  1. On the Amazon Q Enterprise console, select Functions within the navigation pane.
  2. Choose the applying that you simply created and on the Actions menu, select Delete and ensure the deletion.
  3. On the Secrets and techniques Supervisor console, select Secrets and techniques within the navigation pane.
  4. Choose the key that was created for the Google Drive connector and on the Actions menu, select Delete.
  5. Specify the ready interval as 7 days and select Schedule deletion.
  6. On the IAM Id Heart console, select Customers within the navigation pane.
  7. Choose the 2 customers that you simply created and select Delete customers to take away these customers.

Moreover, you need to take away the enterprise customers added to your Google Workspace through the implementation of this resolution as a result of Google Workspaces prices are billed on a per-user foundation.

Conclusion

On this publish, you created an Amazon Q utility that listed Google Drive paperwork utilizing the Google Drive connector. You have been ready to connect with the Amazon Q conversational interface as every of your corporation customers and ask questions in regards to the paperwork every consumer may entry in accordance with the ACL.

You possibly can proceed to experiment by including extra PDF paperwork to your corporation customers’ Google Drives and re-syncing your Amazon Q Google Drive knowledge supply.

Amazon Q Enterprise gives different connectors, corresponding to for Confluence Cloud. To be taught extra in regards to the Amazon Q Enterprise Confluence Cloud connector, consult with Connecting Confluence (Cloud) to Amazon Q Business.


In regards to the Authors

Glen Eire is a Senior Enterprise Account Engineer at AWS within the Worldwide Public Sector. Glen’s areas of focus embrace empowering prospects keen on constructing generative AI options utilizing Amazon Q.

Julia Hu is a Specialist Options Architect who helps AWS prospects and companions construct generative AI options utilizing Amazon Q Enterprise on AWS. Julia has over 4 years of expertise creating options for purchasers adopting AWS companies on the forefront of cloud expertise.

Leave a Reply

Your email address will not be published. Required fields are marked *