Central alerting endpoint for AnswerLayer BYOC deployments. Receives CloudWatch alarm notifications via SNS and forwards to Slack.
Customer Account Your Infrastructure
┌─────────────────────┐ ┌─────────────────────┐
│ CloudWatch Alarm │ │ Cloudflare Worker │
│ ↓ │ │ (telemetry-hq) │
│ SNS Topic │ ──── HTTPS ────→ │ ↓ │
│ ↓ │ │ Slack │
│ HTTPS Subscription │ └─────────────────────┘
└─────────────────────┘
npm install# Slack incoming webhook URL
wrangler secret put SLACK_WEBHOOK_URLnpm run deployIn Cloudflare dashboard:
- Go to Workers & Pages → telemetry-hq → Settings → Triggers
- Add Custom Domain:
alerts.answerlayer.com
nuon apps variables create --name alerts_endpoint_url \
--value "https://alerts.answerlayer.com/sns"| Path | Method | Description |
|---|---|---|
/sns |
POST | SNS notification receiver |
/health |
GET | Health check |
# Create .dev.vars with secrets
echo 'SLACK_WEBHOOK_URL="https://hooks.slack.com/services/..."' > .dev.vars
# Start dev server
npm run dev-
Subscription Confirmation: When SNS subscription is created, SNS sends a confirmation request. The worker automatically confirms by fetching the
SubscribeURL. -
Notifications: CloudWatch alarms trigger SNS notifications. The worker parses the alarm details and posts a formatted message to Slack.
🚨 answerlayer-high-5xx-rate
State: ALARM
Account: 123456789012 | Region: us-east-1
┌─────────────────────────────────────────┐
│ Threshold crossed: 15 > 10 for 2 periods│
└─────────────────────────────────────────┘