-
Notifications
You must be signed in to change notification settings - Fork 237
別アカウントの Bedrock を利用するためのクロスアカウント設定を追加 #444
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
いくつかコメントさせていただきました!
別のAWSアカウントでRoleを作成して cdk.json に設定するまでの手順を https://github.com/aws-samples/generative-ai-use-cases-jp/blob/main/docs/DEPLOY_OPTION.md に追加をお願いします!:pray: おそらく利用頻度としては低いオプションになると思うので、追加位置は最下部で問題ありません!また、手動で作成する手順を説明するにあたって、スクリーンショットなどは必要ありません!追加後に、DEPLOY_OPTION.md の他の項目と同様 README.md にアンカーリンクを追加してください!
また、念のためですが、ルートディレクトリにて npm run lint
を実行していただけますでしょうか?:pray: (すでに実行されていたらすいません!)
コメント頂いた内容を修正したものをアップしておりますのでご確認をお願い致します。 |
packages/cdk/cdk.json
Outdated
@@ -17,7 +17,7 @@ | |||
] | |||
}, | |||
"context": { | |||
"ragEnabled": false, | |||
"ragEnabled": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要なコミットが入っています!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
すみません、修正します!
@@ -48,6 +48,7 @@ | |||
"anonymousUsageTracking": true, | |||
"recognizeFileEnabled": false, | |||
"vpcId": null, | |||
"crossAccountBedrockRoleArn": "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今までの設定項目と統一して、利用しない場合のデフォルト値を null にしていただいても良いでしょうか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null に変更後に再デプロイしたところ、以下のエラーが出力されたのですが、Lambda の環境変数には null は設定できないと理解しました。(認識齟齬ございましたらご指摘ください)
nerativeAiUseCasesStack failed: Error [ValidationError]: [/Resources/APIPredict09E4E4FF/Type/Environment/Variables/CROSS_ACCOUNT_BEDROCK_ROLE_ARN] 'null' values are not allowed in templates
そのため、空文字列 "" をデフォルト値とできればと思いますが如何でしょうか。
もしくは、null 値の場合、環境変数自体を設定しないように修正した方が良いでしょうか。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
すみません改めて確認したら全て null というわけではなく空文字もちょくちょく使っていたので、空文字で大丈夫です!:pray:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!ありがとうございます!
目的
Bedrock サービスのみ、別の AWS アカウントを指定して構成する
利用条件
修正内容
packages/cdk/cdk.json
packages/cdk/lib/construct/api.ts
packages/cdk/lambda/utils/bedrockApi.ts
動作確認