< Back

Setup integration: AWS RDS Event

You need to set up an AWS SNS HTTPS endpoint for this integration!

AWS RDS provides relational databases such as MySQL. RDS Events provide notifications when an RDS event occurs. An event can be the start of an automated backup, a Multi-AZ failover, or much more.

I provide an easier way to setup RDS database instance monitoring. Checkout my Monitoring Jump Start!

Monitoring Multi-AZ failovers

You need an existing RDS instance (Multi-AZ enabled) for this example to work!

You can run the RDS database instance in Multi-AZ mode. Multi-AZ will use two virtual machines to host your database. If the primary goes down, AWS will failover to the secondary. But this will take up to 5 minutes. You may want to know about this event because it will cause connection errors in your applications.

Before you can start to set up RDS Events, you have to make one change to the SNS topic endpoint that is required for this integration. You have to allow RDS Events to send messages to your topic.

Allowing AWS to send messages to your topic

  1. Visit https://console.aws.amazon.com/sns/?region=us-east-1
  2. Click on the Topics link on the left
  3. Select the topic that you created for marbot
  4. Click on the Actions button, where you click on the Edit topic policy link.
    Edit SNS topic policy
  5. Select the Advanced view tab

If this is the first time you edit the SNS topic policy, you should see a default entry like this:

{
"Version": "2008-10-17",
"Id": "__default_policy_ID",
"Statement": [
{
"Sid": "__default_statement_ID",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
[...TRUNCATED...]
}
]
}

You have to add an entry to the Statement array:

{
"Sid": "AWSRDSEvents",
"Effect": "Allow",
"Principal": {
"Service": "rds.amazonaws.com"
},
"Action": "sns:Publish",
"Resource": "ARN"
}
  1. Replace ARN with your SNS topic ARN that you created for marbot.
  2. Click on the Update policy button to save the policy.

Save SNS topic policy

Now, AWS is allowed to send messages to your topic.

Creating an RDS Event Subscription

  1. Visit https://console.aws.amazon.com/rds/home?region=us-east-1
  2. Click on the Event Subscriptions link on the left
  3. Click on the Create Event Subscription button
  4. Set a Name, e.g. marbot
  5. Set Send notifications to marbot or your other SNS topic name
  6. Set Source Type to Instances
  7. Set Event Categories to failover (you could select other events depending on your needs as well)
  8. The other fields can stay as they are
  9. Save by clicking the Create button.
    Creating an RDS Event Subscription

I recommend to listen to the following Event Categories.

Database instance

  • notification
  • failover
  • failure
  • low storage
  • recovery
  • maintenance

Database cluster

  • failover
  • failure
  • notification

Sample Alert

You can simulate a failover by rebooting the RDS instance with the Reboot With Failover option enabled.
Simulate RDS failover

You should receive an alert in Slack:

RDS Alert

More help needed? Or want to share feedback?

If you experience any issues, let us know.

E-mail icon
E-Mail
marbot teaser

Incident Management for Slack

Team up to solve incidents with marbot. Never miss a critical alert. Escalate alerts from your AWS infrastructure among your team members. Strong integrations with all parts of your AWS infrastructure: CloudWatch, Elastic Beanstalk, RDS, EC2, ...

Slack icon
Try for free