amazon-web-servicesaws-dms

How to force-shutdown an AWS DMS Serverless instance?


I am running AWS DMS [Serverless] on a small, one-record table I have on an on-premises SQL Server database. For the past 30 minutes, it has been stuck on step 4/8: Fetching Metadata.

When I look at the CloudWatch logs, I only see a thread of vague errors: {'replication_state':'failed', 'message': 'Failed to fetch metadata.', 'failure_message': 'Internal failure.'}

The 'status' of the serverless instance is 'Fetching Metadata'. There is no option to stop the replication in the console.

In fact, running that API call in the CLI: aws dms stop-replication --replication-config-arn <arn> yields the error:

An error occurred (InvalidResourceStateFault) when calling the StopReplication operation: Replication for Replication Config, <value> is in 'fetching_metadata' state and cannot be stopped.

I want to stop this instance from running indefinitely. How can I do that?


Solution

  • AWS DMS Stopped on it's own after just over an hour. The logs were rather unhelpful and would not explain what went wrong. In any case, there was no way I had found to force-stop DMS while it was in this state. I suspect it is not possible.

    Edit: I found that the issue was encasing my password in curly braces. The DMS Endpoint page (as of March 2024) specifies that encasing passwords with curly braces are necessary if the password contains special characters. However, this documentation wrong. Removing curly braces fixes the issue of DMS being stuck in the 'fetching metadata' stage.