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
resource "aws_dms_endpoint" "asupmcld" {
endpoint_id = "asupmcld"
endpoint_type = "target"
engine_name = "oracle"
port = 1521
ssl_mode = "none"
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
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"
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
}
Parameters
-
certificate_arn
optional computed - string -
database_name
optional - string -
endpoint_arn
optional computed - string -
endpoint_id
required - string -
endpoint_type
required - string -
engine_name
required - string -
extra_connection_attributes
optional computed - string -
id
optional computed - string -
kms_key_arn
optional computed - string -
password
optional - string -
port
optional - number -
server_name
optional - string -
service_access_role
optional - string -
ssl_mode
optional computed - string -
tags
optional - map from string to string -
username
optional - string -
elasticsearch_settings
list block-
endpoint_uri
required - string -
error_retry_duration
optional - number -
full_load_error_percentage
optional - number -
service_access_role_arn
required - string
-
-
kafka_settings
list block -
kinesis_settings
list block-
message_format
optional - string -
service_access_role_arn
optional - string -
stream_arn
optional - string
-
-
mongodb_settings
list block-
auth_mechanism
optional - string -
auth_source
optional - string -
auth_type
optional - string -
docs_to_investigate
optional - string -
extract_doc_id
optional - string -
nesting_level
optional - string
-
-
s3_settings
list block-
bucket_folder
optional - string -
bucket_name
optional - string -
compression_type
optional - string -
csv_delimiter
optional - string -
csv_row_delimiter
optional - string -
date_partition_enabled
optional - bool -
external_table_definition
optional - string -
service_access_role_arn
optional - string
-
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
Type: AWS::DMS::Endpoint
Properties:
DatabaseName: streaming_db
EndpointIdentifier: !Sub ${PJPrefix}-dms-source-endpoint-001
EndpointType: source
EngineName: aurora-postgresql
Type: AWS::DMS::Endpoint
Properties:
EngineName: aurora
EndpointType: source
Password: '{{resolve:ssm:UnsecureSecretString:1}}'
Port: 3306
Type: AWS::DMS::Endpoint
Properties:
EngineName: aurora
EndpointType: source
Port: 3306
ServerName: foobar
Type: AWS::DMS::Endpoint
Properties:
EngineName: aurora
EndpointType: source
Password: b@dP@$sW0rD
Port: 3306
Type: AWS::DMS::Endpoint
Properties:
EngineName: aurora
EndpointType: source
Password: '{{resolve:ssm-secure:SecureSecretString:1}}'
Port: 3306
"Type": "AWS::DMS::Endpoint",
"Properties": {
"EngineName": "oracle",
"EndpointType": "source",
"Username": "master",
"Password": "SecretPassword01",
"Type": "AWS::DMS::Endpoint",
"Properties": {
"EndpointType": "source",
"EngineName": "sqlserver",
"DatabaseName": "dbname1",
"EndpointIdentifier": "dbserver1-dbname1-sqlserver-source-endpoint",
"Type": "AWS::DMS::Endpoint",
"Properties": {
"MongoDbSettings": "MongoDbSettings",
"Port": 80,
"SslMode": "String",
"Username": "String",
"Type": "AWS::DMS::Endpoint",
"Properties": {
"ServerName": "sourceEndpointURL",
"EndpointIdentifier": "mySourceEndpoint",
"EndpointType": "source",
"EngineName": "mysql",
"aws:cdk:cloudformation:type": "AWS::DMS::Endpoint",
"aws:cdk:cloudformation:props": {
"endpointType": "source",
"engineName": "sqlserver",
"databaseName": "dbname1",
"endpointIdentifier": "dbserver1-dbname1-sqlserver-source-endpoint",
Parameters
-
SybaseSettings
optional - SybaseSettings -
RedisSettings
optional - RedisSettings -
OracleSettings
optional - OracleSettings -
KafkaSettings
optional - KafkaSettings -
Port
optional - Integer -
MySqlSettings
optional - MySqlSettings -
S3Settings
optional - S3Settings -
ResourceIdentifier
optional - String -
KinesisSettings
optional - KinesisSettings -
SslMode
optional - String -
RedshiftSettings
optional - RedshiftSettings -
EndpointType
required - String -
Tags
optional - List of Tag -
Password
optional - String -
MongoDbSettings
optional - MongoDbSettings -
IbmDb2Settings
optional - IbmDb2Settings -
KmsKeyId
optional - String -
DatabaseName
optional - String -
NeptuneSettings
optional - NeptuneSettings -
ElasticsearchSettings
optional - ElasticsearchSettings -
EngineName
required - String -
DocDbSettings
optional - DocDbSettings -
DynamoDbSettings
optional - DynamoDbSettings -
Username
optional - String -
MicrosoftSqlServerSettings
optional - MicrosoftSqlServerSettings -
ServerName
optional - String -
ExtraConnectionAttributes
optional - String -
EndpointIdentifier
optional - String -
CertificateArn
optional - String -
PostgreSqlSettings
optional - PostgreSqlSettings
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.