Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
awslabs avatar

Aws Serverless Deployment

  • 130 installs
  • 850 repo stars
  • Updated August 3, 2026
  • awslabs/agent-plugins

AWS SAM and CDK serverless deployment skill for scaffolding, IaC, constructs, and CI/CD pipelines.

About

AWS serverless deployment skill covering SAM and CDK paths with reference files for project setup, Lambda constructs, serverless patterns, and coexistence. SAM guidance includes sam_init templates, Globals defaults, samconfig.toml environments, and container builds. CDK guidance favors TypeScript L2 constructs, grant methods, stack separation for stateful resources, cdk.context.json commits, assertions tests, and cdk diff in CI. Requires AWS CLI credentials, SAM CLI, Docker for local invoke, and optional AWS Serverless MCP with write access. Includes PostToolUse sam validate hook on template edits. Default framework is CDK with override syntax. Routes Lambda runtime behavior to the aws-lambda skill and general app deployment to deploy-on-aws.

  • SAM and CDK deployment with dedicated reference files per concern
  • SAM: sam_init, Globals, samconfig.toml, container builds, validate hook
  • CDK: TypeScript L2 constructs, stack separation, assertions tests, cdk diff in CI
  • AWS Serverless MCP write access for project creation and deploy
  • Default CDK with SAM/CDK coexistence and migration references

Aws Serverless Deployment by the numbers

  • 130 all-time installs (skills.sh)
  • Ranked #494 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
At a glance

aws-serverless-deployment capabilities & compatibility

Capabilities
scaffold sam project · scaffold cdk project · deploy serverless stack · configure cicd pipeline · validate sam template
Works with
aws · docker
Use cases
ci cd · devops · api development
Runs
Remote server
From the docs

What aws-serverless-deployment says it does

Deploy serverless applications to AWS using SAM or CDK.
SKILL.md
Default: CDK
SKILL.md
npx skills add https://github.com/awslabs/agent-plugins --skill aws-serverless-deployment

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs130
repo stars850
Last updatedAugust 3, 2026
Repositoryawslabs/agent-plugins

How do I deploy a serverless app to AWS with SAM or CDK?

Deploy serverless applications to AWS using SAM or CDK with scaffolding, IaC templates, constructs, CI/CD pipelines, and SAM/CDK coexistence patterns.

Who is it for?

Developers deploying Lambda, API Gateway, EventBridge, DynamoDB, or SQS serverless stacks on AWS.

Skip if: General non-serverless app deployment (use deploy-on-aws) or Lambda runtime debugging alone.

When should I use this skill?

User mentions SAM template, sam deploy, CDK Lambda construct, NodejsFunction, or serverless CI/CD pipeline.

What you get

Serverless project scaffolded, validated, and deployed with environment-specific configuration and CI safeguards.

Files

SKILL.mdMarkdownGitHub ↗

AWS Serverless Deployment

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.

When to Load Reference Files

Load the appropriate reference file based on what the user is working on:

  • SAM project setup, templates, deployment workflow, local testing, or container images -> see references/sam-project-setup.md
  • CDK project setup, constructs, CDK testing, or CDK pipelines -> see references/cdk-project-setup.md
  • CDK Lambda constructs, NodejsFunction, PythonFunction, or CDK Function -> see references/cdk-lambda-constructs.md
  • CDK serverless patterns, API Gateway CDK, Function URL CDK, EventBridge CDK, DynamoDB CDK, or SQS CDK -> see references/cdk-serverless-patterns.md
  • SAM and CDK coexistence, migrating from SAM to CDK, or using sam build with CDK -> see references/sam-cdk-coexistence.md

Best Practices

SAM

  • Do: Use sam_init with an appropriate template for your use case
  • Do: Set global defaults for timeout, memory, runtime, and tracing in the Globals section
  • Do: Use samconfig.toml environment-specific sections for multi-environment deployments
  • Do: Use sam build --use-container when native dependencies are involved
  • Don't: Copy-paste templates from the internet without understanding the resource configuration
  • Don't: Hardcode resource ARNs or account IDs in templates — use !Ref, !GetAtt, and !Sub

CDK

  • Do: Use TypeScript — type checking catches errors at synthesis time, before any AWS API calls
  • Do: Prefer L2 constructs and grant* methods over L1 and raw IAM statements
  • Do: Separate stateful and stateless resources into different stacks; enable termination protection on stateful stacks
  • Do: Commit cdk.context.json to version control — it caches VPC/AZ lookups for deterministic synthesis
  • Do: Write unit tests with aws-cdk-lib/assertions; assert logical IDs of stateful resources to detect accidental replacements
  • Do: Use cdk diff in CI before every deployment to review changes
  • Don't: Hardcode account IDs or region strings — use this.account and this.region
  • Don't: Use cdk deploy directly in production without a pipeline
  • Don't: Skip cdk bootstrap — deployments will fail without the CDK toolkit stack

Configuration

AWS CLI Setup

This skill requires that AWS credentials are configured on the host machine:

Verify access: Run aws sts get-caller-identity to confirm credentials are valid

SAM CLI Setup

Verify: Run sam --version

Container Runtime Setup

1. Install a Docker compatible container runtime: Required for sam_local_invoke and container-based builds 2. Verify: Use an appropriate command such as docker --version or finch --version

AWS Serverless MCP Server

Write 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.

SAM Template Validation Hook

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

IaC framework selection

Default: CDK

Override syntax:

  • "use CloudFormation" → Generate YAML templates
  • "use SAM" → Generate YAML templates

When not specified, ALWAYS use CDK

Language selection for CDK

Default: TypeScript

Override syntax:

  • "use Python" → Generate Python code
  • "use JavaScript" → Generate JavaScript code

When not specified, ALWAYS use TypeScript

Error Scenarios

Serverless MCP Server Unavailable

  • Inform user: "AWS Serverless MCP not responding"
  • Ask: "Proceed without MCP support?"
  • DO NOT continue without user confirmation

Resources

Related skills

FAQ

SAM or CDK by default?

Default framework is CDK; override syntax is documented in the skill for SAM-first workflows.

What runs after editing template.yaml?

A PostToolUse hook runs sam validate automatically; fix errors from the returned system message.

Where is Lambda runtime behavior documented?

See the aws-lambda skill for event sources, orchestration, observability, and optimization.

DevOps & CI/CDdeployinfra

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.