When you’re running websites or services, monitoring is crucial. But what happens when your monitoring service’s free tier doesn’t include the notification method you need? This was exactly the challenge I faced with Pulsetic’s free plan, which provides excellent uptime monitoring but limits you to just one webhook for alerts.
I needed SMS notifications for critical alerts, but Pulsetic’s free plan doesn’t include SMS functionality and the $19/month plan is too expensive for my needs. Rather than upgrade just for notifications, I decided to build a bridge solution that would leverage the single webhook allowance to create my own SMS notification system. The result? pulsetic-to-sms, an open-source AWS Lambda function that converts Pulsetic webhook alerts into SMS notifications via Twilio.
My solution leverages AWS Lambda to create a serverless bridge between Pulsetic webhooks and Twilio SMS. Here’s how it works:
- Pulsetic sends a webhook when a site goes down or comes back online
- AWS Lambda receives the webhook via a public function URL
- Lambda parses the alert data from Pulsetic’s JSON payload
- Twilio sends an SMS with the alert information to your phone
This approach costs virtually nothing to run (thanks to AWS Lambda’s generous free tier) and requires minimal maintenance once deployed.
Architecture Overview
The solution consists of several key components working together:
AWS Node.js Lambda Function
const twilio = require('twilio');
exports.handler = async (event) => {
// Parse Pulsetic webhook payload
const body = JSON.parse(event.body);
const embed = body.embeds[0];
const smsMessage = `${embed.title}\n\n${embed.description}`;
// Send SMS via Twilio
const message = await client.messages.create({
body: smsMessage,
to: toNumber,
from: fromNumber,
});
return { statusCode: 200, body: 'SMS sent successfully' };
};
Instead of using API Gateway (which would add complexity and cost), the solution uses AWS Lambda’s built-in Function URL feature for direct HTTP access:
resource "aws_lambda_function_url" "pulsetic_sms_url" {
function_name = aws_lambda_function.pulsetic_sms.function_name
authorization_type = "NONE"
cors {
allow_methods = ["POST"]
allow_origins = ["*"]
}
}
Terraform for IaC
The entire infrastructure is defined using Terraform, making deployment and management easy:
resource "aws_lambda_function" "pulsetic_sms" {
filename = "lambda_function.zip"
function_name = "pulsetic-to-sms"
role = aws_iam_role.lambda_role.arn
handler = "index.handler"
runtime = "nodejs22.x"
environment {
variables = {
TWILIO_ACCOUNT_SID = var.twilio_account_sid
TWILIO_AUTH_TOKEN = var.twilio_auth_token
TWILIO_FROM_NUMBER = var.twilio_from_number
TO_NUMBER = var.to_number
}
}
}
Getting Started
Setting up the SMS bridge is straightforward:
- Clone the repository:
git clone https://github.com/rouralberto/pulsetic-to-sms cd pulsetic-to-sms
- Configure your credentials:
cp terraform.tfvars.example terraform.tfvars # Edit terraform.tfvars with your Twilio and phone number details
- Deploy with one command:
chmod +x deploy.sh ./deploy.sh
- Configure Pulsetic: Add the Lambda Function URL to your Pulsetic webhook settings.
Cost Analysis
One of the biggest advantages of this solution is its minimal cost:
Service | Free Tier / Pricing | Typical Usage Cost | Notes |
---|---|---|---|
AWS Lambda | 1 million requests/month (free) | ~$0 (within free tier) | ~300ms execution per alert |
Twilio SMS | ~$0.0875 per SMS (Spain) | $0.10–$0.20/month | International rates vary by destination |
Total | Under $0.50/month | For typical website with occasional alerts |
Compare this to upgrading monitoring services for SMS functionality, which costs $19 monthly.
Why Open Source?
I open-sourced this solution because monitoring limitations shouldn’t force unnecessary upgrades or complex workarounds. The code is straightforward, well-documented, and easily adaptable to different monitoring services or notification providers.
The repository includes:
- Complete documentation
- Example configurations
- Automated deployment scripts
- Infrastructure as Code definitions
Whether you’re managing a personal blog, a small business website, or a side project, having reliable SMS alerts shouldn’t break the bank or require complex infrastructure. This solution proves that with a little creativity and the right tools, you can build exactly what you need.