Remediation
Create an RDS Event Subscriptionโ
Configure Amazon RDS event subscriptions to receive notifications for maintenance and failure events for DB clusters.
From Consoleโ
-
Sign in to the AWS Management Console.
-
Navigate to the Amazon RDS console.
-
In the navigation pane, under Amazon RDS, select Event subscriptions.
-
Choose Create event subscription.
-
On the Create event subscription page, configure the following settings:
- Enter a unique name in the Name field.
Target Section
-
For Send notifications to, choose one of the following:
- Create a new Amazon SNS topic. Provide a unique Topic name and specify the email address(es) to receive notifications.
- Select an existing Amazon SNS topic by choosing its ARN from the list.
Source Section
- Set Source type to Clusters.
- For Clusters to include, select All clusters.
- For Event categories to include, select Select specific event categories and choose maintenance and failure.
-
Choose Create to create the event subscription.
-
Repeat steps 4-6 to create event subscriptions for other Amazon RDS resources in the current AWS Region, if applicable.
-
Switch to other AWS Regions from the console and repeat this remediation process as required.
From Command Lineโ
-
Create an Amazon SNS topic to receive RDS event notifications:
aws sns create-topic \
--name {{rds-event-notifications}} -
Note the Amazon Resource Name (ARN) returned in the output:
{
"TopicArn": "{{topic-arn}}"
} -
Subscribe an email endpoint to the SNS topic:
aws sns subscribe \
--topic-arn {{topic-arn}} \
--protocol email \
--notification-endpoint my@email.com -
Confirm the email subscription using the token sent to the specified email address:
aws sns confirm-subscription \
--topic-arn {{topic-arn}} \
--token {{confirmation-token}} -
Create an Amazon RDS event subscription for DB cluster maintenance and failure events:
aws rds create-event-subscription \
--region {{us-east-1}} \
--subscription-name {{subscription-name}} \
--sns-topic-arn {{topic-arn}} \
--source-type db-cluster \
--event-categories maintenance failure \
--source-ids {{db-cluster-id}} \
--enabled -
Verify that the event subscription is successfully created by reviewing the command output:
{
"EventSubscription": {
"Status": "creating",
"SourceType": "db-cluster",
"EventCategoriesList": [
"maintenance",
"failure"
],
"Enabled": true
}
} -
Repeat steps 1โ6 for additional RDS DB clusters in the same AWS Region, if required.
-
Update the
--regionparameter and repeat the remediation steps for other AWS Regions.