aws / aws-sdk-js-v3

Modularized AWS SDK for JavaScript.
Apache License 2.0
3.12k stars 579 forks source link

InternalFailure: An internal error has occurred. Please try your query again at a later time. #6562

Open lbecker34 opened 1 month ago

lbecker34 commented 1 month ago

I am receiving an error when using the SwitchoverGlobalClusterCommand to try and switchover my global rds cluster.

Here is the code I am using

import {
  RDSClient,
  SwitchoverGlobalClusterCommand,
} from '@aws-sdk/client-rds';

....

     const rdsClient = new RDSClient({ });
      const input = {
        GlobalClusterIdentifier: globalClusterIdentifier,
        TargetDbClusterIdentifier: targetClusterArn, // Use the ARN of the cluster to promote
      };
      const command = new SwitchoverGlobalClusterCommand(input);
      await rdsClient.send(command);

Here is the error I am receiving.

{
  "errorType": "InternalFailure",
  "errorMessage": "An internal error has occurred. Please try your query again at a later time.",
  "trace": [
    "InternalFailure: An internal error has occurred. Please try your query again at a later time.",
    "    at throwDefaultError (/var/task/node_modules/@smithy/smithy-client/dist-cjs/index.js:846:20)",
    "    at /var/task/node_modules/@smithy/smithy-client/dist-cjs/index.js:855:5",
    "    at de_CommandError (/var/task/node_modules/@aws-sdk/client-rds/dist-cjs/index.js:7397:14)",
    "    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
    "    at async /var/task/node_modules/@smithy/middleware-serde/dist-cjs/index.js:35:20",
    "    at async /var/task/node_modules/@smithy/core/dist-cjs/index.js:165:18",
    "    at async /var/task/node_modules/@smithy/middleware-retry/dist-cjs/index.js:320:38",
    "    at async /var/task/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:34:22",
    "    at async callWithRetry (file:///var/task/node_modules/@swa-acs/lambda/src/utils/call-with-retry.js:11:13)",
    "    at async DBFailoverManager.failover (file:///var/task/src/db-failover/managers/manager.mjs:73:7)"
  ]
}

Does anyone have any ideas what I might be doing wrong?

aBurmeseDev commented 1 week ago

Hi @lbecker34 - thanks for reaching out.

Which SDK version are you using? I'm not able to reproduce it on v3.682.0 using same input params as you.

github-actions[bot] commented 1 hour ago

This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.