Skip to content
GitHubXDiscordRSS

EventSubscription

Learn how to create, update, and manage AWS RDS EventSubscriptions using Alchemy Cloud Control.

The EventSubscription resource allows you to manage AWS RDS EventSubscriptions for monitoring events related to your RDS resources.

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
});

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
});

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" }
]
});