Subscribing to Amazon RDS event notification - Amazon Relational Database Service

Subscribing to Amazon RDS event notification

The simplest way to create a subscription is with the RDS console. If you choose to create event notification subscriptions using the CLI or API, 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. For information on creating an SNS topic and subscribing to it, see Getting started with Amazon SNS in the Amazon Simple Notification Service Developer Guide.

You can specify the type of source you want to be notified of and the Amazon RDS source that triggers the event:

Source type

The type of source. For example, Source type might be Instances. You must choose a source type.

Resources to include

The Amazon RDS resources that are generating the events. For example, you might choose Select specific instances and then myDBInstance1.

The following table explains the result when you specify or don't specify SourceIdentifier.

To subscribe to RDS event notification

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In navigation pane, choose Event subscriptions.

  3. In the Event subscriptions pane, choose Create event subscription.

  4. Enter your subscription details as follows:

    1. For Name, enter a name for the event notification subscription.

    2. For Send notifications to, do one of the following:

      • Choose New email topic. Enter a name for your email topic and a list of recipients.

      • Choose Amazon Resource Name (ARN). Then choose existing Amazon SNS ARN for an Amazon SNS topic.

        If you want to use a topic that has been enabled for server-side encryption (SSE), grant Amazon RDS the necessary permissions to access the AWS KMS key. For more information, see Enable compatibility between event sources from AWS services and encrypted topics in the Amazon Simple Notification Service Developer Guide.

    3. For Source type, choose a source type. For example, choose Instances or Parameter groups.

    4. Choose the event categories and resources that you want to receive event notifications for.

      The following example configures event notifications for the DB instance named testinst.

      
                                    Enter source type
    5. Choose Create.

The Amazon RDS console indicates that the subscription is being created.


                    List DB event notification subscriptions

To subscribe to RDS event notification, use the AWS CLI create-event-subscription command. Include the following required parameters:

  • --subscription-name

  • --sns-topic-arn

Example

For Linux, macOS, or Unix:

aws rds create-event-subscription \ --subscription-name myeventsubscription \ --sns-topic-arn arn:aws:sns:us-east-1:123456789012:myawsuser-RDS \ --enabled

For Windows:

aws rds create-event-subscription ^ --subscription-name myeventsubscription ^ --sns-topic-arn arn:aws:sns:us-east-1:123456789012:myawsuser-RDS ^ --enabled

To subscribe to Amazon RDS event notification, call the Amazon RDS API function CreateEventSubscription. Include the following required parameters:

  • SubscriptionName

  • SnsTopicArn