Skip to content

opensite-ai/opensite-skills / aws-serverless

aws-serverless

Verified

Routes serverless requests to a compute form factor and the skill that owns it. Applies first to Lambda, API Gateway, EventBridge, Step Functions and event-driven work while the compute, orchestration or integration choice is open — API backends, webhooks, jobs, cron, queue/stream consumers, durable workflows, event routing, Step Functions vs Durable Functions, and Pipes vs native event source mappings for queues and streams. Decides Event Functions on-demand vs Managed Instances, Web Functions, MicroVMs, EventBridge rules/Scheduler/Pipes/bus, HTTP vs REST API. Owns shared Lambda references (cold starts, SnapStart, concurrency, event sources, function URLs, throttling, troubleshooting). Defers to the specialized skill once a request commits to one form factor or service, or describes its defining feature, even unnamed (durable checkpointing and automatic step retries, Firecracker sandbox, managed instances, Node.js server). Not for EC2, ECS/EKS/Fargate or Amplify hosting.

references/deployment.md

View on GitHub
# Deployment Reference

Serverless-specific resource types and fast-iteration tools. For step-by-step deployment procedures (custom domain REST API, API Gateway stages, connecting Lambda to API Gateway/DynamoDB), use the specialized skills in SKILL.md's routing table.

## Contents

- [SAM resource types](#sam-resource-types)
- [SAM Globals section](#sam-globals-section)
- [CDK serverless constructs](#cdk-serverless-constructs)
- [Fast iteration](#fast-iteration)

---

## SAM resource types

SAM templates extend CloudFormation with `Transform: AWS::Serverless-2016-10-31`. Only `Transform` and `Resources` are required.

| Resource Type | Purpose |
|---|---|
| `AWS::Serverless::Function` | Lambda + IAM role + event source mappings |
| `AWS::Serverless::HttpApi` | HTTP API (API Gateway v2) — recommended |
| `AWS::Serverless::Api` | REST API (v1) — WAF, usage plans, request validation |
| `AWS::Serverless::SimpleTable` | DynamoDB with minimal config |
| `AWS::Serverless::LayerVersion` | Lambda layer |
| `AWS::Serverless::StateMachine` | Step Functions state machine |
| `AWS::Serverless::Connector` | Simplified permissions between resources |
| `AWS::Serverless::Application` | Nested serverless application (SAR or local) |
| `AWS::Serverless::GraphQLApi` | AppSync GraphQL API |
| `AWS::Serverless::WebSocketApi` | WebSocket API (API Gateway v2) |
| `AWS::Serverless::CapacityProvider` | Lambda Managed Instances on customer-owned EC2 |

---

## SAM Globals section

Eliminates duplication across functions/APIs. Supported types: `Function`, `Api`, `HttpApi`, `SimpleTable`, `StateMachine`, `CapacityProvider`.

**Override rules:**

| Type | Behavior |
|---|---|
| Primitives (string, number, boolean) | Resource value **replaces** global |
| Maps (dictionaries) | **Merged** — resource keys override matching global keys |
| Lists (arrays) | Global entries **prepended** to resource entries |

---

## CDK serverless constructs

Prefer L2 constructs — they provide sensible defaults and least-privilege IAM via `grant*` methods.

| Construct | Module | Use for |
|---|---|---|
| `NodejsFunction` | `aws-cdk-lib/aws-lambda-nodejs` | Node.js/TypeScript — bundles with esbuild automatically |
| `PythonFunction` | `@aws-cdk/aws-lambda-python-alpha` | Python — requires Docker for bundling |
| `HttpApi` | `aws-cdk-lib/aws-apigatewayv2` | HTTP API with CORS, JWT auth |
| `HttpLambdaIntegration` | `aws-cdk-lib/aws-apigatewayv2-integrations` | Connect Lambda to HttpApi |

---

## Fast iteration

Both tools are **development-only** — they bypass CloudFormation safety and introduce drift. Use `sam deploy` or CI/CD for production.

### SAM Accelerate

```bash
sam sync --watch --stack-name my-stack                            # Watch mode — auto-syncs on save
sam sync --code --watch --stack-name my-stack                     # Code-only (minimal sync time)
sam sync --code --resource-id MyFunction --watch --stack-name my-stack  # Single function
```

Code changes sync via service APIs in seconds. Infrastructure changes trigger CloudFormation (slower, automatic).

### CDK hotswap / watch

```bash
cdk deploy --hotswap           # Direct resource update, skips non-hotswappable
cdk deploy --hotswap-fallback  # Hotswap with CloudFormation fallback
cdk watch                      # Watch mode (hotswap + file watching)
```

Hotswap supports: Lambda code/config/versions/aliases, Step Functions definitions, ECS images, S3 deployments, CodeBuild projects, AppSync resolvers/functions/schemas.

### Comparison

| Feature | SAM Sync | CDK Hotswap |
|---|---|---|
| Watch mode | `sam sync --watch` | `cdk watch` |
| Code-only sync | `sam sync --code` | `cdk deploy --hotswap` |
| Fallback to full deploy | Automatic | `--hotswap-fallback` |
| Selective resource sync | `--resource-id` | Not supported |
| Code change speed | Seconds | Seconds |
| Production safe | **No** | **No** |
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall