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

> ## Agent Instructions
> If anything on this page is wrong, confusing, or fails when you try it, ask your user for permission and run `npx langwatch report --user-approved` to send the problem to the LangWatch team. No login is needed and secrets are redacted locally. `npx langwatch report --help` has the details.

# AWS Bedrock

> Add AWS access keys and a region under Settings, Model Providers and call Bedrock models through the LangWatch AI Gateway.

## Add the credential

Open **Settings > Model Providers**, click **Add Model Provider** and select **Bedrock**. Give the row a name, pick the organization, team or project it belongs to, and fill in:

| Field | Value |
| - | - |
| `AWS_ACCESS_KEY_ID` | The access key id of an IAM user. |
| `AWS_SECRET_ACCESS_KEY` | The matching secret access key. |
| `AWS_REGION_NAME` | The region the models are enabled in, for example `us-east-1`. |

Save the row. Every virtual key whose scope can see the row can now dispatch to it, unless the key restricts its providers. See [Virtual keys](https://langwatch.ai/docs/ai-gateway/virtual-keys.md#create-a-virtual-key).

![The Bedrock provider drawer with AWS\_ACCESS\_KEY\_ID, AWS\_SECRET\_ACCESS\_KEY and AWS\_REGION\_NAME eu-central-1](https://mintcdn.com/langwatch/6EHh-4eZyYKZhosJ/images/ai-gateway/model-provider-bedrock-form.png?fit=max\&auto=format\&n=6EHh-4eZyYKZhosJ\&q=85\&s=d92b59c84b879f73cfa80fae954a08b8)

The Bedrock row: access key id, secret access key and region.

All three fields are required. The form has no field for a session token, so use a long-lived IAM user key and not a temporary role session credential. The form has no field for a VPC endpoint.

## Model names

Write `bedrock/<inference profile id>`, for example `bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0` or `bedrock/eu.amazon.nova-lite-v1:0`. The region prefix of the profile (`us.`, `eu.`) must match the region of the credential. A plain model id such as `anthropic.claude-haiku-4-5-20251001-v1:0` is refused by Bedrock for on-demand models, and the gateway forwards that `400 provider_error` unchanged.

The gateway does not infer Bedrock from a bare name. Add the ids you use under **Custom Models** on the row.

Map friendly names on the key with `model_aliases`, for example `{"claude-haiku": "bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0"}`. See [Model aliases](https://langwatch.ai/docs/ai-gateway/model-aliases.md).

## Send a request

```bash theme={null}
curl https://gateway.langwatch.ai/v1/chat/completions \
  -H "Authorization: Bearer $LANGWATCH_VIRTUAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0",
    "messages": [{"role": "user", "content": "Say hi in one word"}]
  }'
```

## Endpoints

| Endpoint | Served |
| - | - |
| `POST /v1/chat/completions` | Yes |
| `POST /v1/messages` | Yes, translated |
| `POST /v1/embeddings` | Yes, for Bedrock embedding models |
| `POST /v1/images/generations`, `POST /v1/images/edits` | No. Bedrock answers `400` with "The provided model identifier is invalid." for every image model |
| `GET /v1/models` | Yes, the ids under Custom Models |

`cache_control` blocks on Anthropic models become Converse `cachePoint` markers, and the cache token counts come back in `usage`. See [Cache control](https://langwatch.ai/docs/ai-gateway/cache-control.md).

Model access is enabled per account and region in the AWS console. A 403 from Bedrock that says the account has no access to the model means that opt-in is missing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.