Skip to main content

Remediation

Create an RDS Event Subscriptionโ€‹

Configure Amazon RDS event subscriptions to receive notifications for maintenance, configuration change, and failure events for DB instances.

From Consoleโ€‹

  1. Sign in to the AWS Management Console.

  2. Navigate to the Amazon RDS console.

  3. In the navigation pane, under Amazon RDS, select Event subscriptions.

  4. Choose Create event subscription.

  5. 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 Database Instance.
    • For Database Instances to include, select All database instances.
    • For Event categories to include, select Select specific event categories and choose maintenance, configuration change, and failure.
  6. Choose Create to create the event subscription.

  7. Repeat steps 4โ€“6 to create event subscriptions for other Amazon RDS DB instances in the current AWS Region, if applicable.

  8. Switch to other AWS Regions from the console and repeat this remediation process as required.

From Command Lineโ€‹

  1. Create an Amazon SNS topic to receive RDS event notifications:

    aws sns create-topic \
    --name {{rds-instance-event-notifications}}
  2. Note the Amazon Resource Name (ARN) returned in the output:

    {
    "TopicArn": "{{topic-arn}}"
    }
  3. Subscribe an email endpoint to the SNS topic:

    aws sns subscribe \
    --topic-arn {{topic-arn}} \
    --protocol email \
    --notification-endpoint my@email.com
  4. Confirm the email subscription using the token sent to the specified email address:

    aws sns confirm-subscription \
    --topic-arn {{topic-arn}} \
    --token {{confirmation-token}}
  5. Create an Amazon RDS event subscription for DB instance maintenance, configuration change, and failure events:

    aws rds create-event-subscription \
    --region {{us-east-1}} \
    --subscription-name {{subscription-name}} \
    --sns-topic-arn {{topic-arn}} \
    --source-type db-instance \
    --event-categories maintenance configuration-change failure \
    --source-ids {{db-instance-id}} \
    --enabled
  6. Verify that the event subscription is successfully created by reviewing the command output:

    {
    "EventSubscription": {
    "Status": "creating",
    "SourceType": "db-instance",
    "EventCategoriesList": [
    "maintenance",
    "configuration change",
    "failure"
    ],
    "Enabled": true
    }
    }
  7. Repeat steps 1โ€“6 for additional RDS DB instances in the same AWS Region, if required.

  8. Update the --region parameter and repeat the remediation steps for other AWS Regions.