Configure SQL AI Assistant using the Amazon Bedrock Service

This topic describes how to configure the SQL AI Assistant using the Amazon Bedrock Service.

You must have an AWS account with Bedrock access.
  1. Log in to the Amazon Bedrock service.
  2. Obtain your access key and secret as follows:
    1. Go to the IAM console: https://console.aws.amazon.com/iam.
    2. Click on Users from the left menu and select the user you want to access.
    3. Click on Security credentials.
    4. Go to the Access keys section and note the access keys.
  3. Establish Anthropic Claude access. Claude from Anthropic is one of the best models available in Bedrock for SQL-related tasks. By default, Claude is not available on Bedrock. You need to place a special request for Claude.
  1. Upon installing and setting up the Cloudera AI Inference service, log in to the Cloudera Management Console as an Administrator.
  2. Go to Environments and select your environment.
  3. Go to the Data Lake tab and click on the CM URL to open Cloudera Manager.
  4. Go to Clusters > Hue service > Configuration and select add the following lines in the Hue Service Advanced Configuration Snippet (Safety Valve) for hue_safety_valve.ini field:
    [aws]
                            [[bedrock_account]]
                            access_key_id_script='echo $AWS_BEDROCK_ACCESS_KEY_ID'
                            secret_access_key_script='echo $AWS_BEDROCK_SECRET_ACCESS_KEY'
                            region='us-east-1'
                            [desktop]
                            [[ai_interface]]
                            service='bedrock'
                            model='claude'
    AWS_BEDROCK_ACCESS_KEY_ID and AWS_BEDROCK_SECRET_ACCESS_KEY must be added as encoded values under hue-secret. For more information, see Secure approach for passing a token.
  5. Click Save Changes.
You see Assistant on the Hue SQL editor, and the SQL AI Assistant will connect to the specified model in the Amazon Bedrock service.