AWS DMS Endpoint

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

aws_dms_endpoint (Terraform)

The Endpoint in AWS DMS can be configured in Terraform with the resource name aws_dms_endpoint. The following sections describe 4 examples of how to use the resource and its parameters.

Example Usage from GitHub

dms-endpoint.tf#L6
resource "aws_dms_endpoint" "asupmcld" {
  endpoint_id   = "asupmcld"
  endpoint_type = "target"
  engine_name   = "oracle"
  port          = 1521
  ssl_mode      = "none"
dms.tf#L13
resource "aws_dms_endpoint" "dms_endpoint_source" {
  database_name = aws_db_instance.db_source.name
  endpoint_id   = "source-pg"
  endpoint_type = "source"
  engine_name   = "postgres"
  password      = aws_db_instance.db_source.password
dms.tf#L38
resource "aws_dms_endpoint" "dms-endpoint-source" {
  endpoint_id   = "dms-endpoint-source"
  endpoint_type = "source"
  engine_name   = "sqlserver"
  server_name   = var.dbserver
  database_name = "AdventureWorksLT2019"
kms_key.tf#L19
resource "aws_dms_endpoint" "kms_key_arn_is_set" {
  endpoint_id   = var.test_id
  endpoint_type = var.test_engine_type
  engine_name   = var.test_engine_name
  kms_key_arn   = aws_kms_key.test_key.arn
}

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

Note: All arguments including the password will be stored in the raw state as plain-text. Read more about sensitive data in state.

AWS::DMS::Endpoint (CloudFormation)

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

Example Usage from GitHub

dms.yml#L49
    Type: AWS::DMS::Endpoint
    Properties:
      DatabaseName: streaming_db
      EndpointIdentifier: !Sub ${PJPrefix}-dms-source-endpoint-001
      EndpointType: source
      EngineName: aurora-postgresql
dms_endpoint_password_ssm.yml#L4
    Type: AWS::DMS::Endpoint
    Properties:
      EngineName: aurora
      EndpointType: source
      Password: '{{resolve:ssm:UnsecureSecretString:1}}'
      Port: 3306
dms_endpoint_no_password.yml#L4
    Type: AWS::DMS::Endpoint
    Properties:
      EngineName: aurora
      EndpointType: source
      Port: 3306
      ServerName: foobar
dms_endpoint_password_plaintext.yml#L4
    Type: AWS::DMS::Endpoint
    Properties:
      EngineName: aurora
      EndpointType: source
      Password: b@dP@$sW0rD
      Port: 3306
dms_endpoint_password_ssm-secure.yml#L4
    Type: AWS::DMS::Endpoint
    Properties:
      EngineName: aurora
      EndpointType: source
      Password: '{{resolve:ssm-secure:SecureSecretString:1}}'
      Port: 3306
DMS-POC_CFT.json#L88
            "Type": "AWS::DMS::Endpoint",
            "Properties": {
                "EngineName": "oracle",
                "EndpointType": "source",
                "Username": "master",
                "Password": "SecretPassword01",
DmsStack.template.json#L44
      "Type": "AWS::DMS::Endpoint",
      "Properties": {
        "EndpointType": "source",
        "EngineName": "sqlserver",
        "DatabaseName": "dbname1",
        "EndpointIdentifier": "dbserver1-dbname1-sqlserver-source-endpoint",
positive4.json#L4
      "Type": "AWS::DMS::Endpoint",
      "Properties": {
        "MongoDbSettings": "MongoDbSettings",
        "Port": 80,
        "SslMode": "String",
        "Username": "String",
dms-task-new-endpoints-template.json#L37
      "Type": "AWS::DMS::Endpoint",
      "Properties": {
        "ServerName": "sourceEndpointURL",
        "EndpointIdentifier": "mySourceEndpoint",
        "EndpointType": "source",
        "EngineName": "mysql",
tree.json#L1311
              "aws:cdk:cloudformation:type": "AWS::DMS::Endpoint",
              "aws:cdk:cloudformation:props": {
                "endpointType": "source",
                "engineName": "sqlserver",
                "databaseName": "dbname1",
                "endpointIdentifier": "dbserver1-dbname1-sqlserver-source-endpoint",

Parameters

Explanation in CloudFormation Registry

The AWS::DMS::Endpoint resource creates an AWS DMS endpoint.

Currently, the only endpoint setting types that AWS CloudFormation supports are DynamoDBSettings, ElasticSearchSettings, and NeptuneSettings.

Frequently asked questions

What is AWS DMS Endpoint?

AWS DMS Endpoint 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 Endpoint?

For Terraform, the gmallipeddi/terraform-asudev7, Exlabs/internalmeetups and gkolluru/aws-terraform-dms source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the jimatomo/dms-kinesis-kcl, stelligent/cfn_nag and stelligent/cfn_nag source code examples are useful. See the CloudFormation Example section for further details.