RDS Failover API Issue

0

When I am performing failover_db_cluster operation using python boto3 api by passing writer DB instance identifier , it is giving me below error . But I can able to successfullly use other api like describe_db_clusters .

NOTE : I am running the code from EC2 instances.

Below sample code -

import boto3
session = boto3.Session()
client = session.client('rds')
response = client.failover_db_cluster(DBClusterIdentifier="test-instance-2")
print(response)

botocore.errorfactory.DBClusterNotFoundFault: An error occurred (DBClusterNotFoundFault) when calling the FailoverDBCluster operation: The source cluster could not be found or cannot be accessed: test-instance-2

can anybody let me know why I am getting the issue and what should be resolutions?

質問済み 2年前450ビュー
1回答
0
承認された回答

That cluster identifier looks like an instance "test-instance-2". Are you sure you've specified the correct identifier?

AWS
モデレーター
philaws
回答済み 2年前
  • I can't provide instance name for security reason thats why I have given dummy one . But I have verified from console about the writer db instances name and given it above script. One note here - Cluster is not public .

    Question here - Though I am able access and perform other API like describe_db_clusters() but not able to perform failover_db_cluster() ?

    Write instance name - -instance-2

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ