> ## Documentation Index
> Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Bedrock

> Integrate with AWS Bedrock as an AI Provider

Add an AWS Bedrock integration to use Bedrock-compatible models in Arize AX.

<Note>
  By adding this integration, your data may be sent to AWS or hosted model providers for certain actions within Arize AX (e.g., prompt playground) and your account may be billed for usage.
</Note>

## Add the Integration Using the Arize Skills

Add an AWS Bedrock integration from your coding agent using the [Arize Skills](/ax/agents/arize-skills):

<Prompt description="Create an AWS Bedrock integration named 'my-aws-bedrock' with my base URL https://bedrock-runtime.us-east-1.amazonaws.com and Bearer Token bedrock-api-key-YmVkcm9jay...">
  Create an AWS Bedrock integration named 'my-aws-bedrock' with my base URL [https://bedrock-runtime.us-east-1.amazonaws.com](https://bedrock-runtime.us-east-1.amazonaws.com) and Bearer Token bedrock-api-key-YmVkcm9jay...
</Prompt>

## Add the Integration from Arize AX

### Select AWS Bedrock from the Providers List

<Frame caption="The AI Provider integrations tab">
  ![The AI Provider integrations tab](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/ai-integration-providers-aws-bedrock.png)
</Frame>

### Fill Out Your Integration Details

<Frame caption="The AWS Bedrock integration configuration pane">
  ![The AI integration details tab](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/ai-integration-providers-aws-bedrock-details.png)
</Frame>

Give your integration a name. Then set your base URL.

You then need to define the available model deployments. If you have all the default AWS models available then you can enable AWS default models. Otherwise add your model name as a custom model name.

### Authentication Settings

Next you will need to select the authentication settings, either assume role, bearer token (API key), or custom headers.

<Tabs>
  <Tab title="Assume Role">
    Arize AX will assume the role you create to run `InvokeModel` commands against Bedrock models in your account. The following will create a **least privilege** role in your AWS account. It will also configure that role so that Arize AX can assume it.

    1. Copy the permissions policy in Arize AX:

           <Frame>
             ![Copy the necessary permissions policy](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/aws%20bedrock%20invoke%20model%20policy.png)
           </Frame>

    2. Create a permission policy in your AWS account:

           <Frame>
             ![Create a new permissions policy](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/intergrations-aws-bedrock-3.avif)
           </Frame>

    3. Add the JSON from the Bedrock Integration form to your policy:

           <Frame>
             ![Add permissions JSON](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/intergrations-aws-bedrock-4.avif)
           </Frame>

    4. Create a role with the Permissions policy you just created:

           <Frame>
             ![Create a new IAM role](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/intergrations-aws-bedrock-5.avif)
           </Frame>

    5. Choose AWS account as the trusted entity type. If you set an external ID be sure to copy it and add it to the Bedrock integrations settings in Arize AX.

           <Frame>
             ![Select AWS account as the trusted entity type](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/intergrations-aws-bedrock-6.avif)
           </Frame>

    6. Add the permissions policy you created above:

           <Frame>
             ![Add the permissions policy you created above](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/intergrations-aws-bedrock-7.avif)
           </Frame>

    7. Create your role then go in to edit the trusted entities JSON:

           <Frame>
             ![Edit the role you just created](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/integrations-aws-bedrock-8.avif)
           </Frame>

    8. Navigate to the trust relationships tab for your new role. From there, copy the new role's ARN and add it to the Bedrock integration settings in Arize AX:

           <Frame>
             ![Navigate to the Trust Relationships tab and edit the policy](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/integrations-aws-bedrock-9.avif)
           </Frame>

    9. Copy the trusted entities policy from the Bedrock integration settings in Arize AX:

           <Frame>
             ![Copy the trusted entities policy from Arize AX](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/aws%20bedrock%20trusted%20entity%20policy.png)
           </Frame>

    10. Paste the trusted entities policy into the JSON editor:

            <Frame>
              ![Add the trusted entities policy to your role](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/integrations-aws-bedrock-11.avif)
            </Frame>
  </Tab>

  <Tab title="Bearer Token">
    Create an API key in the [AWS Bedrock console](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys.html), then set it.
  </Tab>

  <Tab title="Header Based Auth">
    Add the custom authentication headers to send with every request.
  </Tab>
</Tabs>

## AWS Region

Set the appropriate AWS region in the prompt playground. This is stored locally in the browser after being set.

### Advanced Settings

<Frame caption="The Advanced Settings configuration pane">
  ![The AI integration details tab](https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/ai-integration-providers-advanced-settings.png)
</Frame>

Expand the **Advanced Settings** section to configure the following:

* **Supports Function Calling** - Turn this on to allow the integration to use function calling features. This is on by default.
* **Authorized Orgs** - Configure which organizations have access to this integration.
* **Authorized Spaces** - Configure which spaces have access to this integration.

## Add the Integration

Finally check the box to agree to the terms and conditions, then select the **Add Integration** button to create the integration.
