Skip to content
Skills Library
DevOps & cloud · Building & coding

aws-sam-bootstrap

/aws-sam-bootstrap

Provides AWS SAM bootstrap patterns: generates `template.yaml` and `samconfig.toml` for new projects via `sam init`, creates SAM templates for existing Lambda/CloudFormation code migration, validates build/package/deploy workflows, and configures local testing with `sam local invoke`. Use when the user asks about SAM projects, `sam init`, `sam deploy`, serverless deployments, or needs to bootstrap/migrate Lambda functions with SAM templates.

Licence
MIT
Last repository change
10.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 10.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Provides AWS SAM bootstrap patterns: generates `template.yaml` and `samconfig.toml` for new projects via `sam init`, creates SAM templates for existing Lambda/CloudFormation code migration, validates build/package/deploy workflows, and configures local testing with `sam local invoke`. Use when the user asks about SAM projects, `sam init`, `sam deploy`, serverless deployments, or needs to bootstrap/migrate Lambda functions with SAM templates.

Original author description

Provides AWS SAM bootstrap patterns: generates `template.yaml` and `samconfig.toml` for new projects via `sam init`, creates SAM templates for existing Lambda/CloudFormation code migration, validates build/package/deploy workflows, and configures local testing with `sam local invoke`. Use when the user asks about SAM projects, `sam init`, `sam deploy`, serverless deployments, or needs to bootstrap/migrate Lambda functions with SAM templates.

How it works

  1. Overview
  2. When to Use
  3. Instructions
  4. Examples
  5. Best Practices
  6. Constraints and Warnings
Original SKILL.md headings · 97 lines, 432 words
SKILL.md preview
---
name: aws-sam-bootstrap
description: "Provides AWS SAM bootstrap patterns: generates `template.yaml` and `samconfig.toml` for new projects via `sam init`, creates SAM templates for existing Lambda/CloudFormation code migration, validates build/package/deploy workflows, and configures local testing with `sam local invoke`. Use when the user asks about SAM projects, `sam init`, `sam deploy`, serverless deployments, or needs to bootstrap/migrate Lambda functions with SAM templates."
allowed-tools: Read, Write, Bash
---

# AWS SAM Bootstrap

## Overview

Generates SAM project artifacts for greenfield and migration scenarios. Creates the minimum required files (`template.yaml`, `samconfig.toml`, `events/`), validates with `sam build`, and configures `sam deploy` workflows following AWS SAM conventions.

## When to Use

- User needs to start a new AWS SAM project (`sam init`, `sam deploy`)
- User wants to migrate existing Lambda functions or CloudFormation resources to SAM templates
- User asks about SAM CLI commands (`sam init`, `sam build`, `sam local invoke`, `sam deploy`)
- User needs to create or update `template.yaml` or `samconfig.toml` for serverless deployments
- User wants to configure local testing with `sam local invoke` for Lambda functions

## Instructions

### 1) Classify Scenario

- **New project**: no Lambda structure exists. Run `sam init` to scaffold.
- **Existing project migration**: Lambda/CloudFormation resources exist. Create `template.yaml` manually.

### 2) Select Runtime and Package Type

Use current non-deprecated runtimes. Package type: **Zip** (default) or **Image** (container/native deps).

### 3) Bootstrap New Projects

```bash
sam init
sam build
sam local invoke <LogicalFunctionId> -e events/event.json
sam deploy --guided
```

### 4) Bootstrap Existing Projects

1. Inspect current Lambda handlers, runtime, and dependency layout
2. Create `template.yaml` with `Transform: AWS::Serverless-2016-10-31`
3. Map existing resources to `AWS::Serverless::Function` and related SAM resources
4. Create `samconfig.toml` with deploy defaults and environment overrides
5. Add `events/event.json` payload samples for local invocation
6. Validate with `sam validate` and `sam build` before deploy

### 5) Required Artifacts

```
.
├── template.yaml
├── samconfig.toml
└── events/
    └── event.json
```

See reference templates: [examples.md](references/examples.md), [migration-checklist.md](references/migration-checklist.md)

### 6) Validation Checklist

- `sam validate` succeeds
- `sam build` succeeds
- `template.yaml` has correct logical IDs and handlers
- `samconfig.toml` contains deploy parameters for target environments

## Examples

### New SAM Project

```bash
sam init  # Interactive scaffold
sam build
sam local invoke HelloFunction -e events/event.json
sam deploy --guided
```

### Migrate Existing Lambda

1. Detect handler/runtime → create `template.yaml` with SAM transform
2. Add `samconfig.toml` with `stack_name`, `capabilities`, `resolve_s3`
3. Add `events/event.json` → validate with `sam build`

Full templates in [references/examples.md](references/examples.md).

## Best Practices

- One deployable function first, then expand; keep migration-first PRs minimal
- Keep `samconfig.toml` committed for deterministic deployments
- Use environment-specific sections (`[default]`, `[prod]`) instead of CLI flags
- Map existing handler paths to SAM conventions during migration

## Constraints and Warnings

- SAM CLI must be installed locally for command execution
- `CAPABILITY_IAM` is required when IAM resources are created
- Container image packaging requires Docker availability
- Existing projects may require refactoring handler paths to match SAM conventions
- `sam deploy --guided` writes local configuration; review before committing
Files in this package (3)
  • SKILL.md 4 KB
  • references/examples.md 3 KB
  • references/migration-checklist.md 1 KB

Versions

The database has no other skills named aws-sam-bootstrap.

Database snapshot: 13.11.2026 · package version 8ae1f910be66 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90aws-serverless-deployment
    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…
  • 100aws-sam-local-testing
    Wraps AWS SAM (Serverless Application Model) Local CLI for testing Lambda functions locally: `sam local invoke` (single invocation with event payload), `sam local start-api` (local API Gateway emulator), `sam local start-lambda` (local Lambda invoke endpoint for AWS SDK…
  • 100sam-template-builder
    Build sam template builder operations. Auto-activating skill for AWS Skills. Triggers on: sam template builder, sam template builder Part of the AWS Skills skill category. Use when working with sam template builder functionality. Trigger with phrases like "sam template builder",…
  • 100aws-sam-local-testing
    Use when AWS Lambda functions with API Gateway need testing locally: sam local invoke with event payloads, start-api for a local API Gateway, start-lambda for SDK clients and generate-event, plus .NET Lambda handler tests with Amazon.Lambda.TestUtilities.
  • 90aws-serverless
    Use when implementing production serverless workloads on AWS — writing Lambda handler code, wiring API Gateway / DynamoDB Streams / SQS / SNS event-driven flows, SAM or CDK deployment, or fixing cold starts. Triggers: 'write a Lambda function', 'SAM template', 'API Gateway +…
  • 100aws-lambda
    AWS Lambda runs your code on demand without servers, scaling from zero to thousands of concurrent executions and billing per invocation. Use this skill to build Lambda functions in Node.js or Python behind API Gateway, S3, SQS or DynamoDB triggers, define them with AWS SAM,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.