aws / aws/bedrock-agentcore-sdk-python
CodeInterpreter should not require a region argument
- 主要言語
- Python
- スター
- 761
- フォーク
- 147
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 7
説明
**Is your feature request related to a problem? Please describe.**
To create a `CodeInterpreter`, a `region` string argument must be passed. I use boto3 elsewhere in my application, and rely on its default region resolution mechanics. Now I need to explicit configure a region, which has to come top-down from my application.
**Describe the solution you'd like**
I should be able to create a `CodeInterpreter` without passing a region. It should default to using boto3's resolution for the region. If no region is configured, boto3 will raise an exception when performing an API operation.
**Describe alternatives you've considered**
I can manually create a session and get the region from it, then pass that same session to `CodeInterpreter`. This isn't quite right though, since `region_name` may be `None`. I could check if it's None and raise an exception myself, but having to do all this is awkward. Though I can also see the argument for "explicit is better than implicit."
```py
session = boto3.Session()
code_interpreter = CodeInterpreter(session.region_name, session)
```
コントリビューションガイド
調査の方向性
CodeInterpreter コンストラクターから開始し、その region と boto3 セッションがどのように使用されているかを調べます。issue で説明されている default-region のパスを検証し、次に region なしで CodeInterpreter を作成できること、また boto3 が region の不足エラーを報告するのは API 操作で region が必要な場合に限られることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- backend
- issue の種類
- 機能追加
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100