AWS DMS Event Subscription

This page shows how to write Terraform and CloudFormation for AWS DMS Event Subscription and write them securely.

aws_dms_event_subscription (Terraform)

The Event Subscription in AWS DMS can be configured in Terraform with the resource name aws_dms_event_subscription. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L7
resource "aws_dms_event_subscription" "this" {
  enabled          = var.enabled
  event_categories = var.event_categories
  name             = var.name
  sns_topic_arn    = var.sns_topic_arn
  source_ids       = var.source_ids
main.tf#L1
resource "aws_dms_event_subscription" "this" {
  count = var.create ? 1 : 0

  name             = var.name
  event_categories = var.event_categories
  sns_topic_arn    = var.sns_topic_arn
main.tf#L35
resource "aws_dms_event_subscription" "example" {
  enabled          = true
  event_categories = ["creation", "failure"]
  name             = "my-favorite-event-subscription"
  sns_topic_arn    = aws_sns_topic.example.arn
  source_ids       = [aws_dms_replication_task.example.replication_task_id]

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides a DMS (Data Migration Service) event subscription resource.

AWS::DMS::EventSubscription (CloudFormation)

The EventSubscription in DMS can be configured in CloudFormation with the resource name AWS::DMS::EventSubscription. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

product.template-eu-north-1.yaml#L9
    Type: AWS::DMS::EventSubscription
    Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html
    Properties:
      SnsTopicArn: !Ref 'SnsTopicArn'
product.template-eu-west-1.yaml#L9
    Type: AWS::DMS::EventSubscription
    Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html
    Properties:
      SnsTopicArn: !Ref 'SnsTopicArn'
product.template-us-west-1.yaml#L9
    Type: AWS::DMS::EventSubscription
    Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html
    Properties:
      SnsTopicArn: !Ref 'SnsTopicArn'
product.template-ap-northeast-1.yaml#L9
    Type: AWS::DMS::EventSubscription
    Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html
    Properties:
      SnsTopicArn: !Ref 'SnsTopicArn'
product.template-eu-central-1.yaml#L9
    Type: AWS::DMS::EventSubscription
    Description: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html
    Properties:
      SnsTopicArn: !Ref 'SnsTopicArn'
DMSEventSubscriptionSpecification.json#L22
    "AWS::DMS::EventSubscription": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html",
      "Properties": {
        "SourceType": {
          "Required": false,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html#cfn-dms-eventsubscription-sourcetype",
DMSEventSubscriptionSpecification.json#L22
    "AWS::DMS::EventSubscription": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html",
      "Properties": {
        "SourceType": {
          "Required": false,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html#cfn-dms-eventsubscription-sourcetype",
DMSEventSubscriptionSpecification.json#L22
    "AWS::DMS::EventSubscription": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html",
      "Properties": {
        "SourceType": {
          "Required": false,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html#cfn-dms-eventsubscription-sourcetype",
DMSEventSubscriptionSpecification.json#L22
    "AWS::DMS::EventSubscription": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html",
      "Properties": {
        "SourceType": {
          "Required": false,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html#cfn-dms-eventsubscription-sourcetype",
DMSEventSubscriptionSpecification.json#L22
    "AWS::DMS::EventSubscription": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html",
      "Properties": {
        "SourceType": {
          "Required": false,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-eventsubscription.html#cfn-dms-eventsubscription-sourcetype",

Parameters

Explanation in CloudFormation Registry

Use the AWS::DMS::EventSubscription resource to get notifications for AWS Database Migration Service events through the Amazon Simple Notification Service. For more information, see Using AWS DMS Event Notification in the *AWS Database Migration Service User Guide.

Frequently asked questions

What is AWS DMS Event Subscription?

AWS DMS Event Subscription is a resource for DMS of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS DMS Event Subscription?

For Terraform, the niveklabs/aws, kleytonhsantos/terraform-aws-dms and afonsoaugusto/terraform-aws-s3-webapp source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the awslabs/aws-service-catalog-products, awslabs/aws-service-catalog-products and awslabs/aws-service-catalog-products source code examples are useful. See the CloudFormation Example section for further details.