DEV Community

Ashish Kamble
Ashish Kamble

Posted on

Event Subscription for RDS in AWS

Amazon RDS generates a significant number of events in categories that you can subscribe to using the Amazon RDS Console, AWS CLI, or the API.

Suppose you have an requirement, where you would like to get notified about various events on the RDS such as their Availability (Instance shutdown, Instance restart), Failover, Configuration Change, AutoScaling triggered(When Storage comes down to 90%), event subscription is the tool to use.

In this post, we are going to create a Event Subscription, and check out the various steps that can be followed.

Console Method:

Go-to Event Subscription in the RDS Console, and click on Create Event.

Alt Text

Fill-out the Details as such.
Alt Text

In the above Image, we have provided Name for the Event Subscription as "Test-Event".

Target Section:
It implies on how do you want to get notified, If you already have an SNS topic, you can use that. We have selected "ARN", you must create an Amazon Simple Notification Service topic and subscribe to that topic with the Amazon SNS console or Amazon SNS API. You will also need to retain the Amazon Resource Name (ARN) of the topic because it is used when submitting CLI commands or API operations.

Source Section:
It is the type of resource this ES(Event Subscription) will consume events from.
We have List which has options as below:
a. Instances
b. Security Groups
c. Parameter Groups
d. Snapshots
e. Clusters
f. Cluster Snapshots.
We have used Instances for our case. You can select all Instances in the ACCOUNT for that specific REGION. Or you can select specific instances only, depends on your use-case.

Event Categories to Include:
One can select to get notified of all the Events that RDS provides, or a selection of Events depending on your use-case.
Below are the Event List from which you can choose.

Alt Text

Below is the Link with detail list of all the Events along with description.

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html#USER_Events.Messages

Click on Create, a Mail will be sent out to the SNS enlisted topic. Subscribe to the same, and now you will get notified for all the events via mail.

Below is the sample snippet an overall ES will look like.

Alt Text

One can also modify the Event later on depending on the needs, and can add/remove Instances, or add/remove Events as such.

Top comments (1)

Collapse
 
dineshrathee12 profile image
Dinesh Rathee

Nice !!