> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-codex-docs-audit-20260719-0149.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Bedrock Embedder

> Generate Cohere Embed v3 or v4 embeddings through AWS Bedrock.

`AwsBedrockEmbedder` defaults to `cohere.embed-multilingual-v3` with 1024 dimensions. Set `input_type` for the text being embedded.

```python aws_bedrock_embedder.py theme={null}
from agno.knowledge.embedder.aws_bedrock import AwsBedrockEmbedder

document_embedder = AwsBedrockEmbedder(input_type="search_document")
query_embedder = AwsBedrockEmbedder(input_type="search_query")

document_vector = document_embedder.get_embedding(
    "The quick brown fox jumps over the lazy dog."
)
query_vector = query_embedder.get_embedding("Which animal jumps?")

print(len(document_vector), len(query_vector))
```

<Warning>
  `AwsBedrockEmbedder` applies one configured `input_type` to every call. A single instance used by a vector database therefore applies the same input type to document insertion and query search. Cohere retrieval models distinguish `search_document` from `search_query`.
</Warning>

For Cohere Embed v4, set `id="cohere.embed-v4:0"`. The embedder changes its default vector dimension to 1536. Set `output_dimension` to use 256, 512, 1024, or 1536 dimensions.

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Configure AWS credentials">
    Authenticate with the AWS SDK credential chain, then set the region:

    ```bash theme={null}
    export AWS_REGION=us-east-1
    ```
  </Step>

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno boto3
    ```
  </Step>

  <Step title="Run the example">
    ```bash theme={null}
    python aws_bedrock_embedder.py
    ```
  </Step>
</Steps>

## Developer Resources

* [Cohere Embed v4 on Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-embed-v4.html)
* [Embedders overview](/knowledge/concepts/embedder/overview)
