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

# AWS Claude

> Use Claude models through AWS Bedrock with Agno agents.

Use Claude models through AWS Bedrock. This integration uses the Anthropic SDK's Bedrock client. For other Bedrock foundation models, see [AWS Bedrock](/models/providers/cloud/aws-bedrock/overview).

We recommend experimenting to find the best-suited model for your use case. Here are some general recommendations:

* `global.anthropic.claude-sonnet-5` is the latest Sonnet model (Claude Sonnet 5).
* `global.anthropic.claude-sonnet-4-5-20250929-v1:0` is good for most use cases and supports image input.
* `us.anthropic.claude-haiku-4-5-20251001-v1:0` is Anthropic's fastest model.

## Installation

```bash theme={null}
uv pip install -U 'anthropic[bedrock]' agno
```

## Authentication

AWS Claude supports two authentication methods:

### Method 1: Access Key and Secret Key (Recommended)

Set your `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_REGION` environment variables.

Get your keys from [here](https://us-east-1.console.aws.amazon.com/iam/home?region=us-east-1#/home).

<CodeGroup>
  ```bash Mac theme={null}
  export AWS_ACCESS_KEY_ID=***
  export AWS_SECRET_ACCESS_KEY=***
  export AWS_REGION=***
  ```

  ```bash Windows theme={null}
  setx AWS_ACCESS_KEY_ID ***
  setx AWS_SECRET_ACCESS_KEY ***
  setx AWS_REGION ***
  ```
</CodeGroup>

Or pass them directly:

```python theme={null}
from agno.agent import Agent
from agno.models.aws import Claude

agent = Agent(
    model=Claude(
        id="global.anthropic.claude-sonnet-4-5-20250929-v1:0",
        aws_access_key="your-access-key",
        aws_secret_key="your-secret-key",
        aws_region="us-east-1"
    )
)
```

### Method 2: Boto3 Session

Use a pre-configured boto3 Session for advanced authentication scenarios:

```python theme={null}
from boto3.session import Session
from agno.agent import Agent
from agno.models.aws import Claude

# Create a boto3 session with your preferred authentication
session = Session(
    aws_access_key_id="your-access-key",
    aws_secret_access_key="your-secret-key",
    region_name="us-east-1"
)

agent = Agent(
    model=Claude(
        id="global.anthropic.claude-sonnet-4-5-20250929-v1:0",
        session=session
    )
)
```

<Note>
  The authentication methods are checked in this order: Session → Access Key/Secret Key. The first available method will be used. AWS Bedrock API key authentication (`AWS_BEDROCK_API_KEY`) is not currently supported and raises an error if set.
</Note>

## Example

Use `Claude` with your `Agent`:

<CodeGroup>
  ```python agent.py theme={null}
  from agno.agent import Agent
  from agno.models.aws import Claude

  agent = Agent(
      model=Claude(id="global.anthropic.claude-sonnet-4-5-20250929-v1:0"),
      markdown=True
  )

  # Print the response on the terminal
  agent.print_response("Share a 2 sentence horror story.")
  ```
</CodeGroup>

<Note> View more examples [here](/models/providers/cloud/aws-claude/usage/basic-stream). </Note>

## Parameters

| Parameter           | Type                       | Default                                              | Description                                                                                                                                 |
| ------------------- | -------------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                | `str`                      | `"global.anthropic.claude-sonnet-4-5-20250929-v1:0"` | The specific AWS Bedrock Claude model ID to use                                                                                             |
| `name`              | `str`                      | `"AwsBedrockAnthropicClaude"`                        | The name identifier for the AWS Bedrock Claude model                                                                                        |
| `provider`          | `str`                      | `"AwsBedrock"`                                       | The provider of the model                                                                                                                   |
| `api_key`           | `Optional[str]`            | `None`                                               | Not currently supported. Setting it (or the AWS\_BEDROCK\_API\_KEY env var) raises an error; use IAM credentials or a boto3 session instead |
| `aws_access_key`    | `Optional[str]`            | `None`                                               | The AWS access key to use (defaults to AWS\_ACCESS\_KEY\_ID, then AWS\_ACCESS\_KEY env var)                                                 |
| `aws_secret_key`    | `Optional[str]`            | `None`                                               | The AWS secret key to use (defaults to AWS\_SECRET\_ACCESS\_KEY, then AWS\_SECRET\_KEY env var)                                             |
| `aws_session_token` | `Optional[str]`            | `None`                                               | The AWS session token for temporary credentials (defaults to AWS\_SESSION\_TOKEN env var)                                                   |
| `aws_region`        | `Optional[str]`            | `None`                                               | The AWS region to use (defaults to AWS\_REGION env var)                                                                                     |
| `session`           | `Optional[Session]`        | `None`                                               | A boto3 Session object to use for authentication                                                                                            |
| `max_tokens`        | `Optional[int]`            | `8192`                                               | Maximum number of tokens to generate in the chat completion                                                                                 |
| `temperature`       | `Optional[float]`          | `None`                                               | Controls randomness in the model's output                                                                                                   |
| `top_p`             | `Optional[float]`          | `None`                                               | Controls diversity via nucleus sampling                                                                                                     |
| `top_k`             | `Optional[int]`            | `None`                                               | Controls diversity via top-k sampling                                                                                                       |
| `stop_sequences`    | `Optional[List[str]]`      | `None`                                               | A list of strings that the model should stop generating text at                                                                             |
| `request_params`    | `Optional[Dict[str, Any]]` | `None`                                               | Additional parameters to include in the request                                                                                             |
| `client_params`     | `Optional[Dict[str, Any]]` | `None`                                               | Additional parameters for client configuration                                                                                              |

`Claude` (AWS) extends the [Anthropic Claude](/models/providers/native/anthropic/overview) model with AWS Bedrock integration and has access to most of the same parameters.
