Logo

dev-resources.site

for different kinds of informations.

Troubleshooting and Fixing AWS DMS Instance Creation Error

Published at
5/14/2024
Categories
aws
dms
cdk
Author
hvmathan
Categories
3 categories in total
aws
open
dms
open
cdk
open
Author
8 person written this
hvmathan
open
Troubleshooting and Fixing AWS DMS Instance Creation Error

Are you encountering an error while attempting to create an instance in AWS Database Migration Service (DMS)? Don't fret; you're not alone. Recently, I stumbled upon an issue during DMS instance creation and delved into the solution to share my insights with you.

The Error:
You might come across an error message similar to this:

**Error**: creating DMS Replication Instance (my-replication-instance1): InvalidSubnet: No default subnet detected in VPC. Please contact AWS Support to recreate default Subnets
Enter fullscreen mode Exit fullscreen mode

Understanding the Error:
This error crops up when DMS fails to identify a default subnet in the Virtual Private Cloud (VPC). By default, DMS attempts to utilize the default VPC subnet group. However, if the default VPC or its associated subnet group isn't available, the creation process hits a snag.

Root Cause:
The crux of the issue lies in the absence of a specified subnet group. Without explicit instructions, DMS defaults to the non-existent default VPC subnet group, resulting in the error.

Resolution:
The fix is straightforward. Create a DMS subnet group aligned with the custom subnets provisioned in your VPC. Then, when initiating the replication instance creation, ensure to specify this subnet group explicitly.

Implementation via AWS CDK:
Here's a step-by-step guide to achieving the resolution using AWS CDK:

Import Necessary Libraries:

import { DmsReplicationInstance } from "@cdktf/provider-aws/lib/dms-replication-instance";
import { DmsReplicationSubnetGroup } from "@cdktf/provider-aws/lib/dms-replication-subnet-group";
Enter fullscreen mode Exit fullscreen mode

Define Constants:

const replicationSubnetGroup = new DmsReplicationSubnetGroup(
    stacks.infra,
    "MyReplicationSubnetGroup",
    {
      replicationSubnetGroupDescription: "MyReplicationSubnetGroup",
      replicationSubnetGroupId: "my-replication-subnet-group1",
      subnetIds: _app.privateSubnetIds,
    }
  );
Enter fullscreen mode Exit fullscreen mode

Specify the Subnet:

replicationSubnetGroupId: replicationSubnetGroup.id
Enter fullscreen mode Exit fullscreen mode

Additional Resources:
For further guidance, refer to the following documents:

[+] Creating a replication instance - https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.Creating.html
[+] aws dms - create-replication-instance
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dms/create-replication-instance.html

dms Article's
30 articles in total
Favicon
Top 9 Challenges and Solutions for eDMS Software in Pharma Industry
Favicon
Optimizing Security and Efficiency in AWS Database Migration with DMS: Understanding Outbound-Only Connectivity
Favicon
Database and Their Relationships
Favicon
AWS Database Migration Service now includes enhanced monitoring dashboard for your DMS tasks
Favicon
AWS DMS Table failure due to freeze period in source
Favicon
Building a Scalable Data Platform: Addressing Uncertainty in Data Requirements with AWS
Favicon
Testing AWS Database Migrations & Accelerating Development with Cloud Pods
Favicon
DMS error - Failed to get the capture list from the endpoint
Favicon
Distribution Management Software
Favicon
Troubleshooting and Fixing AWS DMS Instance Creation Error
Favicon
Why AWS DMS is loved by ETL experts
Favicon
RDS Database Migration Series - A horror story of using AWS DMS with a happy ending
Favicon
Migrando geometries con DMS
Favicon
Download Amazon invoices automatically
Favicon
Amazon Rechnungen automatisiert herunterladen
Favicon
Jeder braucht ein DMS zuhause
Favicon
Everyone needs a DMS at home
Favicon
Using DMS to replicate data from RDS(MySQL) to Open Search
Favicon
How can product suppliers balance DMS benefits with integration challenges for an efficient supply chain?
Favicon
AWS DMS - Database Migration to AWS
Favicon
Database Migration steps with the AWS CLI - 2
Favicon
Database Migration steps with the AWS CLI - 1
Favicon
AWS DMS and Prefect: The Key to Building a Robust Data Warehouse
Favicon
Migrating a MySQL database to AWS RDS using AWS DMS with zero downtime
Favicon
Case Study: How to replicate database from AWS to outside?
Favicon
Build An App Like Amazon - Amazon Clone App
Favicon
Implementing Change Data Capute (CDC) with Aurora Serverless v2
Favicon
Configure SSL between RDS and Weblogic / DMS endpoint
Favicon
How to use SQL Developer’s Diff Wizard to Complete a DMS Migration for Oracle 12c
Favicon
AWS Database Migration Service: Limitations

Featured ones: