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

# AWS Bedrock

> Connect MIRA to Claude and other foundation models via AWS Bedrock — the default provider.

AWS Bedrock is MIRA's **default provider** for the RLM Engine. It gives you access to Anthropic's Claude models through your existing AWS account without a direct Anthropic API subscription. Both the RLM and Native Agent engines support Bedrock.

## Prerequisites

* An AWS account with Bedrock enabled in your target region
* IAM access keys (or an IAM role if running on EC2/ECS)
* Model access granted in the Bedrock console for the model you want to use

## Request model access

Before you can invoke a model, you must request access in the AWS console:

1. Open the [AWS Bedrock console](https://console.aws.amazon.com/bedrock)
2. Go to **Model access** in the left sidebar
3. Find the model (e.g. *Anthropic Claude Sonnet 4*) and click **Request access**
4. Access is typically granted within a few minutes

## Setup in MIRA

<Steps>
  <Step title="Enter your AWS credentials">
    Press ⌘, → **Bedrock / AWS** tab and fill in:

    * **AWS Access Key ID** — from IAM → Users → Security credentials
    * **AWS Secret Access Key** — shown once when you create the access key
    * **Session Token** — optional, only for temporary/assumed-role credentials
    * **AWS Region** — where you have Bedrock enabled (e.g. `eu-west-1`)

    Click **Save**. Credentials are encrypted with `safeStorage` and stored in `credentials.json`.
  </Step>

  <Step title="Test the connection">
    Click **Test Connection**. MIRA calls `sts:GetCallerIdentity` and displays your AWS Account ID on success.
  </Step>

  <Step title="Select Bedrock in the Engine tab">
    Press ⌘, → **Engine** tab → in the **Provider & Model** section, click the **AWS Bedrock** button.
  </Step>

  <Step title="Enter a model ID and region">
    MIRA shows suggestion chips for common Bedrock model IDs. You can also type **any valid Bedrock model ID** directly — any model you have access to in your account works.

    | Model                     | ID                                             | Notes                           |
    | ------------------------- | ---------------------------------------------- | ------------------------------- |
    | Claude Sonnet 4 (EU)      | `eu.anthropic.claude-sonnet-4-20250514-v1:0`   | **Default** — best quality      |
    | Claude Sonnet 4 (US)      | `us.anthropic.claude-sonnet-4-20250514-v1:0`   | US region cross-inference       |
    | Claude 3.5 Sonnet v2 (EU) | `eu.anthropic.claude-3-5-sonnet-20241022-v2:0` | Strong quality, high throughput |
    | Claude 3.5 Sonnet v2      | `anthropic.claude-3-5-sonnet-20241022-v2:0`    | Without cross-region prefix     |
    | Claude 3.5 Haiku (EU)     | `eu.anthropic.claude-3-5-haiku-20241022-v1:0`  | Fast, cost-effective            |
    | Claude 3.5 Haiku          | `anthropic.claude-3-5-haiku-20241022-v1:0`     | Without cross-region prefix     |

    Select the **AWS Region** that matches your Bedrock model access.
  </Step>

  <Step title="Save">
    Click **Save & restart bridge**. The engine restarts automatically.
  </Step>
</Steps>

<Tip>
  Bedrock supports many foundation models beyond Claude (e.g. Llama, Mistral, Amazon Titan). Paste
  any valid Bedrock model ID from the [AWS Bedrock
  docs](https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html) into the **Model ID**
  field. Note that the RLM engine is tested primarily with Claude and GPT-class models.
</Tip>

## Required IAM permissions

The minimum IAM policy required to run MIRA with Bedrock:

```json theme={null}
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "STSCheck",
      "Effect": "Allow",
      "Action": ["sts:GetCallerIdentity"],
      "Resource": "*"
    },
    {
      "Sid": "BedrockInvoke",
      "Effect": "Allow",
      "Action": ["bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream"],
      "Resource": "arn:aws:bedrock:*::foundation-model/*"
    }
  ]
}
```

## Cross-region inference

The `eu.` and `us.` prefixed model IDs use Bedrock's **cross-region inference** feature, which routes requests across availability zones within that geographic area for higher availability. You do not need to enable anything extra — just ensure the region in your settings matches the prefix (`eu-west-1` for `eu.` models, `us-east-1` or similar for `us.` models).

## Default values

MIRA uses these Bedrock defaults (configurable in the **Engine** tab):

| Setting     | Default                                      |
| ----------- | -------------------------------------------- |
| Region      | `eu-west-1`                                  |
| Model       | `eu.anthropic.claude-sonnet-4-20250514-v1:0` |
| Temperature | `1.0`                                        |
| Max tokens  | `8 096`                                      |

## Troubleshooting

| Error                               | Fix                                                                                |
| ----------------------------------- | ---------------------------------------------------------------------------------- |
| `AccessDeniedException`             | Your IAM user lacks `bedrock:InvokeModel` permission — check your IAM policy       |
| `ResourceNotFoundException`         | Model ID is invalid or not available in your region                                |
| `ValidationException: model access` | You have not been granted access to this model — request it in the Bedrock console |
| `InvalidClientTokenId`              | Access Key ID is wrong or the key has been deleted                                 |
| `SignatureDoesNotMatch`             | Secret Access Key is wrong                                                         |
| `ECONNREFUSED`                      | No internet connection, or a corporate proxy is blocking Bedrock endpoints         |

<Note>
  Edit this page — [Open a pull
  request](https://github.com/satyendra2013/mira-app/edit/main/docs/configuration/providers/bedrock.mdx)
</Note>
