Communityコーディング&開発github.com

AgentCore デプロイ計画: シーケンス、クォータ、コマンド、ロールバック

Amazon Bedrock AgentCore インフラストラクチャのデプロイ計画とロールバック手順を提供し、ユーザーが実行する正確なコマンドを提示します。コマンド自体は実行しません。

AgentCore デプロイ計画: シーケンス、クォータ、コマンド、ロールバック とは?

このスキルは、Amazon Bedrock AgentCore リソースの Terraform デプロイ計画を立案し、ロールバック手順を提供するアドバイザー役です。AgentCore リソースを実際に管理するルートモジュール(または Terragrunt スタック)を特定し、立ち上げ順序(IAM ロール → ゲートウェイ、ランタイム、メモリ → ターゲットと戦略 → ログ配信)を指示します。また、初回適用で発生しやすい問題(IAM 伝搬、作成時のみのセマンティック検索、TRACES 配信前に必要な Transaction Search、古いプロバイダロック、リモートバックエンド未設定など)をフラグ付けし、公開クォータ(ゲートウェイあたりのターゲット数、ターゲットあたりのツール数)をチェックします。さらに、init/validate/plan-to-file/show -json/policy check/apply の各コマンド、適用後の確認、変更種別ごとのロールバック手順を出力します。調査結果は `DPL0xx` 帯のコードで報告され、コスト階層は `aws` として扱われます。このスキルはコマンドを一切実行せず、ユーザーが手動で実行するコマンドを表示するだけです。Claude Code などの AI エージェント環境で動作し、"ゲートウェイをデプロイして" "適用順序は?" "ロールバック方法は?" "クォータに抵触する?" といった指示に対して利用されます。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/alexaiarchitect/agentcore-skills/tree/HEAD/skills/agentcore-deploy

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

AgentCore のデプロイ: シーケンス、クォータ、コマンド、ロールバック

デプロイとは、このプラグインが行動を停止し、助言を開始する場面です。 Terraform はリソースを依存関係に基づいて自動的に順序付けますが、どのルートを計画すべきか、グラフの外部要因で初回適用時に何が失敗するか、後から変更できない設定は何か、そして元に戻す方法は何か、これらを教えてくれるわけではありません。 このスキルは何も書き込まず、何も実行しません。コマンドを表示し、ユーザーがそれらを実行します。

${CLAUDE_SKILL_DIR} はスキルランタイムによってこのスキル自身のディレクトリに設定されます。 以下のすべてのコマンドでそのまま使用してください。兄弟スキルのスクリプトは ${CLAUDE_SKILL_DIR}/../<skill>/scripts/ にあります。

フロー

  1. まずレビューする。 エラーの上にデプロイ計画を立てることは、エラーをデプロイする計画を立てることに等しいです。

    python3 ${CLAUDE_SKILL_DIR}/../agentcore-review/scripts/review.py <project>
    
  2. デプロイを計画する。

    python3 ${CLAUDE_SKILL_DIR}/scripts/deploy_plan.py <project>
    

    --root DIR は、検出されたルートがデプロイ対象でない場合に使用します(プロバイダ制約、ロック、リージョン、ステージはそのルートのものになります)。 --plan-file NAME、--json。 コマンドはプラグインを $AGENTCORE_PLUGIN として参照し、これは表示される setup 行によって設定されます。

  3. 報告する。 ルートモジュール、ステージ、DPL 調査結果、コマンド、ロールバックをこの順序で報告します。 コスト階層を明示します。これらのコマンドはユーザーのアカウントに課金可能なリソースを作成します。

  4. オプション: (1、推奨) ユーザーが init → validate → plan to file → show -json → ポリシーチェックを実行し、ポリシー出力を貼り付けます。 (2) それを読んだ後、ユーザーは その保存された計画ファイル を適用します。 各ステップは AskUserQuestion で確認し、1つのステップにまとめないでください。

  5. 確認する。 ユーザーが適用成功を報告したら、/agentcore:agentcore-verify に引き継ぎます。

DPL0xx 帯

Id重大度トリガー
DPL001warnリモートバックエンドがない(かつ Terragrunt もない)
DPL002error公開クォータ超過(ゲートウェイあたりのターゲット数、ターゲットあたりのツール数)
DPL003infoロールとゲートウェイを1回の適用で行う場合: IAM 伝搬が初回で失敗する可能性あり
DPL004infoセマンティック検索は作成時のみ有効
DPL005infoTerragrunt スタックの場合: コマンドは terragrunt を使用
DPL006warnhashicorp/aws が 6.55.0 未満でロックされている
DPL007infoTRACES 配信には事前に Transaction Search の有効化が必要
DPL008info選択されたルートに hashicorp/aws バージョン制約がない

判断ルール

  • 保存された計画ファイルを適用し、決して -auto-approve を使用しない。 ユーザーが読んだ計画が実行される計画です。
  • 適用前にポリシーチェック。 policy_check.py は、明示的な --allow-replace なしではメモリ、ゲートウェイ、認証情報プロバイダ、ユーザープールの削除を拒否します。
  • -target はロールバック用であり、初回デプロイには使用しない。 初回適用が IAM 伝搬で失敗した場合、同じ適用を再実行します。
  • ロールバックは破棄ではなく、元に戻すことによって行う。 ステートフルリソース(ユーザー、会話、シークレット)はロールバックの対象になりません。

リファレンス

質問ファイル
ステージ順序、初回適用で問題が発生する点、Terragruntapply-sequencing.md
デプロイ時に関連する AgentCore クォータquotas.md
変更種別ごとのロールバック、絶対に破棄してはいけないものrollback.md

スクリプト

コマンド処理内容終了コード
scripts/deploy_plan.py <project> [--root DIR] [--plan-file F] [--json]ルート、ステージ、DPL 調査結果、コマンド、ロールバック0 エラーなし、1 エラーあり、2 Terraform なし

完了チェックリスト

  • review.py が最初に実行され、そのエラーが解決されるかユーザーによって承認された。
  • deploy_plan.py が実行され、ルートモジュールがユーザーと確認された。
  • コマンドが引き渡される前に、コスト階層 (aws) が明示された。
  • ユーザーが適用前に plan → show -json → ポリシーチェックを実行した。
  • 保存された計画ファイルのみがユーザーによって適用され、アシスタントはコマンドを実行しなかった。
  • この変更に対するロールバックが適用前に明示された。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

alexaiarchitect/agentcore-skills

>- Put Amazon Bedrock AgentCore infrastructure behind a plan-only CI gate. Generates a GitHub Actions workflow that, on pull requests touching the infrastructure, runs the static AgentCore review (`ACR0xx`), `terraform fmt -check`, `init`, `validate`, a saved `plan` (Terraform or Terragrunt) with a read-only OIDC role, `show -json`, and the plan policy (`CI0xx`: no delete or replace of memories, gateways, credential providers, workload identities, user pools or tables without an explicit per-address allowance; no `*` on `*`; no gateway with `authorizer_type = NONE`; pinned MCP revisions), then uploads the plan JSON. Nothing in it applies. The plugin's stdlib-only library is vendored into `ci/agentcore/` so the job needs nothing from the plugin, and action pins are reused from the repository's own SHA-pinned workflows. `policy_check.py` also runs locally on any saved plan. Use when asked to "add CI for the AgentCore Terraform", "gate the plan", "block destructive changes", "policy check the plan", "plan on ...

alexaiarchitect/agentcore-skills

>- Estimate what Amazon Bedrock AgentCore will cost per month from a usage profile, line by line with the formula for each line, and put a budget and a usage alarm around it. Prices the published AgentCore rate card (Gateway invocations, search and tool indexing; Identity token requests, free through Runtime or Gateway; Runtime vCPU-hours billed only while active and GB-hours; Memory short-term events — per 1,000 events until 2026-10-05, per GB from 2026-10-06 — and long-term records and retrievals; Evaluations tokens), prices model tokens only at the user's own per-1,000 rates, and lists what it does not price (Lambda, API Gateway, CloudWatch, X-Ray, DynamoDB) so the total is never mistaken for the bill. Generates an AWS Budget filtered to AgentCore with forecast and actual alerts, plus a CloudWatch alarm on gateway invocations, as Terraform after a dry run. Findings are the `CST0xx` band. Use when asked "what will AgentCore cost", "estimate the gateway bill", "is there a free tier", "memory pricing chang...

alexaiarchitect/agentcore-skills

>- Scaffold Amazon Bedrock AgentCore resources as infrastructure as code: a Runtime (ECR repository, service role, `aws_bedrockagentcore_agent_runtime` with a JWT authorizer and lifecycle settings), a Gateway (role, JWT authorizer, pinned MCP revisions, one target), Identity (Cognito M2M client plus an OAuth2 credential provider with write-only secrets) or Memory (memory, strategies, customer-managed key). Terraform modules are the default and the recommendation; a TypeScript CDK stack with the `aws-bedrockagentcore` L1 constructs and the AgentCore CLI (`@aws/agentcore`) commands are offered for teams already on them. Every write is shown as a plan first (`--dry-run`), existing files are never overwritten without `--force`, and nothing is planned or applied. Use when asked to "create an AgentCore runtime", "scaffold a gateway", "add AgentCore memory", "write the Terraform for AgentCore", "start a new AgentCore stack", or "give me the CDK for this". Don't use for a gateway in front of an existing Lambda, HT...

alexaiarchitect/agentcore-skills

>- Inventory a project for Amazon Bedrock AgentCore work and report before advising. Finds existing AgentCore resources and which tool owns them (Terraform `aws_bedrockagentcore_*`/`awscc_*`, CDK constructs, the AgentCore CLI's `agentcore.json`, the deprecated starter toolkit's `.bedrock_agentcore.yaml`, boto3 `bedrock-agentcore` clients, the AgentCore Python SDK and `@requires_access_token`), the agent framework (Strands, LangGraph, LangChain, Claude Agent SDK, CrewAI, OpenAI Agents, ADK, raw), MCP servers and the API Gateway routes and Lambdas behind `/mcp`, Cognito pools, clients and JWT authorizers, the AWS region and per-service availability there, the hashicorp/aws constraint and lock, Terragrunt, and Lambda tracing. Read-only; findings are the `DSC0xx` band. Use when asked "what do I have", "is this on AgentCore", "inventory this repo", "which region are we in", "is AgentCore available in eu-central-1", "what framework is this agent", or before any other AgentCore skill on an unfamiliar project. Don...

関連スキル