Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

fix(cdk): lambda-microvm grants hardcode the us. inference-profile prefix instead of bedrockGeoRegion

オープン 初心者向け
#955 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
aws, typescript

調査の方向性

cdk/src/constructs/lambda-microvm-compute.ts から始めてください。ここでは inference-profile の権限が resourceName に us. プレフィックスを直接記述しています。cdk/src/constructs/ecs-agent-cluster.ts では resolveBedrockGeoRegion から geo を取得しているので、それと比較し、権限を inferenceProfileId(geo, modelId) に切り替えてください。cdk/test/constructs/ecs-agent-cluster.test.ts を参考に、'global' と 'eu' を対象とする test.each を追加します。global の synth が us.* の ARN を含まず inference-profile/global.* を許可し、デフォルトの us の出力が変わらなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

infra-cdk P1

Summary

cdk/src/constructs/lambda-microvm-compute.ts builds the Bedrock inference-profile grant ARN with a hardcoded prefix:

resource: 'inference-profile',
resourceName: `us.${modelId}`,

The AgentCore runtime (stacks/agent.ts) and ECS (constructs/ecs-agent-cluster.ts) derive the prefix from resolveBedrockGeoRegion and inject the same geo into ANTHROPIC_MODEL / ANTHROPIC_DEFAULT_HAIKU_MODEL. The Lambda MicroVM backend therefore grants us.* profiles while the agent is told to invoke <geo>.*.

Impact

Any bedrockGeoRegion other than us (the shipped cdk.json sets global) on the lambda-microvm backend fails every task at turn 0 with AccessDenied — the exact grant/env drift bedrock-model-constants.ts documents as the failure mode to avoid. Pre-existing; surfaced during review of #954.

Fix

  • Import resolveBedrockGeoRegion (or accept bedrockGeoRegion as a prop, matching ECS) and use inferenceProfileId(geo, modelId) for the ARN.
  • Add a test.each(['global', 'eu']) case mirroring cdk/test/constructs/ecs-agent-cluster.test.ts ("bedrockGeoRegion=%s injects both models…") that asserts the MicroVM role's inference-profile/<geo>.<model> ARNs and the absence of us. ones.

Acceptance

  • bedrockGeoRegion=global synth grants inference-profile/global.* on the MicroVM execution role and no us.*.
  • Existing us default unchanged.
主要言語
TypeScript
スター
158
フォーク
49
平均マージ
3日 16時間
マージ済み PR(30日)
15

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws-samples/sample-autonomous-cloud-coding-agents のほかの issue

aws-samples/sample-autonomous-cloud-coding-agents の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。