States: OK → ALARM → INSUFFICIENT_DATA
| Action | Target |
|---|---|
| SNS | Email, SMS, Lambda, HTTP |
| Auto Scaling | Scale in/out |
| EC2 | Stop, terminate, reboot |
| Metric | Threshold | Alert |
|---|---|---|
| Lambda Errors | > 5 in 5 min | SNS → Ops team |
| Lambda Throttles | > 0 | SNS → Scale alert |
| SQS AgeOfOldestMessage | > 300s | SNS → Consumer lag |
| DynamoDB ThrottledRequests | > 0 | SNS → Capacity alert |
| API Gateway 5XXError | > 1% | SNS → Incident |
Scenario thi: Configure notification về quota limits
Giải pháp:
Ví dụ: Automation alert via email khi reach defined percentage của WorkSpaces quota
# Lambda to gather total WorkSpaces deployed
# Send SNS email when quota breached
# EventBridge Rule to trigger Lambda
AWS CodeStar Notifications:
# CodePipeline → SNS on stage completion
- Name: NotifyOnDeploy
Actions:
- Name: SNSNotify
ActionTypeId:
Category: Approval
Provider: Manual
Configuration:
NotificationArn: !Ref AlertTopic
Scenario thi: Application metrics related to cache hits/misses với API Gateway + Lambda không populate trên CloudWatch dashboard.
Root cause: Không monitor API executions, thiếu wider view của application performance.
Giải pháp: Enable API Gateway caching và monitor:
CacheHitCountCacheMissCountExam Tip: