generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 31
feat(deploy-on-aws): enhance with CDK best practices, monitoring, and validation #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zxkane
wants to merge
10
commits into
awslabs:main
Choose a base branch
from
zxkane:enhance-deploy-on-aws
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d8e0e30
feat(deploy-on-aws): add CDK best practices reference and validation …
zxkane f175681
feat(deploy-on-aws): add monitoring and observability reference
zxkane 6e4eaab
feat(deploy-on-aws): add AWS CDK MCP server
zxkane 4340190
feat(deploy-on-aws): enhance deployment workflow with CDK and monitor…
zxkane 93835fa
chore(deploy-on-aws): bump version to 1.1.0 and update metadata
zxkane a0dd863
fix(deploy-on-aws): address review feedback for validate-stack.sh
zxkane 29deb01
fix(deploy-on-aws): add error handling and YAML frontmatter tags
zxkane 9d72ced
refactor(deploy-on-aws): replace static CDK best practices with MCP t…
zxkane bf9e2ec
Merge branch 'main' into enhance-deploy-on-aws
krokoko 5a1ae76
Merge branch 'main' into enhance-deploy-on-aws
krokoko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
plugins/deploy-on-aws/skills/deploy/references/monitoring.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # Monitoring and Observability | ||
|
|
||
| Post-deployment monitoring patterns. Set up after successful deployment. | ||
|
|
||
| ## When to Add Monitoring | ||
|
|
||
| - **Always**: Error alerting for deployed compute (Fargate, Lambda) | ||
| - **Production**: Full observability (alarms + dashboards + logs) | ||
| - **Dev**: Basic error alerting only | ||
|
|
||
| ## Lambda Alarms | ||
|
|
||
| | Metric | Threshold | Periods | | ||
| | --------------- | -------------- | ------- | | ||
| | Errors (Sum) | 10 per 5 min | 1 | | ||
| | Duration (Max) | 80% of timeout | 2 | | ||
| | Throttles (Sum) | 5 per 5 min | 1 | | ||
|
|
||
| ## ECS/Fargate Alarms | ||
|
|
||
| | Metric | Threshold | Periods | | ||
| | ---------------------- | ------------- | ------- | | ||
| | CPU Utilization | 80% | 3 | | ||
| | Memory Utilization | 85% | 2 | | ||
| | Running Task Count < 1 | 1 (less-than) | 2 | | ||
|
|
||
| ## ALB Alarms | ||
|
|
||
| | Metric | Threshold | Periods | | ||
| | -------------------- | ------------ | ------- | | ||
| | 5XX Error Count | 10 per 5 min | 1 | | ||
| | Unhealthy Host Count | 1 | 2 | | ||
| | Response Time p99 | 1 second | 2 | | ||
|
|
||
| ## RDS/Aurora Alarms | ||
|
|
||
| | Metric | Threshold | Periods | | ||
| | -------------------- | ---------- | ------- | | ||
| | CPU Utilization | 80% | 3 | | ||
| | Free Storage Space | < 10 GB | 1 | | ||
| | Database Connections | 80% of max | 2 | | ||
|
|
||
| ## Alarm Notification | ||
|
|
||
| Use SNS topic with email subscription for alarm actions: | ||
|
|
||
| ```typescript | ||
| const topic = new sns.Topic(this, 'AlarmTopic'); | ||
| topic.addSubscription(new subscriptions.EmailSubscription('ops@example.com')); | ||
| alarm.addAlarmAction(new actions.SnsAction(topic)); | ||
| ``` | ||
|
|
||
| ## Threshold Guidelines | ||
|
|
||
| | Category | Warning | Critical | | ||
| | ----------- | ------------ | ----------- | | ||
| | CPU/Memory | 70-80% | 80-90% | | ||
| | Error rate | Based on SLA | 2× warning | | ||
| | Latency p99 | 80% of SLA | 100% of SLA | | ||
| | Storage | 70% used | 85% used | | ||
|
|
||
| ## Production Dashboard | ||
|
|
||
| Include these widget groups: | ||
|
|
||
| 1. **Service Overview**: Request rate, error %, latency (p50/p95/p99) | ||
| 2. **Resource Utilization**: CPU, memory, network by service | ||
| 3. **Cost Metrics**: Daily spend, month-to-date | ||
| 4. **Errors**: Error counts by type, recent logs |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.