> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fabricgateway.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fabricgateway.ai/_mcp/server.

# Connect Amazon Bedrock

> Target URLs, AWS credentials, supported endpoints, and model IDs for Amazon Bedrock and Amazon Bedrock Mantle connections.

The console offers two Bedrock providers. **Amazon Bedrock** calls the Bedrock Runtime API, where clients send Anthropic Messages requests to a model's `invoke` endpoint. **Amazon Bedrock Mantle** calls Bedrock's OpenAI-compatible API. The gateway forwards each request unchanged and signs it with your AWS credentials. This topic lists what's specific to Bedrock. For the setup steps, see [Connect an LLM provider](/configure/connections/llm-providers).

## Target URL

| Provider                  | Target URL                                                                                                    |
| ------------------------- | ------------------------------------------------------------------------------------------------------------- |
| **Amazon Bedrock**        | `https://bedrock-runtime.REGION.amazonaws.com`, for example `https://bedrock-runtime.us-east-1.amazonaws.com` |
| **Amazon Bedrock Mantle** | `https://bedrock-mantle.REGION.api.aws`                                                                       |

The console reads the AWS region from the target URL and uses it as the default region for the credentials.

## Credentials

When you set up credentials, choose one of the following auth types.

| Auth type            | What you enter                                                                    | How the gateway authenticates                                         |
| -------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **AWS Access Key**   | An access key ID, a secret access key, an optional session token, and the region. | Signs each request with AWS Signature Version 4.                      |
| **Bedrock API Key**  | A Bedrock API key and the region.                                                 | Sends `Authorization: Bearer <key>`.                                  |
| **AWS Assumed Role** | A role ARN, an optional external ID, and the region.                              | Assumes the role and signs each request with AWS Signature Version 4. |
| AWS service role     | Nothing.                                                                          | Signs each request with the data plane's own AWS identity.            |

**AWS Assumed Role** and the service role rely on the AWS identity of the machine that runs the data plane, so they're offered only on the Enterprise plan, where the data plane runs in your VPC. On the Free plan, use an access key or a Bedrock API key. A **Private** network connection offers its own assumed-role auth type. See [Connect to a provider over a private network](/configure/connections/private-connections).

The gateway signs the request after every other change, so the signature covers the headers it forwards. Any `Authorization` header that the client sent is replaced.

## Supported endpoints

**Amazon Bedrock:**

| Method | Path                                          | Request format                                      |
| ------ | --------------------------------------------- | --------------------------------------------------- |
| `POST` | `/model/MODEL_ID/invoke`                      | Anthropic Messages                                  |
| `POST` | `/model/MODEL_ID/invoke-with-response-stream` | Anthropic Messages, streamed as an AWS event stream |
| `POST` | `/openai/v1/chat/completions`                 | OpenAI chat completions                             |

**Amazon Bedrock Mantle:**

| Method | Path                     | Request format          |
| ------ | ------------------------ | ----------------------- |
| `POST` | `/v1/chat/completions`   | OpenAI chat completions |
| `POST` | `/v1/responses`          | OpenAI Responses        |
| `POST` | `/openai/v1/responses`   | OpenAI Responses        |
| `POST` | `/anthropic/v1/messages` | Anthropic Messages      |
| `GET`  | `/v1/models`             |                         |

## Model IDs

On the `invoke` endpoints, the model is part of the URL path, for example `/model/anthropic.claude-3-5-haiku-20241022-v1:0/invoke`. The gateway reads it from the path, so a model restriction on the connection applies to it the same way as to a `model` field in the body. Use the Bedrock model ID or inference profile ID that you would send to Bedrock directly, and list the same IDs if you restrict models.

The request body follows Bedrock's rules for Anthropic models, so it includes `anthropic_version` and doesn't include `model`. The gateway forwards the body unchanged.

On the OpenAI-compatible endpoints, the model is the `model` field in the body.

## Example

```bash
curl "BASE_URL/model/anthropic.claude-3-5-haiku-20241022-v1:0/invoke" \
  -H "fg-api-key: GATEWAY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "anthropic_version": "bedrock-2023-05-31",
    "max_tokens": 256,
    "messages": [{ "role": "user", "content": "Hello" }]
  }'
```

Replace `BASE_URL` with the route's base URL and `GATEWAY_KEY` with your gateway key. For how to find both, see [Authenticate and send a request](/use/authenticate).

## Next steps

* [Fail over across providers](/configure/routing/failover)
* [Restrict model and tool access](/configure/access-and-limits/model-access)
* [Plan a deployment](/run/plan-a-deployment)