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

# AWS Claude

> Learn how to use AWS Claude models in Agno.

Use Claude models through AWS Bedrock. This provides a native Claude integration optimized for AWS infrastructure.

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

* `anthropic.claude-3-5-sonnet-20241022-v2:0` model is good for most use-cases and supports image input.
* `anthropic.claude-3-5-haiku-20241022-v2:0` model is their fastest model.

## Authentication

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>

## 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="anthropic.claude-3-5-sonnet-20240620-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](/examples/models/aws/claude/basic). </Note>

## Parameters

| Parameter        | Type                       | Default                                       | Description                                                      |
| ---------------- | -------------------------- | --------------------------------------------- | ---------------------------------------------------------------- |
| `id`             | `str`                      | `"anthropic.claude-3-5-sonnet-20240620-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                                        |
| `aws_access_key` | `Optional[str]`            | `None`                                        | The AWS access key to use (defaults to AWS\_ACCESS\_KEY env var) |
| `aws_secret_key` | `Optional[str]`            | `None`                                        | The AWS secret key to use (defaults to AWS\_SECRET\_KEY 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`     | `int`                      | `4096`                                        | 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](/concepts/models/anthropic) model with AWS Bedrock integration and has access to most of the same parameters.
