Amazon Relational Database Service
API Reference (API Version 2014-10-31)


Creates an RDS event notification subscription. This action requires a topic ARN (Amazon Resource Name) created by either the RDS console, the SNS console, or the SNS API. To obtain an ARN with SNS, you must create a topic in Amazon SNS and subscribe to the topic. The ARN is displayed in the SNS console.

You can specify the type of source (SourceType) you want to be notified of, provide a list of RDS sources (SourceIds) that triggers the events, and provide a list of event categories (EventCategories) for events you want to be notified of. For example, you can specify SourceType = db-instance, SourceIds = mydbinstance1, mydbinstance2 and EventCategories = Availability, Backup.

If you specify both the SourceType and SourceIds, such as SourceType = db-instance and SourceIdentifier = myDBInstance1, you are notified of all the db-instance events for the specified source. If you specify a SourceType but do not specify a SourceIdentifier, you receive notice of the events for that source type for all your RDS sources. If you do not specify either the SourceType nor the SourceIdentifier, you are notified of events generated from all RDS sources belonging to your customer account.


RDS event notification is only available for unencrypted SNS topics. If you specify an encrypted SNS topic, event notifications aren't sent for the topic.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.


A value that indicates whether to activate the subscription. If the event notification subscription isn't activated, the subscription is created but not active.

Type: Boolean

Required: No


A list of event categories for a SourceType that you want to subscribe to. You can see a list of the categories for a given SourceType in the Events topic in the Amazon RDS User Guide or by using the DescribeEventCategories action.

Type: Array of strings

Required: No


The Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it.

Type: String

Required: Yes


The list of identifiers of the event sources for which events are returned. If not specified, then all sources are included in the response. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.


  • If SourceIds are supplied, SourceType must also be provided.

  • If the source type is a DB instance, then a DBInstanceIdentifier must be supplied.

  • If the source type is a DB security group, a DBSecurityGroupName must be supplied.

  • If the source type is a DB parameter group, a DBParameterGroupName must be supplied.

  • If the source type is a DB snapshot, a DBSnapshotIdentifier must be supplied.

Type: Array of strings

Required: No


The type of source that is generating the events. For example, if you want to be notified of events generated by a DB instance, you would set this parameter to db-instance. if this value isn't specified, all events are returned.

Valid values: db-instance | db-cluster | db-parameter-group | db-security-group | db-snapshot | db-cluster-snapshot

Type: String

Required: No


The name of the subscription.

Constraints: The name must be less than 255 characters.

Type: String

Required: Yes


A list of tags. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

Type: Array of Tag objects

Required: No

Response Elements

The following element is returned by the service.


Contains the results of a successful invocation of the DescribeEventSubscriptions action.

Type: EventSubscription object


For information about the errors that are common to all actions, see Common Errors.


You have reached the maximum number of event subscriptions.

HTTP Status Code: 400


SNS has responded that there is a problem with the SND topic specified.

HTTP Status Code: 400


You do not have permission to publish to the SNS topic ARN.

HTTP Status Code: 400


The SNS topic ARN does not exist.

HTTP Status Code: 404


The requested source could not be found.

HTTP Status Code: 404


The supplied subscription name already exists.

HTTP Status Code: 400


The supplied category does not exist.

HTTP Status Code: 404



Sample Request ?Action=CreateEventSubscription &Enabled=true &EventCategories.member.1=failure &EventCategories.member.2=configuration%20change &SignatureMethod=HmacSHA256 &SignatureVersion=4 &SnsTopicArn=arn%3Aaws%3Asns%3Aus-east-1%3A802#########%3Amyawsuser-RDS &SourceType=db-security-group &SubscriptionName=myawsuser-secgrp &Version=2014-09-01 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20140425/us-east-1/rds/aws4_request &X-Amz-Date=20140425T214325Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=7045960f6ab15609571fb05278004256e186b7633ab2a3ae46826d7713e0b461

Sample Response

<CreateEventSubscriptionResponse xmlns=""> <CreateEventSubscriptionResult> <EventSubscription> <SourceType>db-security-group</SourceType> <Enabled>true</Enabled> <CustomerAwsId>803#########</CustomerAwsId> <Status>creating</Status> <SubscriptionCreationTime>Fri Apr 25 21:43:25 UTC 2014</SubscriptionCreationTime> <EventCategoriesList> <EventCategory>configuration change</EventCategory> <EventCategory>failure</EventCategory> </EventCategoriesList> <CustSubscriptionId>myawsuser-secgrp</CustSubscriptionId> <SnsTopicArn>arn:aws:sns:us-east-1:802#########:myawsuser-RDS</SnsTopicArn> </EventSubscription> </CreateEventSubscriptionResult> <ResponseMetadata> <RequestId>f15e9dc3-bbb1-11d3-f4c6-37db295f7674</RequestId> </ResponseMetadata> </CreateEventSubscriptionResponse>


Sample Request ?Action=CreateEventSubscription &Enabled=true &EventCategories.member.1=creation &EventCategories.member.2=deletion &EventCategories.member.3=failover &SignatureMethod=HmacSHA256 &SignatureVersion=4 &SnsTopicArn=arn%3Aaws%3Asns%3Aus-east-1%3A802#########%3Amyawsuser-RDS &SourceType=db-instance &SubscriptionName=myawsuser-inst &Version=2014-09-01 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20140429/us-east-1/rds/aws4_request &X-Amz-Date=20140429T184410Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=1e1879f20ef3aec07135d69cc192426bf1cc5c42fc9d1acc7726bcd93155fb71

Sample Response

<CreateEventSubscriptionResponse xmlns=""> <CreateEventSubscriptionResult> <EventSubscription> <SourceType>db-instance</SourceType> <Enabled>true</Enabled> <CustomerAwsId>803#########</CustomerAwsId> <Status>creating</Status> <SubscriptionCreationTime>Tue Apr 29 18:44:10 UTC 2014</SubscriptionCreationTime> <EventCategoriesList> <EventCategory>creation</EventCategory> <EventCategory>deletion</EventCategory> <EventCategory>failover</EventCategory> </EventCategoriesList> <CustSubscriptionId>myawsuser-inst</CustSubscriptionId> <SnsTopicArn>arn:aws:sns:us-east-1:802#########:myawsuser-RDS</SnsTopicArn> </EventSubscription> </CreateEventSubscriptionResult> <ResponseMetadata> <RequestId>30feb307-bebd-11d3-f4c6-37db295f7674</RequestId> </ResponseMetadata> </CreateEventSubscriptionResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: