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_arnoptional computed - string -
database_nameoptional - string -
endpoint_arnoptional computed - string -
endpoint_idrequired - string -
endpoint_typerequired - string -
engine_namerequired - string -
extra_connection_attributesoptional computed - string -
idoptional computed - string -
kms_key_arnoptional computed - string -
passwordoptional - string -
portoptional - number -
server_nameoptional - string -
service_access_roleoptional - string -
ssl_modeoptional computed - string -
tagsoptional - map from string to string -
usernameoptional - string -
elasticsearch_settingslist block-
endpoint_urirequired - string -
error_retry_durationoptional - number -
full_load_error_percentageoptional - number -
service_access_role_arnrequired - string
-
-
kafka_settingslist block -
kinesis_settingslist block-
message_formatoptional - string -
service_access_role_arnoptional - string -
stream_arnoptional - string
-
-
mongodb_settingslist block-
auth_mechanismoptional - string -
auth_sourceoptional - string -
auth_typeoptional - string -
docs_to_investigateoptional - string -
extract_doc_idoptional - string -
nesting_leveloptional - string
-
-
s3_settingslist block-
bucket_folderoptional - string -
bucket_nameoptional - string -
compression_typeoptional - string -
csv_delimiteroptional - string -
csv_row_delimiteroptional - string -
date_partition_enabledoptional - bool -
external_table_definitionoptional - string -
service_access_role_arnoptional - 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
-
SybaseSettingsoptional - SybaseSettings -
RedisSettingsoptional - RedisSettings -
OracleSettingsoptional - OracleSettings -
KafkaSettingsoptional - KafkaSettings -
Portoptional - Integer -
MySqlSettingsoptional - MySqlSettings -
S3Settingsoptional - S3Settings -
ResourceIdentifieroptional - String -
KinesisSettingsoptional - KinesisSettings -
SslModeoptional - String -
RedshiftSettingsoptional - RedshiftSettings -
EndpointTyperequired - String -
Tagsoptional - List of Tag -
Passwordoptional - String -
MongoDbSettingsoptional - MongoDbSettings -
IbmDb2Settingsoptional - IbmDb2Settings -
KmsKeyIdoptional - String -
DatabaseNameoptional - String -
NeptuneSettingsoptional - NeptuneSettings -
ElasticsearchSettingsoptional - ElasticsearchSettings -
EngineNamerequired - String -
DocDbSettingsoptional - DocDbSettings -
DynamoDbSettingsoptional - DynamoDbSettings -
Usernameoptional - String -
MicrosoftSqlServerSettingsoptional - MicrosoftSqlServerSettings -
ServerNameoptional - String -
ExtraConnectionAttributesoptional - String -
EndpointIdentifieroptional - String -
CertificateArnoptional - String -
PostgreSqlSettingsoptional - PostgreSqlSettings
Explanation in CloudFormation Registry
The
AWS::DMS::Endpointresource 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.