Skip to content

Commit d455625

Browse files
authored
support api key authentication for Bedrock API (#536)
AWS Bedrock has introduced API key support on 7/7, simplifying authentication for the Amazon Bedrock API. To enable this new feature in langchain-aws, this update bumps the required boto3 version to "^1.39.0". It has been tested and worked as expected with new `AWS_BEARER_TOKEN_BEDROCK` environment variable. - [x] bump up the version of boto3 in pyproject.toml and update the poetry.lock - [x] update README file to add API key support feature for Bedrock.
1 parent 0400646 commit d455625

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

libs/aws/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ pip install -U langchain-aws
99
```
1010
All integrations in this package assume that you have the credentials setup to connect with AWS services.
1111

12+
## Authentication
13+
14+
In order to use Amazon Bedrock models, you need to configure AWS credentials. One of the options is to set the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables. More information can be found [here](https://docs.aws.amazon.com/bedrock/latest/userguide/security-iam.html).
15+
Alternatively, set the `AWS_BEARER_TOKEN_BEDROCK` environment variable locally for API Key authentication. For additional API key details, refer to [docs](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys.html).
16+
1217
## Chat Models
1318

1419
`ChatBedrock` class exposes chat models from Bedrock.

libs/aws/poetry.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/aws/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ license = "MIT"
1313
[tool.poetry.dependencies]
1414
python = ">=3.9"
1515
langchain-core = "^0.3.66"
16-
boto3 = ">=1.37.24"
16+
boto3 = ">=1.39.0"
1717
pydantic = ">=2.10.0,<3"
1818
numpy = [
1919
{ version = "^1", python = "<3.12" },

0 commit comments

Comments
 (0)