Skip to main content

Triage and Remediation

Remediation

Using Console

Below are concise, step‑by‑step instructions to enable RDS event notifications using the AWS Management Console.

1. Create or Identify an SNS Topic

  1. Sign in to the AWS Management Console.
  2. Go to Amazon SNS:
    • In the search bar, type SNS and open Simple Notification Service.
  3. Create a topic (if you don’t already have one):
    • In the left menu, select TopicsCreate topic.
    • Choose Standard topic.
    • Enter a Name (e.g., rds-event-notifications).
    • Leave other settings default unless you have specific requirements.
    • Click Create topic.
  4. Create a subscription to that topic:
    • Open the topic you just created.
    • Click Create subscription.
    • Protocol: choose how you want to receive notifications (e.g., Email).
    • Endpoint: enter your email address (or endpoint).
    • Click Create subscription.
    • Confirm the subscription if needed (e.g., click confirmation link in email).

2. Create an RDS Event Subscription

  1. In the console, go to Amazon RDS:
    • In the search bar, type RDS and open RDS.
  2. In the left navigation pane, click Event subscriptions.
  3. Click Create event subscription.
  4. Configure the subscription:
    • Name: e.g., rds-instance-events.
    • Target (SNS topic): select the SNS topic you created (e.g., rds-event-notifications).
  5. Choose Source type based on what you want to monitor:
    • Common options: DB instance, DB cluster, DB parameter group, etc.
  6. Select Event categories:
    • You can select broad options like Availability, Backup, Configuration change, Failure, Notification, Restoration, etc.
    • For compliance, it’s typical to include at least: Availability, Configuration change, and Failure.
  7. Select the Source:
    • Either:
      • All instances (or all sources of that type), or
      • Specific DB instances / clusters you want to monitor.
  8. Ensure Enabled is checked so the subscription is active immediately.
  9. Click Create.

3. Validate Notifications

  1. Trigger or wait for an event (e.g., modify a DB instance configuration or restart the instance).
  2. Confirm you receive a notification via your chosen SNS subscription (email, etc.).
This completes enabling RDS event notifications via the AWS Console.
Below are step‑by‑step AWS CLI commands to enable RDS Event Notifications using Amazon SNS.Assumptions:
  • You have AWS CLI configured with proper permissions.
  • You want email notifications (most common).

1. Create an SNS Topic

Note the TopicArn from the output (e.g. arn:aws:sns:us-east-1:123456789012:rds-event-notifications).

2. Subscribe Your Email to the Topic

Then:
  • Check your email.
  • Confirm the subscription by clicking the link.

3. (Optional) Verify Subscription

Ensure SubscriptionArn is not PendingConfirmation.

4. Create an RDS Event Subscription

Choose:
  • --source-type = db-instance | db-cluster | db-parameter-group | etc.
  • --event-categories list, such as: availability, backup, creation, deletion, failover, failure, maintenance, notification, restoration.
Example for all DB instances in the region:
To target only specific instances, add --source-ids:

5. Confirm Subscription Status

Check that:
  • Status is active
  • Enabled is true
That enables RDS event notifications via SNS using the AWS CLI.
Below is a straightforward way to enable RDS event notifications using Python (boto3).

1. Prerequisites

  1. Install boto3:
  2. Configure AWS credentials with permission to:
    • rds:CreateEventSubscription
    • rds:ModifyEventSubscription
    • rds:DescribeDBInstances
    • sns:CreateTopic
    • sns:Subscribe
    • sns:SetTopicAttributes
    • iam:CreateRole / iam:AttachRolePolicy (if needed)
  3. Decide:
    • Which RDS instances/clusters you want notifications for.
    • Which email(s) or HTTPS endpoint will receive notifications.

2. Create or Reuse an SNS Topic


3. Subscribe Email (or Other Endpoint) to SNS Topic

Then:
  • Check the email inbox and confirm the subscription from AWS.

4. Allow RDS to Publish to the SNS Topic (Optional Explicit Policy)

Often not needed if default permissions are fine, but to be explicit:

5. Enable RDS Event Notifications via Event Subscription

You usually:
  • Select event categories (e.g., availability, configuration change, backup).
  • Select SourceType (e.g., db-instance, db-cluster, db-parameter-group).
  • Select specific DB identifiers, or leave empty to cover all in the region.
Example: Subscribe all DB instances in the region to common events:

6. Verify the Subscription

Check that:
  • Enabled is True.
  • Status becomes active.
  • SnsTopicArn is correct.
  • EventCategoriesList and SourceType match your needs.

7. Test

Trigger a test scenario, for example:
  • Modify an RDS instance parameter or configuration.
  • Perform a manual snapshot or reboot. You should receive an email notification via SNS for the corresponding RDS event.
This completes enabling RDS Event Notifications via Python.
This does not replace your existing RDS instances; it only creates a new event subscription and SNS topic.For verification, terraform plan should show + (create) for aws_sns_topic.rds_events, optionally aws_sns_topic_subscription.rds_events_email, and aws_db_event_subscription.rds_event_subscription with enabled = true and your chosen event_categories/source_type.