CDK DMS replication instance


I try to setup a DMS replication instance using CDK, it's working almost as expected except that the instance is deployed in the default VPC.

Is there a way to choose the VPC for this instance using CDK? It's possible to choose the VPC using the AWS console but I didn't manage to do it using CDK.


asked 2 years ago112 views
1 Answer
Accepted Answer

Manage to make it works with this code:

    tmp = []
    for sub in vpc.private_subnets:

    rep_sub = dms.CfnReplicationSubnetGroup(self, "rep_sub",
                                           replication_subnet_group_description="desc rep_sub",

    rep = dms.CfnReplicationInstance(self, "rep-instance",

It creates the Subnet group and the association with the replication instance. The replication instance is then placed in the VPC where the subnets belongs.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions