CDK DMS replication instance

0

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.

Thanks

질문됨 4년 전600회 조회
1개 답변
0
수락된 답변

Manage to make it works with this code:

    tmp = []
    for sub in vpc.private_subnets:
        tmp.append(sub.subnet_id)

    rep_sub = dms.CfnReplicationSubnetGroup(self, "rep_sub",
                                           replication_subnet_group_description="desc rep_sub",
                                           subnet_ids=tmp
                                           )

    rep = dms.CfnReplicationInstance(self, "rep-instance",
                                     replication_instance_class="dms.t2.micro",
                                     replication_subnet_group_identifier=rep_sub.ref,
                                     publicly_accessible=False
                                     )

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.

답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠