AWS DMS Replication Instance

This page shows how to write Terraform and CloudFormation for AWS DMS Replication Instance and write them securely.

aws_dms_replication_instance (Terraform)

The Replication Instance in AWS DMS can be configured in Terraform with the resource name aws_dms_replication_instance. The following sections describe 5 examples of how to use the resource and its parameters.

Example Usage from GitHub

test.tf#L1
resource "aws_dms_replication_instance" "noncompliantdms1" { # Noncompliant {{Make sure that using public IP address is safe here.}}
#        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}

resource "aws_dms_replication_instance" "noncompliantdms2" {
#        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^> {{Related instance}}
dms_test.tf#L12
resource "aws_dms_replication_instance" "my_dms_replication_instance_single_low_storage" {
  allocated_storage            = 20
  apply_immediately            = true
  auto_minor_version_upgrade   = true
  availability_zone            = "us-east-1"
  engine_version               = "3.1.4"
dms_test.tf#L12
resource "aws_dms_replication_instance" "my_dms_replication_instance_single_low_storage" {
  allocated_storage            = 20
  apply_immediately            = true
  auto_minor_version_upgrade   = true
  availability_zone            = "us-east-1"
  engine_version               = "3.1.4"
dms.tf#L15
resource "aws_dms_replication_instance" "tf_dms_11xe" {
    allocated_storage = 50
    apply_immediately = true
    engine_version = "3.4.3"
    multi_az = false
    publicly_accessible = true
dms.tf#L1
resource "aws_dms_replication_instance" "dms_instance" {
  allocated_storage          = 10
  apply_immediately          = true
  engine_version             = "3.4.4"
  multi_az                   = false
  publicly_accessible        = false

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) replication instance resource. DMS replication instances can be created, updated, deleted, and imported.

AWS::DMS::ReplicationInstance (CloudFormation)

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

Example Usage from GitHub

DMSReplicationInstancePubliclyAccessible-FAILED.yml#L4
    Type: AWS::DMS::ReplicationInstance
    Properties:
      ReplicationInstanceClass: dms.c4.large
  Resource1:
    Type: AWS::DMS::ReplicationInstance
    Properties:
DMSReplicationInstancePubliclyAccessible-FAILED.yml#L4
    Type: AWS::DMS::ReplicationInstance
    Properties:
      ReplicationInstanceClass: dms.c4.large
  Resource1:
    Type: AWS::DMS::ReplicationInstance
    Properties:
DMSReplicationInstancePubliclyAccessible-FAILED.yml#L4
    Type: AWS::DMS::ReplicationInstance
    Properties:
      ReplicationInstanceClass: dms.c4.large
  Resource1:
    Type: AWS::DMS::ReplicationInstance
    Properties:
DMSReplicationInstancePubliclyAccessible-FAILED.yml#L4
    Type: AWS::DMS::ReplicationInstance
    Properties:
      ReplicationInstanceClass: dms.c4.large
  Resource1:
    Type: AWS::DMS::ReplicationInstance
    Properties:
DMSReplicationInstancePubliclyAccessible-PASSED.yml#L4
    Type: AWS::DMS::ReplicationInstance
    Properties:
      PubliclyAccessible: False
      ReplicationInstanceClass: dms.c4.large
dms-replication-instance-is-not-public.json#L5
            "Type": "AWS::DMS::ReplicationInstance",
            "Properties": {
                "ReplicationInstanceClass": "dms.t2.small",
                "PubliclyAccessible": false
            }
        }
test.json#L5
      "Type": "AWS::DMS::ReplicationInstance"
    },
    "NonCompliantDMSReplicationInstance1": {
      "Type": "AWS::DMS::ReplicationInstance",
      "Properties": {
        "PubliclyAccessible": true
S6329.json#L5
      "Type": "AWS::DMS::ReplicationInstance"
    },
    "NonCompliantDMSReplicationInstance1": {
      "Type": "AWS::DMS::ReplicationInstance",
      "Properties": {
        "PubliclyAccessible": true
dms-replication-instance-public.json#L5
            "Type": "AWS::DMS::ReplicationInstance",
            "Properties": {
                "ReplicationInstanceClass": "dms.t2.small"
            }
        }
    }
dms_instance.json#L11
           "Type" : "AWS::DMS::ReplicationInstance",
           "Properties" : {
              {% if settings["allocatedstorage"] %}
              "AllocatedStorage" : "{{ settings["allocatedstorage"] }}",
              {% endif %}
              {% if settings["autominorversionupgrade"] %}

Parameters

Explanation in CloudFormation Registry

The AWS::DMS::ReplicationInstance resource creates an AWS DMS replication instance.

Frequently asked questions

What is AWS DMS Replication Instance?

AWS DMS Replication Instance 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 Replication Instance?

For Terraform, the SonarSource/sonar-iac, infracost/infracost and gilyas/infracost source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the sprathod369/iac-example, melscoop-test/check and bridgecrewio/checkov source code examples are useful. See the CloudFormation Example section for further details.