Skip to content

Commit 29deb01

Browse files
committed
fix(deploy-on-aws): add error handling and YAML frontmatter tags
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
1 parent a0dd863 commit 29deb01

1 file changed

Lines changed: 42 additions & 2 deletions

File tree

  • plugins/deploy-on-aws/skills/deploy

plugins/deploy-on-aws/skills/deploy/SKILL.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
---
22
name: deploy
33
description: "Deploy applications to AWS. Triggers on phrases like: deploy to AWS, host on AWS, run this on AWS, AWS architecture, estimate AWS cost, generate infrastructure. Analyzes any codebase and deploys to optimal AWS services."
4+
tags:
5+
- aws
6+
- deployment
7+
- cdk
8+
- monitoring
9+
- infrastructure
10+
examples:
11+
- "Deploy this Flask app to AWS"
12+
- "Host my React site on AWS"
13+
- "Estimate AWS costs for this project"
14+
- "Generate CDK code for this application"
415
---
516

617
# Deploy on AWS
@@ -19,7 +30,8 @@ straightforward services. Don't ask questions with obvious answers.
1930
3. **Estimate** - Show monthly cost before proceeding
2031
4. **Generate** - Write IaC code following [CDK best practices](references/cdk-best-practices.md)
2132
with [security defaults](references/security.md) applied
22-
5. **Validate** - Run [validation script](scripts/validate-stack.sh) and security scans
33+
5. **Validate** - Run synthesis, security scans, and
34+
[validation script](scripts/validate-stack.sh)
2335
6. **Deploy** - Execute with user confirmation
2436
7. **Monitor** - Set up [monitoring](references/monitoring.md) for deployed resources
2537

@@ -82,7 +94,35 @@ Before deploying, run these checks in order:
8294
4. Security scan — `checkov` or `cfn-nag` on generated templates
8395
5. Secret detection — scan for hardcoded credentials
8496

85-
Use [validate-stack.sh](scripts/validate-stack.sh) to automate checks 3-4.
97+
Use [validate-stack.sh](scripts/validate-stack.sh) to automate synthesis validation
98+
and template analysis (steps 3). Run `checkov` or `cfn-nag` separately for step 4.
99+
100+
## Error Handling
101+
102+
### MCP Server Unavailable
103+
104+
If awscdk or awsiac MCP servers are unresponsive:
105+
106+
- Inform user: "[server] MCP not responding"
107+
- Continue using inline CDK best practices from this skill
108+
- DO NOT skip cost estimation if awspricing fails — ask user to proceed without estimate
109+
110+
### Validation Failures
111+
112+
If `cdk synth` or validation script fails:
113+
114+
- Show the error output to the user
115+
- Identify and fix the issue in generated code
116+
- Re-run validation before proceeding to deploy
117+
- DO NOT deploy with failing validation
118+
119+
### Deployment Failures
120+
121+
If `cdk deploy` fails:
122+
123+
- Show the CloudFormation error event
124+
- Suggest fix based on error type
125+
- Stack will auto-rollback — no manual cleanup needed
86126

87127
## Post-Deployment Monitoring
88128

0 commit comments

Comments
 (0)