25
Views
6
Comments
Solved
[Amazon Bedrock Connector] How to create a signature(Sigv4) for AWS API requests
Question
aws-bedrock-connector
Service icon
Forge asset by Platform Maintenance
Application Type
Service

The public InvokeModel_Claude_v2 action is not designed to pass an access key or secret access key.
I think this will cause an error because Sigv4 is not available.

I think the SignRequest action is responsible for that role, but since it is automatically called inside InvokeModel_Claude_v2, isn't this implementation incorrect?

If my idea is wrong, could you please give me a sample of how to use it correctly?

2021-10-09 07-57-44
Stefan Weber
 
MVP
Solution

Hi. The invoke Claude2 model does not support the new Claude 3 models. They have a total different request/response model than the previous versions. If you want to use the newer models you may look into my connector for AWS Bedrock https://www.outsystems.com/forge/component-overview/16561/aws-bedrock-runtime-o11

This one is different as it uses the official AWS SDK, supports more models and you can set access key, secret access key and even a session token (for assumed roles) as input parameters. There is also a Getting started guide here https://without.systems/get-started-with-outsystems-and-amazon-bedrock

Best

Stefan

2024-05-02 11-20-07
Bas Klein

The InvokeModel_Claude_v2 action in OutSystems might be part of a custom implementation. If SignRequest is called inside it, it’s possible that the access key and secret access key are handled there. For a definitive answer or correct usage sample, more specific details about the implementation are needed.

2021-10-09 07-57-44
Stefan Weber
 
MVP

The Platform team decided that the connector has two Site Properties for settings access key and secret access key. Both are used to generate the SigV4 signature when invoking the action. See the OnBeforeRequest handler of the module.

2019-03-07 05-12-49
Yuichi Igarashi

ステファンさん、

教えてくれてありがとう。

事前にOnBeforeRequestの実装を見ていたのですが、中途半端に確認したところ、リクエストヘッダにシークレットアクセスキーを含めるべきだと勘違いしてしまいました。

上記の情報をサイトプロパティに設定する必要があることがわかりました。


ただし、次のエラー メッセージが返されます。
「リクエストの署名が、計算した署名と一致しません。AWS シークレット アクセス キーと署名方法を確認してください。詳細については、サービスのドキュメントを参照してください。」

アクセス キー ID、シークレット アクセス キー、リージョン、およびサイト プロパティの情報を正しく入力しました。
SignRequestに実装されているわかりにくいSigV4の実装が間違っている可能性はありますか?

設定で気になるのはモデルIDにClaude 3 Haikuを指定していることです。
Action名にはInvokeModel_Claude_v2とあるので、Claude 2限定のActionでしょうか?

ちなみに、投稿していただいたFrogeは問題なく動作しています。
AWS ベッドロック ランタイム

2021-10-09 07-57-44
Stefan Weber
 
MVP
Solution

Hi. The invoke Claude2 model does not support the new Claude 3 models. They have a total different request/response model than the previous versions. If you want to use the newer models you may look into my connector for AWS Bedrock https://www.outsystems.com/forge/component-overview/16561/aws-bedrock-runtime-o11

This one is different as it uses the official AWS SDK, supports more models and you can set access key, secret access key and even a session token (for assumed roles) as input parameters. There is also a Getting started guide here https://without.systems/get-started-with-outsystems-and-amazon-bedrock

Best

Stefan

2019-03-07 05-12-49
Yuichi Igarashi

Stefan-san,

Claude2 was not supported.
Your Forge is already in use. It was intuitive and immediately available. thank you.

I've never seen this article before, so I'm going to read it.

2021-10-09 07-57-44
Stefan Weber
 
MVP
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.