Lightweight Node.js service that monitors email deliverability and server security by forwarding AWS SNS notifications and RKHunter security scans to Discord.
AWS SNS Discord Forwarder is a production-ready monitoring service built with TypeScript and Express that provides real-time notifications for critical infrastructure events. The service integrates AWS Simple Email Service (SES) events and RKHunter security scan reports, forwarding structured alerts to Discord webhooks with rich embeds and color-coded severity levels.
The service handles AWS SNS notifications with cryptographic signature verification to prevent spoofing, processing email bounce, complaint, and delivery events from SES. It parses and formats these events into actionable Discord messages, allowing teams to monitor email deliverability issues directly from their Discord servers.
For security monitoring, the service accepts RKHunter log uploads, automatically parsing scan results to extract warnings, suspicious files, and system information. The parsed data is formatted into color-coded Discord embeds with full log file attachments, providing comprehensive security visibility. Built-in rate limiting, request validation, and health monitoring ensure reliable operation in production environments.
The service follows a modular Express architecture with separation of concerns. Routes handle endpoint logic (/sns for AWS notifications, /report for RKHunter uploads, /health for monitoring). Utility modules provide reusable functionality: discordNotifier handles webhook integration, verifySignature validates SNS messages, and parser functions extract structured data from logs. Middleware includes body-parser for JSON/text, multer for file uploads, and express-rate-limit for abuse protection. The build process uses tsup for fast TypeScript compilation with public assets copied to the dist directory.
Solution: Implemented AWS SNS signature verification with cryptographic validation of message signatures, topics, and certificates. Added rate limiting (10 requests/hour) to prevent abuse while allowing legitimate AWS notifications
Solution: Built regex-based parser that extracts structured data from plain-text logs, handling variations in log formats. Extracts timestamps, warnings, suspicious files, and system info with fallback values for missing fields
Solution: Designed rich embed formatting system with color-coded severity levels (green for success, orange for warnings, red for critical). Structured fields show relevant metadata while full log attachments provide complete context
Solution: Added custom header support (x-server) for server identification in multi-server deployments. Cron jobs include hostname in requests, allowing centralized monitoring of distributed infrastructure
Professional car detailing and furniture cleaning service website offering comprehensive cleaning solutions with modern Polish interface.
Professional electrical and construction services company website showcasing comprehensive solutions with modern Polish interface.
A streaming platform for finding and watching anime series and movies with Polish subtitles.