@aws-mdaa/dataops-dms 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,131 @@
1
+ # Database Migration Service (DMS)
2
+
3
+ AWS Database Migration Service provides functionality to migrate data from source data stores (such as RDBMS) to destination data stores (such as RDBMS, or S3).
4
+
5
+ ***
6
+
7
+ ## Deployed Resources and Compliance Details
8
+
9
+ ![DMS](../../../constructs/L3/dataops/dataops-dms-l3-construct/docs/DMS.png)
10
+
11
+ **DMS Replication Instance** - Provisioned compute which will be used to perform replication tasks. MDAA ensures these are private and encrypted.
12
+
13
+ **DMS Endpoint** - Source and target data sources from/to which data will be migrated. MDAA ensures that endpoint credentials are securely managed exclusively through AWS Secrets Manager, or via AWS Role credentials.
14
+
15
+ **DMS Replication Task** - Tasks move data between DMS Endpoints, and are executed using Replication Instance compute.
16
+
17
+ ***
18
+
19
+ ## Configuration
20
+
21
+ ### MDAA Config
22
+
23
+ Add the following snippet to your mdaa.yaml under the `modules:` section of a domain/env in order to use this module:
24
+
25
+ ```yaml
26
+ dataops-dms: # Module Name can be customized
27
+ module_path: "@aws-caef/dataops-dms" # Must match module NPM package name
28
+ module_configs:
29
+ - ./dataops-dms.yaml # Filename/path can be customized
30
+ ```
31
+
32
+ ### Requiring a VPC role
33
+ DMS requires the existence of a `dms-vpc-role` role. If this role doesn't already exist, in the first DMS module configuration you need to add the following flag:
34
+
35
+ ```yaml
36
+ createDmsVpcRole: true
37
+ ```
38
+ See its use in the full example below.
39
+
40
+ For more information about this requirement, see DMS [documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DMS_migration-IAM.dms-vpc-role.html) for more details.
41
+
42
+ ### Module Config (./dataops-dms.yaml)
43
+
44
+ [Config Schema Docs](SCHEMA.md)
45
+
46
+ ```yaml
47
+ # Name of the DataOps Project
48
+ projectName: test-project
49
+
50
+ # Contains all DMS related configuration
51
+ dms:
52
+ # do we need to create the one-per-account role of `dms-vpc-role` that is required before DMS is created
53
+ createDmsVpcRole: true
54
+ # The role DMS tasks will run as. This role will require prior access to AWS-service based endpoints.
55
+ # Access to secrets referenced in the config will be granted automatically.
56
+ # Role must also have an assume role trust policy to the regional DMS service name: dms.<region>.amazonaws.com
57
+ dmsRoleArn: arn:{{partition}}:iam::{{account}}:role/test-dms-role
58
+
59
+ # Replication instances which will be provisioned by the config
60
+ replicationInstances:
61
+ # Each instance has a unique name in the config
62
+ test-instance:
63
+ # The instance class.
64
+ # See https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.Types.html for options
65
+ instanceClass: dms.t3.micro
66
+ # The VPC Id on which the replication instance will be deployed
67
+ vpcId: test_vpc_id
68
+ # The subnets to which the replication instance will be connected.
69
+ subnetIds:
70
+ - test_subnet_id1
71
+ - test_subnet_id2
72
+
73
+ # Endpoints which will be created by the config
74
+ endpoints:
75
+ # Each endpoint has a unique name
76
+ test-source:
77
+ # The type of endpoint--one of 'source' or 'target'
78
+ endpointType: source
79
+ # The endpoint engine name.
80
+ # One of mysql | oracle | postgres | mariadb | aurora | aurora-postgresql |
81
+ # opensearch | redshift | redshift-serverless |s3 | db2 | azuredb | sybase |
82
+ # dynamodb | mongodb | kinesis | kafka | elasticsearch | docdb | sqlserver | neptune
83
+ engineName: sqlserver
84
+ # The appropriate settings for the provided engine name.
85
+ microsoftSqlServerSettings:
86
+ # Name of the database
87
+ databaseName: test-database
88
+ # Arn of the secret from which credentials will be read.
89
+ # The DMS role will be granted access to retrieve the secret
90
+ secretsManagerSecretArn: arn:{{partition}}:secretsmanager:{{region}}:{{account}}:secret:test-secret-abc123
91
+ # The DMS role will be granted decrypt access to this key
92
+ secretsManagerSecretKMSArn: arn:{{partition}}:kms:{{region}}:{{account}}:key:test-secret-key-id
93
+ test-target:
94
+ endpointType: target
95
+ engineName: s3
96
+ s3Settings:
97
+ bucketName: test_target_bucket
98
+ serverSideEncryptionKmsKeyId: test_target_kms_key_id
99
+
100
+ # Replication tasks which will be created by the config.
101
+ replicationTasks:
102
+ # Each replication task has a unique name
103
+ test-task:
104
+ # The name of the replication instance to be used from the 'replicationInstances' section of the config
105
+ replicationInstance: test-instance
106
+ # The name of the source endpoint to be used from the 'endpoints' section of the config
107
+ sourceEndpoint: test-source
108
+ # The name of the target endpoint to be used from the 'endpoints' section of the config
109
+ targetEndpoint: test-target
110
+ # The type of migration
111
+ # One of `full-load` | `cdc` | `full-load-and-cdc`
112
+ migrationType: full-load
113
+ # Table mappings config to be used
114
+ # Will be passed directly to the task config.
115
+ tableMappings:
116
+ rules:
117
+ - rule-type: selection
118
+ rule-id: '1'
119
+ rule-name: '1'
120
+ object-locator:
121
+ schema-name: Test
122
+ table-name: "%"
123
+ rule-action: include
124
+ - rule-type: selection
125
+ rule-id: '2'
126
+ rule-name: '2'
127
+ object-locator:
128
+ schema-name: Test
129
+ table-name: DMS%
130
+ rule-action: exclude
131
+ ```