Polls the Israeli Home Front Command (Pikud HaOref) API for real-time rocket and emergency alerts and posts them to a Slack channel.
| Deployment | How | Polling interval | Cost |
|---|---|---|---|
| AWS Lambda (recommended) | EventBridge triggers Lambda every minute in il-central-1 (Tel Aviv) |
1 min | Free tier |
| Docker / local | Long-running container, polling loop | Configurable (default 10s) | Self-hosted |
The Oref API blocks requests from non-Israeli IPs. AWS
il-central-1(Tel Aviv) works reliably.
- Go to api.slack.com/apps → Create New App → From scratch
- Name it (e.g.
Pikud HaOref Bot) and select your workspace - Sidebar → Incoming Webhooks → toggle On
- Add New Webhook to Workspace → choose a channel → Allow
- Copy the webhook URL:
https://hooks.slack.com/services/T.../B.../...
- Go to AWS IAM Console → Users → Create user
- Name:
github-actions-deployer - Attach policies directly — add all of:
AWSLambdaFullAccessAmazonSSMFullAccessCloudFormationFullAccessIAMFullAccessAmazonS3FullAccessAmazonEventBridgeFullAccess
- Create an Access Key → use case: Third-party service → copy the Key ID and Secret
Go to github.com/zitzman/pikud-haoref-bot → Settings → Secrets → Actions → New secret:
| Secret | Value |
|---|---|
AWS_ACCESS_KEY_ID |
from step 2 |
AWS_SECRET_ACCESS_KEY |
from step 2 |
SLACK_WEBHOOK_URL |
from step 1 |
Push any change to main — GitHub Actions will build and deploy automatically to il-central-1.
To trigger a manual redeploy:
git commit --allow-empty -m "Trigger redeploy" && git pushAWS Console → Lambda → pikud-haoref-bot → Monitor → View CloudWatch logs
Or: CloudWatch → Log groups → /aws/lambda/pikud-haoref-bot
Make sure the region is set to il-central-1 (Tel Aviv).
Only works from an Israeli IP. Suitable for running on a home server in Israel.
cp .env.example .env
# Edit .env and set SLACK_WEBHOOK_URLdocker compose up -d
docker compose logs -fdocker compose downSend a fake alert to Slack without waiting for a real one:
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/... python3 test_alert.py| Emoji | Type |
|---|---|
| 🚀 | Missile / Rocket fire |
| 🛸 | UAV / Drone intrusion |
| Hostile aircraft | |
| 🌍 | Earthquake |
| ☣️ | Hazardous materials |
| 🌊 | Tsunami |
| ☢️ | Nuclear threat |
| 🔫 | Terrorist infiltration |
Alert titles and shelter instructions are translated from the Hebrew API response. City names are translated where known and fall back to Hebrew for unmapped locations.
- AWS Lambda is triggered by EventBridge every minute
- The function fetches
https://www.oref.org.il/WarningMessages/alert/alerts.json - The last-seen alert ID is stored in SSM Parameter Store for deduplication
- On a new alert: formats a Slack Block Kit message and POSTs to the webhook
- When the alert clears (empty response): resets SSM state so the next alert always fires