feat(deploy-on-aws): enhance with CDK best practices, monitoring, and validation#35
feat(deploy-on-aws): enhance with CDK best practices, monitoring, and validation#35zxkane wants to merge 11 commits intoawslabs:mainfrom
Conversation
theagenticguy
left a comment
There was a problem hiding this comment.
Looks great! One small nit on the frontmatter
plugins/deploy-on-aws/skills/deploy/references/cdk-best-practices.md
Outdated
Show resolved
Hide resolved
|
@zxkane resolve conflicts please. Thanks! |
…script Add CDK development best practices distilled from community patterns: - Resource naming conventions (let CDK generate names) - Lambda construct selection (NodejsFunction, PythonFunction) - IAM permission patterns (grant methods over raw policies) - Pre-deployment validation with cdk-nag integration - Testing patterns (snapshot and fine-grained assertions) - Stack organization guidelines - Common anti-patterns to avoid Add validate-stack.sh script for pre-deployment CDK stack validation: - Language detection (TypeScript, Python, Java, Go, C#) - CDK synthesis verification - Template size and resource count checks - cdk-nag integration detection
Add post-deployment monitoring patterns for deployed AWS resources: - CloudWatch alarm configurations by service type (Lambda, ECS/Fargate, ALB, RDS/Aurora) - Alarm threshold guidelines (warning vs critical) - SNS notification setup for alarm actions - Production dashboard layout recommendations - Environment-aware monitoring (dev: basic alerts, prod: full observability)
Add awscdk MCP server (awslabs.aws-cdk-mcp-server) for CDK-specific guidance including construct recommendations, API usage patterns, and CDK best practice validation.
…ing steps Update SKILL.md to integrate new capabilities into the workflow: - Add Validate step between Generate and Deploy - Add Monitor step after Deploy for post-deployment observability - Document awscdk MCP server usage - Add CDK best practices section with key rules - Add pre-deployment validation checklist - Reference new cdk-best-practices.md, monitoring.md, and validate-stack.sh
- Bump plugin version from 1.0.0 to 1.1.0 (new features, backward compatible) - Update description to mention CDK best practices and monitoring - Add monitoring and cloudwatch keywords for discoverability - Update marketplace.json to match plugin.json
- Rename LANG variable to CDK_LANG to avoid shadowing POSIX locale - Remove TypeScript-biased synthesis command; use generic 'cdk synth' which reads the app command from cdk.json for all languages
Address review feedback: - Add Error Handling section covering MCP server failures, validation failures, and deployment failures - Add tags and examples to YAML frontmatter per DESIGN_GUIDELINES - Fix inaccurate claim that validate-stack.sh runs security scans; clarify it handles synthesis validation while checkov/cfn-nag run separately
…ool guidance Remove references/cdk-best-practices.md — its content (resource naming, IAM grants, construct levels, cdk-nag, testing, stack organization) is fully covered by the awsiac MCP server's cdk_best_practices tool. Update SKILL.md to guide the model to call awsiac MCP tools at each step: - cdk_best_practices before writing CDK code - search_cdk_documentation for construct details - search_cdk_samples_and_constructs for code examples - validate_cloudformation_template for template validation - check_cloudformation_template_compliance for compliance checks Retain deploy-specific rule not covered by MCP: use language-specific Lambda constructs (NodejsFunction, PythonFunction) for auto-bundling. Keep monitoring.md — its concrete alarm thresholds for Lambda, ECS, ALB, and RDS are not provided by the awsiac MCP server.
480fce6 to
9d72ced
Compare
|
Hi @theagenticguy @krokoko @scottschreckengaust — friendly ping! Would appreciate a review on this PR when you get a chance. It adds CDK best practices, monitoring patterns, and a pre-deployment validation script to the |
|
This pull request is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label. |
|
Closing this pull request as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen. If you wish to exclude this issue from being marked as stale, add the "backlog" label. |
Summary
Enhance the
deploy-on-awsplugin with CDK development best practices, post-deployment monitoring patterns, and a pre-deployment validation script. These additions strengthen the existing deployment workflow without changing existing behavior.Related
Contributes patterns from community CDK and operational best practices to improve the deploy-on-aws plugin quality.
Changes
New reference files:
references/cdk-best-practices.md— CDK patterns for resource naming, Lambda constructs, IAM grants, construct levels, cdk-nag validation, testing, stack organization, and anti-patternsreferences/monitoring.md— Post-deployment CloudWatch alarm patterns for Lambda, ECS/Fargate, ALB, and RDS/Aurora with threshold guidelines and dashboard recommendationsNew script:
scripts/validate-stack.sh— Pre-deployment CDK stack validation (language detection, synthesis verification, template size/resource count checks, cdk-nag integration detection)Enhanced SKILL.md:
tagsandexamplesper Design GuidelinesUpdated metadata:
Design Guidelines Compliance
mise run lint:cross-refs)mise run lint:manifests)mise run fmt:check)Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.