EventSubscription
The EventSubscription resource allows you to manage AWS RDS EventSubscriptions for monitoring events related to your RDS resources.
Minimal Example
Section titled “Minimal Example”Create a basic RDS EventSubscription with required properties and one optional property.
import AWS from "alchemy/aws/control";
const eventSubscription = await AWS.RDS.EventSubscription("myEventSubscription", { SnsTopicArn: "arn:aws:sns:us-west-2:123456789012:mySNSTopic", SourceType: "db-instance", Enabled: true});
Advanced Configuration
Section titled “Advanced Configuration”Configure an EventSubscription to receive specific event categories for multiple RDS instances.
const advancedEventSubscription = await AWS.RDS.EventSubscription("advancedEventSubscription", { SnsTopicArn: "arn:aws:sns:us-west-2:123456789012:mySNSTopic", SourceType: "db-instance", EventCategories: ["availability", "deletion", "failover"], SourceIds: ["mydbinstance1", "mydbinstance2"], Enabled: true});
Using Tags for Resource Management
Section titled “Using Tags for Resource Management”Create an EventSubscription with tags for better resource management and cost allocation.
const taggedEventSubscription = await AWS.RDS.EventSubscription("taggedEventSubscription", { SnsTopicArn: "arn:aws:sns:us-west-2:123456789012:mySNSTopic", SourceType: "db-instance", Enabled: true, Tags: [ { Key: "Environment", Value: "Production" }, { Key: "Project", Value: "MyProject" } ]});