Introduction
In modern cloud environments, ensuring that applications and websites remain available is critical. Even a few minutes of downtime can affect users, revenue, and system reliability.
In this project, I built a simple serverless uptime monitoring system using AWS services. The system periodically checks whether a website is available and sends an alert if it becomes unreachable.
This project demonstrates how event-driven architectures can automate monitoring tasks without managing servers.
The Business Problem
Many small teams and startups rely on web applications but may not have a full monitoring stack.
Some common problems include:
Websites going down without immediate notice
Lack of automated monitoring
Delayed response to service failures
Expensive third-party monitoring tools
The goal of this project is to create a lightweight and cost-efficient monitoring system that automatically checks website availability and sends alerts when problems occur.
The Solution
Using a serverless architecture, we can automate uptime monitoring with minimal infrastructure.

Figure: Serverless architecture for automated website uptime monitoring using AWS EventBridge, Lambda, SNS, and CloudWatch. Alerts are delivered via Slack or email when the monitored service becomes unavailable.
The system works as follows:
A scheduler triggers a function at regular intervals.
The function checks the health of a target website
If the website is down, an alert notification is sent.
Logs and metrics are stored for monitoring and troubleshooting.
Architecture
The architecture uses the following AWS services:
Amazon EventBridge – schedules the monitoring job
AWS Lambda – runs the health check logic
Amazon Simple Notification Service – sends alert notifications
Amazon CloudWatch – collects logs and metrics
Workflow:
EventBridge (schedule)
↓
Lambda Function
↓
Website Health Check
↓
SNS Notification
↓
Email / Slack
Step 1: Create an SNS Topic
First, create a notification channel for alerts.
Open the AWS Console.
Navigate to SNS.
Create a new Topic.
Select Standard topic.
Add a name such as:
website-health-alerts
Next, create a subscription:
Protocol: Email
Endpoint: your email address
Confirm the subscription from your email.
Step 2: Create the Lambda Function
Next, create the function responsible for checking website health.
Navigate to Lambda
Click Create Function
Choose Author from scratch
Configuration:
Function name: website-health-check
Runtime: Python
Step 3: Add Health Check Code
Example Python code for the Lambda function:
import requests
import boto3
import os
sns = boto3.client('sns')
TOPIC_ARN = os.environ['SNS_TOPIC']
def lambda_handler(event, context):
url = "https://google.com"
try:
response = requests.get(url, timeout=5)
if response.status_code != 200:
sns.publish(
TopicArn=TOPIC_ARN,
Message=f"ALERT: {url} is DOWN",
Subject="Website Health Alert"
)
except Exception as e:
sns.publish(
TopicArn=TOPIC_ARN,
Message=f"ERROR accessing {url}: {str(e)}",
Subject="Website Health Alert"
)
This code checks whether the website responds successfully.
If the site is unavailable, it sends a notification to SNS.
Step 4: Configure EventBridge Scheduler
Now we automate the monitoring.
Navigate to EventBridge
Create a Rule
Choose Schedule
Example schedule:
rate(5 minutes)
Set the target to the Lambda function.
Now AWS will automatically run the health check every five minutes.
Step 5: Monitoring with CloudWatch
All Lambda executions generate logs automatically in CloudWatch.
CloudWatch allows you to monitor:
execution logs
errors
function duration
invocation metrics
This helps with troubleshooting if the health check fails.
Testing the System
To test the monitoring system:
Change the URL in the Lambda function to an invalid website.
Wait for the scheduled execution.
An email alert should be triggered.
Example alert message:
ALERT: https://example.com is DOWN
Benefits of This Approach
This serverless solution provides several advantages:
No server management
Automatic scaling
Low operational cost
Event-driven automation
Simple monitoring setup
Because the system only runs when triggered, it is cost efficient compared to always-on monitoring services.
Possible Improvements
This project can be extended in several ways:
Store monitoring results in DynamoDB
Track response latency
Monitor multiple websites
Send Slack alerts
Build a CloudWatch dashboard
Add retry logic
Conclusion
This project demonstrates how serverless services can be used to build lightweight automation tools.
By combining EventBridge, Lambda, SNS, and CloudWatch, we created a simple monitoring system that automatically checks website availability and sends alerts when issues occur.
Serverless architectures like this are powerful for operational automation because they eliminate the need to manage infrastructure while still providing reliable and scalable solutions.
I recently joined the AWS Community Builders program in the Serverless category, and I’ll be sharing more hands-on projects as I explore event-driven architectures and serverless systems.
Top comments (0)