Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creates new page detailing Bedrock connector setup #5148

Merged
merged 18 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions docs/assistant/connect-to-bedrock.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
[[assistant-connect-to-bedrock]]
= Connect to Amazon Bedrock

This page provides step-by-step instructions for setting up an Amazon Bedrock connector for the first time. This connector type enables you to leverage large language models (LLMs) within {kib}. You'll first need to configure AWS, then configure the connector in {kib}.

NOTE: Only Amazon Bedrock's `Anthropic` models are supported: `Claude` and `Claude instant`.

[discrete]
== Configure AWS

[discrete]
=== Configure an IAM policy

. Log into the AWS console and search for Identity and Access Management (IAM).
. From the **IAM** menu, select **Policies** → **Create policy**.
. To provide the necessary permissions, paste the following JSON into the **Specify permissions** menu.
+
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream"
],
"Resource": "*"
}
]
}
```
+
NOTE: These are the minimum required permissions. IAM policies with additional permissions are also supported.
+
. Click **Next**. Name your policy.

[discrete]
=== Configure an IAM User

. Return to the **IAM** menu. Select **Users** from the navigation menu, then click **Create User**.
. Name the user, then click **Next**.
. Select **Attach policies directly**.
. In the **Permissions policies** field, search for the policy you created earlier, select it, and click **Next**.
. Review the configuration then click **Create user**.

[discrete]
=== Create an access key

. Return to the **IAM** menu. Select **Users** from the navigation menu.
. Search for the user you just created, and click its name.
. Go to the **Security credentials** tab.
. Under **Access keys**, click **Create access key**.
. Select **Third-party service**, check the box under **Confirmation**, click **Next**, then click **Create access key**.
. Click **Download .csv file** to download the key. Store it securely.

[discrete]
=== Enable model access

. Search the AWS console for Amazon Bedrock.
. From the Amazon Bedrock page, click **Get started**.
. Select **Model access** from the left navigation menu, then click **Manage model access**.
. Check the boxes for **Claude** and **Claude Instant**, depending which model or models you plan to use.
benironside marked this conversation as resolved.
Show resolved Hide resolved
. Click **Save changes**.

[discrete]
== Configure Elastic AI Assistant

. Log in to {kib}.
. Go to **Stack Management → Connectors → Create connector → Amazon Bedrock**.
. Name your connector.
. (Optional) Configure the Amazon Bedrock connector to use a different AWS region where Anthropic models are supported by editing the **URL** field, for example by changing `us-east-1` to `eu-central-1`.
. (Optional) Add one of the following strings if you want to use a model other than the default:
.. For Haiku: `anthropic.claude-3-haiku-20240307-v1:0`
.. For Sonnet: `anthropic.claude-3-sonnet-20240229-v1:0`
.. For Opus: `anthropic.claude-3-opus-20240229-v1:0`
. Enter the **Access Key** and **Secret** that you generated earlier, then click **Save**.

benironside marked this conversation as resolved.
Show resolved Hide resolved
benironside marked this conversation as resolved.
Show resolved Hide resolved
Your model is now configured. For more information on using Elastic AI Assistant, refer to <<security-assistant, AI Assistant>>.

IMPORTANT: If you're using provisioned throughput, your ARN becomes the model ID, and the connector settings **URL** value must be https://www.urlencoder.org/[encoded] to work.
benironside marked this conversation as resolved.
Show resolved Hide resolved
+
For example, if the non-encoded ARN is: `arn:aws:bedrock:us-east-2:123456789102:provisioned-model/3Ztr7hbzmkrqy1`
+
The encoded ARN would be: `arn%3Aaws%3Abedrock%3Aus-east-2%3A123456789102%3Aprovisioned-model%2F3Ztr7hbzmkrqy1`
1 change: 1 addition & 0 deletions docs/assistant/security-assistant.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,4 @@ In addition to practical advice, AI Assistant can offer conceptual advice, tips,


include::ai-alert-triage.asciidoc[leveloffset=+1]
include::connect-to-bedrock.asciidoc[leveloffset=+1]