Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bedrock. Authentication error when using only awsAccessKey & awsSecretKey #537

Open
dev-natalya opened this issue Sep 25, 2024 · 2 comments

Comments

@dev-natalya
Copy link

dev-natalya commented Sep 25, 2024

Usage

export const client = new AnthropicBedrock({
  awsRegion: "us-east-1",
  awsAccessKey: "MY_ADMIN_ACCESS_KEY",
  awsSecretKey: "MY_ADMIN_SECRET_ACCESS_KEY",
})

// using SDK, message.create() request using the client above

Problem

Runtime error happens only in a Lambda function, not locally.

PermissionDeniedError: 403 The security token included in the request is invalid

Expected behavior

The error shouldn't happen in the case above.
The SDK does not need awsSessionToken to be provided.
Only the awsAccessKey & awsSecretKey should be required to match aws-sdk (v2/v3) behavior.

@dev-natalya dev-natalya changed the title Bedrock. Authentication error when using awsAccessKey & awsSecretKey Bedrock. Authentication error when using only awsAccessKey & awsSecretKey Sep 25, 2024
@hugoblanc
Copy link

Same here

@perezpefaur
Copy link

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants