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

Signature error if model ID in request contains a colon (AWS Bedrock) #5541

Closed
3 of 14 tasks
keyfayaz opened this issue Oct 10, 2024 · 2 comments
Closed
3 of 14 tasks
Labels
pending-maintainer-response Pending response from a maintainer of this repository

Comments

@keyfayaz
Copy link

keyfayaz commented Oct 10, 2024

Description

We're making a request to AWS bedrock's converse endpoint using AWSSigV4Signer and AWSHttpRequest in Flutter. When the Model ID contains a colon (i.e., anthropic.claude-v2:1 or cohere.command-r-v1:0), the response is as follows:

"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details."

The response is correct for models without a colon (i.e., amazon.titan-text-express-v1 or anthropic.claude-v2).

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

  1. Create signed http request to to AWS Bedrock's converse endpoint
  2. Configure different model IDs to test (e.g., anthropic.claude-v2, anthropic.claude-v2:1)
  3. Configure the payload for the request
  4. Send the request; observe response for the different models

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.24.0

Amplify Flutter Version

  • aws_common: ^0.7.1
  • aws_signature_v4: ^0.6.1
@github-actions github-actions bot added pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Oct 10, 2024
@keyfayaz
Copy link
Author

Seems to be working with doubleEncodePathSegments set to false in the serviceConfiguration of the signer. Would be nice if this was exposed/obvious at the higher level.

@github-actions github-actions bot added pending-maintainer-response Pending response from a maintainer of this repository and removed pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Oct 10, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-maintainer-response Pending response from a maintainer of this repository
Projects
None yet
Development

No branches or pull requests

1 participant