Building Near Real-Time Amazon Route 53 DNS Change Alerts on AWS

A Cloud Enthusiast
Search for a command to run...

A Cloud Enthusiast
No comments yet. Be the first to comment.
Description Terraform is an infrastructure-as-code tool that makes handling infrastructure more straightforward and manageable. A Terraform module is a collection of configuration files that encapsula
Introduction Amazon Elastic Kubernetes Service (Amazon EKS) is a managed Kubernetes service that makes it easy for you to run Kubernetes on AWS and on-premises. Kubernetes is an open-source system for automating deployment, scaling, and management of...

In this article, I will briefly define what is DevOps, then we will discuss the suggested strategy to manage and automate DevOps teamwork in the context of AWS Team. What is DevOps? DevOps is the combination of cultural philosophies, practices, and t...
Introduction In this blog, we will demonstrate how to proactively monitor a web server EC2 security group for any traffic rule changes using Lambda along with a few other services. If we detect any unauthorized changes, we will then undo them using L...

DNS changes are powerful and risky. A single incorrect Route 53 record can cause outages, security exposure, or compliance issues. A simple but effective governance control is to get alerted whenever a DNS record is created, updated, or deleted.
This guide walks through a repeatable, AWS-native pattern to implement near real-time alerts for Route 53 DNS record changes using CloudTrail, EventBridge, and SNS.
Detects any Route 53 DNS record change (CREATE, UPDATE, DELETE)
Works for public or private hosted zones
Provides visibility into:
Who made the change
Which record was modified
When and from where
Requires no agents and no third-party tools
Scales across accounts and organizations
AWS CloudTrail captures Route 53 API calls
Amazon EventBridge filters DNS change events
Amazon SNS delivers notifications by email or other supported endpoints
Route 53 record changes are API calls using ChangeResourceRecordSets. CloudTrail is the authoritative source for these events.
Before starting, ensure the following:
CloudTrail is enabled and logging management write events
You have permission to create:
EventBridge rules
SNS topics and subscriptions
You know the hosted zone ID you want to monitor
Important: Route 53 is a global service, so EventBridge rules for this use case should be created in
us-east-1.
Open CloudTrail
Go to Event history
Filter by:
route53.amazonaws.comCreate or update a DNS record in Route 53
Confirm an event named ChangeResourceRecordSets appears
Open the event and note the exact value of:
requestParameters.hostedZoneId
Always use the exact value shown in CloudTrail.
Open Amazon SNS in us-east-1
Create a Standard topic
Create an email subscription
Confirm the subscription from your inbox
Test delivery by publishing a sample message to the topic.
Open Amazon EventBridge in us-east-1
Create a new rule
Select:
Event source: AWS events
Event type: AWS API Call via CloudTrail
Choose Custom pattern (JSON editor)
Use the following pattern and replace the hosted zone ID with your own:
{
"detail-type": ["AWS API Call via CloudTrail"],
"detail": {
"eventSource": ["route53.amazonaws.com"],
"eventName": ["ChangeResourceRecordSets"],
"requestParameters": {
"hostedZoneId": ["<HOSTED_ZONE_ID>"]
}
}
}
It filters CloudTrail API events reliably
It avoids over-filtering on unstable fields like the top-level source
It captures all DNS record changes for the target hosted zone
Set the EventBridge rule target to SNS
Select your SNS topic
Allow EventBridge to create or use its service role if required by your environment
In restricted environments, IAM permissions may need to be explicitly granted for EventBridge to create its invoke role and related policy.
Create or delete a DNS record
Check:
EventBridge → Monitoring for matched events
Your email inbox for the SNS notification
You should receive an alert within seconds.
In tightly controlled environments, especially AWS Organizations management accounts, you may hit IAM permission errors when EventBridge tries to create its service role and policy for SNS publishing.
Typical missing permissions include:
iam:CreateRole
iam:PassRole
iam:AttachRolePolicy
iam:PutRolePolicy
iam:CreatePolicy
iam:GetPolicy
iam:GetPolicyVersion
iam:CreatePolicyVersion
iam:DeletePolicyVersion
One practical approach is to allow EventBridge to create only the required invoke role and associated policy resources. Another option is to have the security team pre-create the role and policy for you.
Check the following:
The EventBridge rule is in us-east-1
The rule is enabled
The event bus is default
The event pattern uses the exact hostedZoneId value from CloudTrail
The rule is based on AWS API Call via CloudTrail
Prefer filtering on:
detail.eventSource
detail.eventName
Avoid relying too heavily on the top-level source field.
Check:
The SNS subscription is confirmed
You can manually publish to the topic successfully
The EventBridge rule target is correctly configured
EventBridge input transformers have limitations, and SNS email delivery does not render string templates nicely with line breaks.
If you want:
Clean multi-line emails
Custom email subject
Better formatting
Support for multiple DNS record changes in a single request
Then use:
EventBridge → Lambda → SNS
If you only want to detect specific actions, such as deletes, you can refine the filtering logic. For example, with a Lambda-based solution you can filter for:
CREATE
DELETE
UPSERT
You can scale this design by either:
Creating one rule per hosted zone
Removing the hosted zone filter and handling routing or formatting logic in Lambda
A Lambda function can:
Build a clean, multi-line email
Set a custom subject
Add severity levels
Handle multiple DNS changes in one request
AWS Config is useful for:
Compliance monitoring
Configuration history
Drift tracking
CloudTrail plus EventBridge is better for:
Near real-time alerting
Operational visibility
Security monitoring
This solution provides a lightweight, scalable, and repeatable way to monitor DNS changes across AWS environments.
It is especially valuable for:
Production environments
Security monitoring
Compliance and audit visibility
Once implemented, it becomes a low-effort, high-impact governance control that can be reused across many AWS accounts and organizations.