{"id":47235,"library":"cdk-dms-replication","title":"CDK DMS Replication","description":"L3 CDK constructs for Amazon Database Migration Service (DMS). Version 0.1.10 provides high-level constructs like DmsMigrationPipeline and DmsServerlessPipeline that bundle replication instance, endpoints, and tasks with secure defaults (private subnets, KMS encryption, auto security groups). Supports all DMS engines, full-load/CDC/full-load-and-CDC patterns, and includes fluent builders for table mappings and task settings. Actively maintained with monthly releases. Ships TypeScript types. Alternative to raw DMS CloudFormation resources — reduces boilerplate by ~80%.","status":"active","version":"0.1.10","language":"javascript","source_language":"en","source_url":"https://github.com/kckempf/cdk-dms-replication","tags":["javascript","aws","aws-dms","awscdk","cdc","cdk","constructs","database","dms","typescript"],"install":[{"cmd":"npm install cdk-dms-replication","lang":"bash","label":"npm"},{"cmd":"yarn add cdk-dms-replication","lang":"bash","label":"yarn"},{"cmd":"pnpm add cdk-dms-replication","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for AWS CDK infrastructure constructs.","package":"aws-cdk-lib","optional":false},{"reason":"Peer dependency for CDK construct base class.","package":"constructs","optional":false}],"imports":[{"note":"The package is ESM-only. Named import from the package.","wrong":"const DmsMigrationPipeline = require('cdk-dms-replication').DmsMigrationPipeline","symbol":"DmsMigrationPipeline","correct":"import { DmsMigrationPipeline } from 'cdk-dms-replication'"},{"note":"EndpointEngine is a custom enum provided by this package, not from aws-cdk-lib.","wrong":"import { EndpointEngine } from 'aws-cdk-lib/aws-dms'","symbol":"EndpointEngine","correct":"import { EndpointEngine } from 'cdk-dms-replication'"},{"note":"Named import. TableMappings is a fluent builder class.","wrong":"const TableMappings = require('cdk-dms-replication');","symbol":"TableMappings","correct":"import { TableMappings } from 'cdk-dms-replication'"}],"quickstart":{"code":"import * as cdk from 'aws-cdk-lib';\nimport * as ec2 from 'aws-cdk-lib/aws-ec2';\nimport {\n  DmsMigrationPipeline,\n  EndpointEngine,\n  MigrationType,\n  TableMappings,\n} from 'cdk-dms-replication';\n\nconst app = new cdk.App();\nconst stack = new cdk.Stack(app, 'MigrationStack');\n\nconst vpc = ec2.Vpc.fromLookup(stack, 'Vpc', { isDefault: false });\n\nnew DmsMigrationPipeline(stack, 'Pipeline', {\n  vpc,\n  migrationType: MigrationType.FULL_LOAD_AND_CDC,\n\n  sourceEndpoint: {\n    engine: EndpointEngine.MYSQL,\n    serverName: 'mysql.internal.example.com',\n    port: 3306,\n    username: 'dms_user',\n    password: cdk.SecretValue.secretsManager('mysql-dms-password'),\n    databaseName: 'orders',\n  },\n\n  targetEndpoint: {\n    engine: EndpointEngine.AURORA_POSTGRESQL,\n    serverName: cluster.clusterEndpoint.hostname,\n    port: 5432,\n    username: 'dms_user',\n    password: cdk.SecretValue.secretsManager('aurora-dms-password'),\n    databaseName: 'orders',\n  },\n\n  tableMappings: new TableMappings()\n    .includeSchema('public')\n    .excludeTable('public', 'audit_log')\n    .toJson(),\n});","lang":"typescript","description":"Provision a complete DMS migration pipeline (replication instance, source/target endpoints, task) in ~20 lines of CDK code using DmsMigrationPipeline."},"warnings":[{"fix":"Replace 'password: cdk.SecretValue.secretsManager(...)' with 'secretsManagerSecretId: 'your-secret-arn'' for better security.","message":"The 'password' field in endpoint config is deprecated; use 'secretsManagerSecretId' with AWS Secrets Manager instead.","severity":"deprecated","affected_versions":"<=0.1.10"},{"fix":"Set maxCapacityUnits to one of the allowed values: 1,2,4,8,16,32,64,128,192,256,384.","message":"DmsServerlessPipeline requires 'maxCapacityUnits' to be a power of two (1,2,4,8,16,32,64,128,192,256,384). Other values will cause deployment failure.","severity":"gotcha","affected_versions":">=0.1.0 <=0.1.10"},{"fix":"Use the result of .toJson() directly: tableMappings: new TableMappings().excludeTable('public', 'logs').toJson()","message":"TableMappings builder returns a JSON string, not an object. Passing the string directly to 'tableMappings' property is correct; do not call JSON.parse() or JSON.stringify() again.","severity":"gotcha","affected_versions":">=0.1.0 <=0.1.10"},{"fix":"Migrate to use 'secretsManagerSecretId' and store passwords in Secrets Manager.","message":"In version 0.2.0 (planned), the 'sourceEndpoint' and 'targetEndpoint' properties will require ISecret instead of string-based passwords. Existing code using 'password' field will break.","severity":"breaking","affected_versions":"<0.2.0"},{"fix":"Ensure the VPC has at least two private subnets (e.g., cidrMask: 24, maxAzs: 2).","message":"VPC passed to the construct must have at least two private subnets across different AZs. Using a VPC without private subnets or only one AZ will cause deployment failure.","severity":"gotcha","affected_versions":">=0.1.0 <=0.1.10"}],"env_vars":null,"search_vec":"'/cdc/full-load-and-cdc':48 '0.1.10':14 '80':77 'activ':60 'altern':68 'amazon':8 'auto':38 'aw':79,81 'aws-dm':80 'awscdk':83 'boilerpl':75 'builder':53 'bundl':25 'cdc':84 'cdk':1,5,85 'cloudform':72 'construct':6,19,86 'databas':9,87 'default':33 'dms':2,12,43,71,82,88 'dmsmigrationpipelin':21 'dmsserverlesspipelin':23 'encrypt':37 'endpoint':28 'engin':44 'fluent':52 'full':46 'full-load':45 'group':40 'high':17 'high-level':16 'includ':51 'instanc':27 'javascript':78 'kms':36 'l3':4 'level':18 'like':20 'load':47 'maintain':61 'map':56 'migrat':10 'month':63 'pattern':49 'privat':34 'provid':15 'raw':70 'reduc':74 'releas':64 'replic':3,26 'resourc':73 'secur':32,39 'servic':11 'set':59 'ship':65 'subnet':35 'support':41 'tabl':55 'task':30,58 'type':67 'typescript':66,89 'version':13","created_at":"2026-06-07T16:50:29.127172+00:00","updated_at":"2026-06-07T16:50:29.127172+00:00","problems":[{"fix":"Use ec2.Vpc.fromLookup or fromAttributes with correct subnet IDs. Ensure using private subnets.","cause":"VPC passed to the construct has a public subnet or the subnet ID is incorrect.","error":"Error: The following resource(s) failed to create: [ReplicationInstance...]. InvalidParameterValue: The subnet ID 'subnet-xxx' does not exist."},{"fix":"Always call .toJson() on TableMappings: new TableMappings().includeAll().toJson()","cause":"Forgot to call .toJson() on the TableMappings instance, or used an object literal instead.","error":"TypeError: Cannot read properties of undefined (reading 'toJson')"},{"fix":"Use secretsManagerSecretId instead of password: sourceEndpoint: { ..., secretsManagerSecretId: 'my-secret-arn' }","cause":"Provided a SecretValue object instead of a string for the password field (deprecated).","error":"Resource handler returned message: \"Invalid endpoint argument: 'Password' must be a string\""},{"fix":"Set maxCapacityUnits to a power of two from the allowed list: 1,2,4,8,16,32,64,128,192,256,384.","cause":"Set maxCapacityUnits to a non-allowed value on DmsServerlessPipeline.","error":"ValidationError: The parameter 'MaxCapacityUnits' must be one of the following values: 1,2,4,8,16,32,64,128,192,256,384"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/kckempf/cdk-dms-replication#readme","github":"https://github.com/kckempf/cdk-dms-replication","docs":null,"changelog":null,"pypi":null,"npm":"cdk-dms-replication","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}