feat(aws-serverless): add aws-serverless plugin#52
Conversation
aws-serverless-deployment skills Add the aws-serverless plugin with two new skills, MCP server configuration, SAM template validation hook, and marketplace entry. - aws-lambda: Lambda runtime behavior, event sources, EventBridge, Step Functions, orchestration, observability, optimization, and troubleshooting - aws-serverless-deployment: SAM and CDK project setup, CDK constructs and patterns, CI/CD pipelines, and SAM/CDK coexistence Also adds the aws-serverless MCP server (.mcp.json), a SAM template validation hook, and updates the marketplace registry. Based on https://github.com/gunnargrosch/aws-serverless-plugin
Add the aws-lambda-durable-functions skill to the aws-serverless plugin with getting started guide, checkpoint-replay model, testing guidance, advanced patterns, and error handling references.
plugins/aws-serverless/skills/aws-serverless-deployment/SKILL.md
Outdated
Show resolved
Hide resolved
plugins/aws-serverless/skills/aws-serverless-deployment/SKILL.md
Outdated
Show resolved
Hide resolved
plugins/aws-serverless/skills/aws-serverless-deployment/references/sam-project-setup.md
Outdated
Show resolved
Hide resolved
plugins/aws-serverless/skills/aws-serverless-deployment/references/cdk-serverless-patterns.md
Show resolved
Hide resolved
plugins/aws-serverless/skills/aws-serverless-deployment/references/cdk-project-setup.md
Outdated
Show resolved
Hide resolved
plugins/aws-serverless/skills/aws-serverless-deployment/references/cdk-project-setup.md
Outdated
Show resolved
Hide resolved
plugins/aws-serverless/skills/aws-serverless-deployment/references/cdk-project-setup.md
Outdated
Show resolved
Hide resolved
- Remove sensitive data access flags from MCP server configuration - Add --lint flag to SAM template validation for stricter checks - Update validation messages to reflect linting improvements - Reorganize SKILL.md with clearer onboarding steps and prerequisites - Refine skill description to focus on core capabilities - Add advanced-error-handling.md reference guide for timeout and circuit breaker patterns - Update reference file routing to include advanced error handling scenarios - Consolidate guidelines into onboarding section for better user flow - Improve documentation structure for better discoverability
… requirements - Split Powertools documentation into dedicated reference file (powertools.md) - Update SKILL.md routing to direct Powertools queries to new dedicated reference - Update observability.md link to point to powertools.md instead of optimization.md - Clarify Python runtime requirements for durable functions (3.11+ minimum, 3.13+ for Lambda pre-installed SDK)
|
My feedback (in addition to previous comments from other reviewers which need to be resolved):
|
- Move troubleshooting production executions content to dedicated troubleshooting-executions.md reference file - Set language and IaC framework defaults including override syntax - Add error scenario handling for unsupported languages and frameworks - Remove inline troubleshooting agent instructions from main SKILL.md for better modularity - Consolidate advanced error handling references to separate advanced-error-handling.md file - Update plugin version from 1.1.0 to 1.0.0
|
Thanks for the feedback @krokoko, I've pushed adjustments for all of it |
|
Thank you ! Left
|
- Add aws-serverless plugin to CODEOWNERS with appropriate team assignments - Add aws-serverless plugin to main README.md plugin table with feature description - Simplify AWS CLI setup instructions and remove redundant steps - Separate SAM CLI and container runtime setup into distinct sections - Update container runtime documentation to mention alternatives - Clarify MCP server default security posture and flag requirements in Lambda skill
Signed-off-by: Alain Krok <alkrok@amazon.com>
krokoko
left a comment
There was a problem hiding this comment.
Minor edits can be added but no blocker for a first release
Code Review -- PR #52
|
| File | Stated Version |
|---|---|
aws-lambda/references/getting-started.md |
Python 3.14+ |
aws-lambda/references/orchestration-and-workflows.md |
Python 3.13+ |
aws-lambda-durable-functions/SKILL.md |
Python 3.11+ (SDK min), 3.13+ (pre-installed) |
Python 3.14 is not yet GA. A user reading getting-started.md is told they need a runtime that does not exist.
Fix: standardize on "Python 3.13+" (pre-installed in Lambda runtime) across all files.
4. SAM template output references non-existent logical resource DurableFunctionAlias
The SAM template example uses AutoPublishAlias: prod, which causes SAM to generate an alias with the logical ID DurableFunctionAliasProd (convention: <FunctionLogicalId>Alias<AliasName>). The Outputs section references !Ref DurableFunctionAlias, which does not exist. Users deploying this template get a CloudFormation failure.
Fix: change the SAM Outputs to !Ref DurableFunctionAliasProd or remove the Outputs section from the SAM example.
Important Issues (7)
5. IAM action name inconsistency: singular vs plural CheckpointDurableExecution(s)
aws-lambda/SKILL.md uses the singular form lambda:CheckpointDurableExecution. aws-lambda-durable-functions/SKILL.md and deployment-iac.md use the plural lambda:CheckpointDurableExecutions. Only one is the real IAM action -- the wrong one silently fails in IAM policies.
6. nodejs24.x / python3.14 runtimes in deployment-iac.md may not exist yet
All CloudFormation, SAM, and CDK examples in deployment-iac.md use nodejs24.x, python3.14, NODEJS_24_X, and PYTHON_3_14. These are forward-looking runtimes/CDK enums that may not be available in Lambda or aws-cdk-lib. Users deploying as-is will get InvalidParameterValueException.
7. Lambda burst scaling rate conflict: 1,000 vs 500 per 10 seconds
aws-lambda/SKILL.md (Lambda Limits table) says 1,000 new executions per 10s. aws-lambda/references/troubleshooting.md says 500 per 10s. These are in the same skill.
8. step-functions-testing.md not reachable from SKILL.md
The file exists but is not listed in the "When to Load Reference Files" router in aws-lambda/SKILL.md. An agent will only find it by first loading step-functions.md and following an internal link.
9. No timeout in .mcp.json
The existing deploy-on-aws plugin sets "timeout": 120000. Without a timeout, uvx package download or MCP tool calls can hang indefinitely, blocking the user's session.
10. Hook timeout of 30s may be too short
sam validate --lint on first invocation downloads the cfn-lint schema cache, which can exceed 30s. A timeout results in no validation output (neither success nor failure).
11. jq failure on the error-reporting path (line 32) loses validation output
If jq fails when formatting the sam validate error output, set -euo pipefail aborts the script and the actual validation error message is lost. A fallback should be added.
Suggestions (6)
12. 23 of 27 reference files exceed the 100-line guideline in DESIGN_GUIDELINES.md (up to 559 lines). Consider splitting for context window efficiency.
13. The hooks field in aws-lambda-durable-functions/SKILL.md frontmatter is not in skill-frontmatter.schema.json. Verify the skill runtime processes it; if not, the replay model violation reminders silently never fire.
14. The circuit breaker example in advanced-error-handling.md uses closure mutations (failureCount, lastFailureTime) that violate the replay model rules documented in the same PR. Add a caveat or refactor.
15. MCP configuration sections are duplicated across all 3 SKILL.md files. Consider a shared reference file to prevent drift.
16. Verify SDK package names (@aws/durable-execution-sdk-js, aws-durable-execution-sdk-python, etc.) exist on npm/PyPI before merge.
17. Silent exit 0 when SAM CLI is missing gives no user feedback. Consider returning a system message: "SAM CLI not found -- template validation skipped.".
Strengths
- Well-separated skills with clear cross-referencing between them
- Replay model rules documentation is outstanding (paired WRONG/CORRECT examples in TypeScript and Python)
- Production-ready event sources guide with real-world warnings (recursive S3 triggers, URL-decoding)
- Progressive disclosure via "When to Load Reference Files" routing tables
- Honest orchestration comparison (durable functions vs Step Functions)
- All three SKILL.md files within the 300-line limit
- Proper defensive shell scripting (
set -euo pipefail, exit code capture, file existence check) - Complete MCP unavailability error handling in all skills
Generated with Claude Code
If this review was useful, please react with 👍. Otherwise, react with 👎.
scottschreckengaust
left a comment
There was a problem hiding this comment.
Review critical issues
- Fix IAM permission name from `CheckpointDurableExecutions` to `CheckpointDurableExecution` - Update MCP server configuration flag from `--allow write` to `--allow-write` for consistency - Increase validation script timeout from 30s to 120s and MCP server timeout to 120000ms - Add jq dependency check to validate-template.sh with graceful fallback message - Improve SAM CLI validation error handling with fallback JSON formatting - Add circuit breaker replay model caveat to advanced error handling documentation - Fix CloudFormation reference from `DurableFunctionAlias` to `DurableFunction.Alias` - Add Step Functions testing reference to Lambda skill navigation guide - Enhance error messages for missing dependencies and validation failures
…fication - Remove PostToolUse hooks from aws-lambda-durable-functions SKILL.md that provided replay model reminders - Update getting-started.md to remove hardcoded docker --version check - Replace Docker requirement with flexible container runtime verification (Docker, Finch, Podman, etc.) - Simplify credential setup instructions to be more concise
|
Thanks @scottschreckengaust for your thorough review. I've pushed fixes for all findings except
|
- Condense advanced error handling patterns with concise implementation approaches - Streamline advanced patterns documentation with focused guidance - Simplify error handling reference with key considerations - Update step operations documentation for clarity - Refactor testing patterns reference for better readability - Consolidate troubleshooting executions guide - Simplify wait operations documentation - Update orchestration and workflows reference in main Lambda skill - Remove verbose code examples in favor of pattern descriptions and implementation approaches - Normalize marketplace tags from hyphenated to space-separated format - Fix heading hierarchy in durable functions SKILL.md - Reorder CODEOWNERS entries alphabetically - Update Python code examples with proper imports and corrected API usage patterns - Improve code consistency and readability across durable functions documentation
…erns - Fix error property reference in testing-patterns.md from `getError()?.message` to `getError()?.errorMessage` - Update aws-serverless-deployment description to include "use SAM" trigger phrase - Clarify Python SDK differences from TypeScript for durable functions implementation
OOTO and changes were implemented
* main: fix(lint): pretty up JSON (awslabs#62) chore(deps): update github-actions: Bump actions/upload-artifact (awslabs#80) chore(deps): update github-actions: Bump actions/download-artifact (awslabs#81) chore(deps): update github-actions: Bump actions/dependency-review-action (awslabs#83) feat(aws-serverless): add aws-serverless plugin (awslabs#52) docs: remove dead references to .claude/docs/ files that were never committed (awslabs#78) # Conflicts: # .claude-plugin/marketplace.json # README.md
Summary
Related RFC: #48
aws-serverlessplugin with three skills, MCP server configuration, SAM template validation hook, and marketplace entryChanges
Plugin infrastructure:
plugin.jsonandmarketplace.jsonentry for theaws-serverlessplugin.mcp.jsonforawslabs.aws-serverless-mcp-server(SAM CLI tools, event source mappings, webapp deployment, metrics, schemas)hooks/hooks.json+scripts/validate-template.shfor automaticsam validateon template editsSkill —
aws-lambda(9 reference files):getting-started.md— project type decision tree, prerequisites, working with existing projectsevent-sources.md— DynamoDB Streams, Kinesis, SQS, Kafka, S3, SNS configurationevent-driven-architecture.md— EventBridge bus setup, event patterns, Pipes, archive and replayorchestration-and-workflows.md— orchestration approach comparison, durable functions vs Step Functionsstep-functions.md— Standard vs Express, ASL, JSONata, SDK integrations, Distributed Map, testingweb-app-deployment.md— Lambda Web Adapter, API endpoints, CORS, authentication, custom domainsobservability.md— structured logging, tracing, metrics, alarms, dashboardsoptimization.md— cold starts, memory tuning, cost, streaming, Powertoolstroubleshooting.md— common errors, debugging, deployment failuresSkill —
aws-serverless-deployment(5 reference files):sam-project-setup.md— SAM templates, deployment workflow, local testing, container imagescdk-project-setup.md— CDK setup, construct levels, IAM grants, stack separation, testing, pipelinescdk-lambda-constructs.md— NodejsFunction, PythonFunction, base Function construct examplescdk-serverless-patterns.md— API Gateway, Function URL, EventBridge, DynamoDB, SQS CDK patternssam-cdk-coexistence.md— incremental migration, usingsam buildwith CDK templatesSkill —
aws-lambda-durable-functions(9 reference files, by @bfreiberg):getting-started.md— SDK installation, basic handler pattern, ESLint/Jest setupreplay-model-rules.md— determinism rules, non-deterministic code handlingstep-operations.md— atomic operations, retry logic, step semanticswait-operations.md— delays, callbacks, external system integration, pollingconcurrent-operations.md— parallel execution, map operations, batch processingerror-handling.md— retry strategies, saga pattern, compensating transactionstesting-patterns.md— LocalDurableTestRunner, cloud testing, flaky test preventiondeployment-iac.md— CloudFormation, CDK, SAM deployment patternsadvanced-patterns.md— GenAI agents, completion policies, custom serializationOrigin
The
aws-lambdaandaws-serverless-deploymentskills are based on https://github.com/gunnargrosch/aws-serverless-pluginTest plan
mise run lint:manifestspasses for plugin.json, marketplace.json, and .mcp.jsonmise run lint:mdpasses for all SKILL.md and reference filesmise run lint:cross-refspassesclaude --plugin-dir ./plugins/aws-serverlessBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.