@aws-mdaa/dataops-dms 1.4.0 → 1.6.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 CHANGED
@@ -1,20 +1,63 @@
1
1
  # Database Migration Service (DMS)
2
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).
3
+ > **Note:** This documentation is also available in a rendered format [here](https://aws.github.io/modern-data-architecture-accelerator/packages/apps/dataops/dataops-dms-app/index.html).
4
4
 
5
- ***
5
+ Deploys AWS DMS replication instances, source/target endpoints, and replication tasks for migrating data between data stores (RDBMS, S3, etc.) with encrypted, VPC-bound replication and Secrets Manager credential management. Common scenarios include migrating on-premises databases to AWS, replicating data from relational databases into S3 for analytics, or setting up ongoing change data capture from source systems.
6
6
 
7
- ## Deployed Resources and Compliance Details
7
+ ---
8
8
 
9
- ![DMS](../../../constructs/L3/dataops/dataops-dms-l3-construct/docs/DMS.png)
9
+ ## Deployed Resources
10
+
11
+ This module deploys and integrates the following resources:
10
12
 
11
- **DMS Replication Instance** - Provisioned compute which will be used to perform replication tasks. MDAA ensures these are private and encrypted.
13
+ **DMS Replication Instance** - Provisioned compute used to perform replication tasks.
12
14
 
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.
15
+ **DMS Endpoint** - Source and target data sources from/to which data will be migrated.
14
16
 
15
17
  **DMS Replication Task** - Tasks move data between DMS Endpoints, and are executed using Replication Instance compute.
16
18
 
17
- ***
19
+ ![DMS](../../../constructs/L3/dataops/dataops-dms-l3-construct/docs/DMS.png)
20
+
21
+ ---
22
+
23
+ ## Related Modules
24
+
25
+ - [DataOps Project](../dataops-project-app/README.md) — Deploy the shared project infrastructure (KMS keys, security groups) that DMS resources reference
26
+ - [Data Lake](../../datalake/datalake-app/README.md) — DMS can replicate data into data lake S3 buckets as a target endpoint
27
+ - [Crawlers](../dataops-crawler-app/README.md) — Deploy crawlers to catalog DMS-replicated data in the Glue Catalog
28
+
29
+ ---
30
+
31
+ ## Security/Compliance Details
32
+
33
+ This module is designed in alignment with MDAA security/compliance principles and CDK nag rulesets. Additional review is recommended prior to production deployment, ensuring organization-specific compliance requirements are met.
34
+
35
+ - **Encryption at Rest**:
36
+ - Replication instances encrypted at rest with project KMS key
37
+ - Target endpoints support KMS server-side encryption for S3 destinations
38
+ - **Least Privilege**:
39
+ - Endpoint credentials managed exclusively through Secrets Manager
40
+ - DMS role automatically granted scoped access to retrieve secrets and decrypt associated KMS keys
41
+ - **Network Isolation**:
42
+ - Replication instances deployed in VPC with configurable subnets
43
+ - Private instances only (no public access)
44
+
45
+ ---
46
+
47
+ ## AWS Service Endpoints
48
+
49
+ The following VPC endpoints may be required if public AWS service endpoint connectivity is unavailable (e.g., private subnets without NAT gateway, firewalled environments, or PrivateLink-only architectures):
50
+
51
+ | AWS Service | Endpoint Service Name | Type |
52
+ | --------------- | --------------------------------------- | --------- |
53
+ | DMS | `com.amazonaws.{region}.dms` | Interface |
54
+ | KMS | `com.amazonaws.{region}.kms` | Interface |
55
+ | S3 | `com.amazonaws.{region}.s3` | Gateway |
56
+ | Secrets Manager | `com.amazonaws.{region}.secretsmanager` | Interface |
57
+ | CloudWatch Logs | `com.amazonaws.{region}.logs` | Interface |
58
+ | STS | `com.amazonaws.{region}.sts` | Interface |
59
+
60
+ ---
18
61
 
19
62
  ## Configuration
20
63
 
@@ -23,109 +66,70 @@ AWS Database Migration Service provides functionality to migrate data from sourc
23
66
  Add the following snippet to your mdaa.yaml under the `modules:` section of a domain/env in order to use this module:
24
67
 
25
68
  ```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
69
+ dataops-dms: # Module Name can be customized
70
+ module_path: '@aws-mdaa/dataops-dms' # Must match module NPM package name
71
+ module_configs:
72
+ - ./dataops-dms.yaml # Filename/path can be customized
30
73
  ```
31
74
 
32
75
  ### Requiring a VPC role
76
+
33
77
  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
78
 
35
79
  ```yaml
36
80
  createDmsVpcRole: true
37
81
  ```
38
- See its use in the full example below.
39
82
 
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.
83
+ 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).
41
84
 
42
- ### Module Config (./dataops-dms.yaml)
85
+ ### Module Config Samples and Variants
43
86
 
44
- [Config Schema Docs](SCHEMA.md)
87
+ Copy the contents of the relevant sample config below into the `./dataops-dms.yaml` file referenced in the MDAA config snippet above.
88
+
89
+ #### Minimal Configuration
90
+
91
+ Only required properties are included, with projectName to auto-wire KMS and other shared resources. Start here for a basic DMS replication setup within an existing DataOps project.
92
+
93
+ [sample-config-minimal.yaml](sample_configs/sample-config-minimal.yaml)
45
94
 
46
95
  ```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
96
+ # Contents available via above link
97
+ --8<-- "target/docs/packages/apps/dataops/dataops-dms-app/sample_configs/sample-config-minimal.yaml"
131
98
  ```
99
+
100
+ #### Comprehensive Configuration
101
+
102
+ Covers all available replication instance, endpoint, and task settings using projectName for auto-wiring shared resources. Start here when evaluating all available options for replication instances, endpoint types, and task settings.
103
+
104
+ [sample-config-comprehensive.yaml](sample_configs/sample-config-comprehensive.yaml)
105
+
106
+ ```yaml
107
+ # Contents available via above link
108
+ --8<-- "target/docs/packages/apps/dataops/dataops-dms-app/sample_configs/sample-config-comprehensive.yaml"
109
+ ```
110
+
111
+ #### Standalone Configuration (No Project)
112
+
113
+ Demonstrates standalone DMS configuration with explicit KMS, bucket, deployment role, and security configuration. Use this when deploying outside of a DataOps project, providing infrastructure references directly.
114
+
115
+ [sample-config-noproject.yaml](sample_configs/sample-config-noproject.yaml)
116
+
117
+ ```yaml
118
+ # Contents available via above link
119
+ --8<-- "target/docs/packages/apps/dataops/dataops-dms-app/sample_configs/sample-config-noproject.yaml"
120
+ ```
121
+
122
+ #### CDC Migration Configuration
123
+
124
+ Demonstrates CDC and full-load-and-cdc migration types with CDC-specific task properties (cdcStartPosition, cdcStartTime, cdcStopPosition). Choose this variant when you need ongoing change data capture replication from a source database rather than a one-time full-load migration.
125
+
126
+ [sample-config-cdc.yaml](sample_configs/sample-config-cdc.yaml)
127
+
128
+ ```yaml
129
+ # Contents available via above link
130
+ --8<-- "target/docs/packages/apps/dataops/dataops-dms-app/sample_configs/sample-config-cdc.yaml"
131
+ ```
132
+
133
+ ---
134
+
135
+ [Config Schema Docs](SCHEMA.md)