AWS サーバーレスアプリケーション向けの SAM(Serverless Application Model)および AWS CDK(クラウドインフラの定義ツール)を使ったデプロイに対応しています。 **次のような場合に使用:** - SAM の使用、SAM テンプレート、SAM init、SAM deploy に関する質問 - CDK サーバーレス、CDK Lambda コンストラクト(部品)、NodejsFunction、PythonFunction に関する質問 - SAM と CDK を組み合わせた使い方や、サーバーレス CI/CD パイプライン(自動構築・デプロイの流れ)に関する質問 **注:** サービスを選んだうえで汎用的なアプリケーションをデプロイする場合は、代わりに deploy-on-aws プラグインを使用してください。
AWS SAM and AWS CDK deployment for serverless applications. Triggers on phrases like: use SAM, SAM template, SAM init, SAM deploy, CDK serverless, CDK Lambda construct, NodejsFunction, PythonFunction, SAM and CDK together, serverless CI/CD pipeline. For general app deployment with service selection, use deploy-on-aws plugin instead.
SAM または CDK を使用して、サーバーレスアプリケーションを AWS にデプロイします。 このスキルは、プロジェクトのスキャフォールディング、IaC テンプレート、CDK コンストラクトとパターン、デプロイメントワークフロー、CI/CD パイプライン、および SAM/CDK の共存について扱います。
Lambda のランタイム動作、イベントソース、オーケストレーション、オブザーバビリティ、および最適化については、aws-lambda スキル を参照してください。
ユーザーの作業内容に応じて、適切なリファレンスファイルを読み込んでください:
sam_init を使用するGlobals セクションに設定するsamconfig.toml の環境別セクションを使用するsam build --use-container を使用する!Ref、!GetAtt、!Sub を使用することgrant* メソッドを優先するcdk.context.json をバージョン管理にコミットする — VPC/AZ のルックアップをキャッシュし、シンセサイズを決定論的にするaws-cdk-lib/assertions でユニットテストを記述し、ステートフルなリソースの論理 ID をアサートして意図しない置き換えを検出するcdk diff を使用して変更内容を確認するthis.account および this.region を使用することcdk deploy を直接使用するcdk bootstrap をスキップする — CDK ツールキットスタックがなければデプロイメントは失敗するこのスキルを使用するには、ホストマシンに AWS 認証情報が設定されている必要があります:
アクセスの確認: aws sts get-caller-identity を実行して、認証情報が有効であることを確認する
確認: sam --version を実行する
sam_local_invoke およびコンテナベースのビルドに必要docker --version や finch --version など、適切なコマンドを実行する書き込みアクセスはデフォルトで有効です。
このプラグインは .mcp.json に --allow-write を設定した状態で提供されるため、MCP サーバーはユーザーに代わってプロジェクトの作成、IaC の生成、およびデプロイを行うことができます。
機密データ(Lambda や API Gateway のログなど)へのアクセスは、デフォルトでは有効になっていません。
有効にするには、.mcp.json に --allow-sensitive-data-access を追加してください。
このプラグインには、template.yaml または template.yml への編集後に自動的に sam validate を実行する PostToolUse フックが含まれています。
バリデーションが失敗した場合、エラーはシステムメッセージとして返されるため、即座に修正できます。
このフックには SAM CLI と jq のインストールが必要です。いずれかが不足している場合、バリデーションはスキップされ、システムメッセージが表示されます。
ユーザーは /hooks から無効化できます。
確認: jq --version を実行する
デフォルト: CDK
上書きの構文:
指定がない場合は、常に CDK を使用すること
デフォルト: TypeScript
上書きの構文:
指定がない場合は、常に TypeScript を使用すること
Deploy serverless applications to AWS using SAM or CDK. This skill covers project scaffolding, IaC templates, CDK constructs and patterns, deployment workflows, CI/CD pipelines, and SAM/CDK coexistence.
For Lambda runtime behavior, event sources, orchestration, observability, and optimization, see the aws-lambda skill.
Load the appropriate reference file based on what the user is working on:
sam_init with an appropriate template for your use caseGlobals sectionsamconfig.toml environment-specific sections for multi-environment deploymentssam build --use-container when native dependencies are involved!Ref, !GetAtt, and !Subgrant* methods over L1 and raw IAM statementscdk.context.json to version control — it caches VPC/AZ lookups for deterministic synthesisaws-cdk-lib/assertions; assert logical IDs of stateful resources to detect accidental replacementscdk diff in CI before every deployment to review changesthis.account and this.regioncdk deploy directly in production without a pipelinecdk bootstrap — deployments will fail without the CDK toolkit stackThis skill requires that AWS credentials are configured on the host machine:
Verify access: Run aws sts get-caller-identity to confirm credentials are valid
Verify: Run sam --version
sam_local_invoke and container-based buildsdocker --version or finch --versionWrite access is enabled by default. The plugin ships with --allow-write in .mcp.json, so the MCP server can create projects, generate IaC, and deploy on behalf of the user.
Access to sensitive data (like Lambda and API Gateway logs) is not enabled by default. To grant it, add --allow-sensitive-data-access to .mcp.json.
This plugin includes a PostToolUse hook that runs sam validate automatically after any edit to template.yaml or template.yml. If validation fails, the error is returned as a system message so you can fix it immediately. The hook requires SAM CLI and jq to be installed; if either is missing, validation is skipped with a system message. Users can disable it via /hooks.
Verify: Run jq --version
Default: CDK
Override syntax:
When not specified, ALWAYS use CDK
Default: TypeScript
Override syntax:
When not specified, ALWAYS use TypeScript
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。