project build fails before first deploy when a gateway target references a project credential
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- aws, typescript
- 領域
- authentication, build-system, cli, cloud
調査の方向性
Start with the agentcore project build entry point and the generated CDK application's credential resolution, then compare it with the deploy path that provisions credentials first. Add the requested regression test for a fresh project with an OAuth credential and MCP gateway target, and verify that build or synthesis succeeds before deployment.
索引モデルが issue の本文から書いたものです。
説明
Summary
agentcore project build cannot synthesize a new project when a gateway target references an OAuth credential declared in the same project before the first deployment.
agentcore project deploy works around this by provisioning credentials before it builds, but the standalone build command does not. This makes an otherwise valid project impossible to build in CI or inspect with CDK synthesis before its first deploy.
Reproduction
In a new project, add a gateway and then run:
printf '%s' "$CLIENT_SECRET" | agentcore project add credentials oauth \
--name MyOauthCredential \
--vendor CustomOauth2 \
--client-id my-client \
--discovery-url https://auth.example.com/.well-known/openid-configuration \
--client-secret -
agentcore project add gateway-target \
--gateway MyGateway \
--name MyMCPTarget \
--endpoint https://my-mcp-server.example.com \
--outbound-auth oauth \
--credential-name MyOauthCredential
agentcore project build
Actual behavior
CDK synthesis fails:
AgentCore CDK synthesis failed: Credential "MyOauthCredential" not found in deployed state
The generated CDK application resolves the target's credential reference only from .cli/deployed-state.json. That state cannot contain the credential before the first deployment.
The deploy path provisions credentials before calling build, so agentcore project deploy does not expose the same failure.
Expected behavior
A project whose resources reference other resources declared in the same project should synthesize before its first deployment. project build should not require deployed state for an in-project credential reference.
Suggested direction
Represent credential references symbolically during synthesis, or make the generated CDK application resolve credentials declared in the project without requiring deployed state. If this cannot be supported, project build should produce a targeted error and the project workflow should explicitly model the required credential provisioning phase.
Please add a regression test for a fresh project containing an OAuth credential and an MCP gateway target that references it.
- 主要言語
- TypeScript
- スター
- 291
- フォーク
- 96
- 平均マージ
- 21時間 31分
- マージ済み PR(30日)
- 217
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/agentcore-cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
aws/agentcore-cli#2395 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
aws/agentcore-cli#2392 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aws/agentcore-cli#2267 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/agentcore-cli#2258 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws/agentcore-cli#2176 ·
aws/agentcore-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
bcgov/bc-wallet-mobile#4761 · コメント 1 件 ·
-
external-issue to-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100