本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
刪除 Aurora Serverless v1 資料庫叢集
重要
AWS 已宣布 的end-of-lifeAurora Serverless v1:2025 年 3 月 31 日
視您建立Aurora Serverless v1資料庫叢集的方式而定,預設可能會開啟刪除保護。您無法立即刪除已啟用刪除保護的Aurora Serverless v1資料庫叢集。若要使用 Aurora Serverless v1 刪除具有刪除保護的資料庫叢集 AWS Management Console,請先修改叢集以移除此保護。如需 AWS CLI 針對此任務使用 的詳細資訊,請參閱 AWS CLI。
使用 停用刪除保護 AWS Management Console
登入 AWS Management Console 並開啟位於 https://https://console.aws.amazon.com/rds/
的 Amazon RDS 主控台。 -
在導覽窗格中,選擇 DB clusters (資料庫叢集)。
-
從清單中選擇 Aurora Serverless v1 資料庫叢集。
-
選擇 Modify (修改) 以開啟資料庫叢集的組態。「修改資料庫叢集」頁面會開啟 Aurora Serverless v1 資料庫叢集的設定、容量設定和其他組態詳細資訊。刪除保護位於 Additional configuration (其他組態) 區段中。
-
取消勾選 Additional configuration (其他組態) 屬性卡中的 Enable deletion protection (啟用刪除保護) 核取方塊。
-
選擇 Continue (繼續)。此時系統會顯示 Summary of modifications (修改摘要)。
-
選擇 Modify cluster (修改叢集) 以接受修改摘要。您也可以選擇 Back (上一步) 修改變更,或 Cancel (取消) 捨棄變更。
在刪除保護不再處於作用中狀態之後,您就可以使用 Aurora Serverless v1 刪除 AWS Management Console資料庫叢集。
刪除 Aurora Serverless v1 資料庫叢集
登入 AWS Management Console 並開啟位於 https://https://console.aws.amazon.com/rds/
的 Amazon RDS 主控台。 -
在 Resources (資源) 區段中,選擇 DB Clusters (資料庫叢集)。
-
選擇您要刪除的 Aurora Serverless v1 資料庫叢集。
-
對於 Actions (動作),請選擇 Delete (刪除)。系統會提示您確認是否要刪除 Aurora Serverless v1 資料庫叢集。
-
我們建議您保留預先選取的選項:
-
Create final snapshot? (是否建立最後的快照?) 的 Yes (是)
-
在 Final snapshot name (最終快照名稱) 的 Aurora Serverless v1 資料庫叢集名稱加上
-final-snapshot
。但是,您可以在此欄位中變更最終快照的名稱。
如果您為 Create final snapshot? (是否建立最後的快照?) 選擇 No (否),您就無法使用快照或 point-in-time 恢復來還原資料庫叢集。
-
-
選擇 Delete DB cluster (刪除資料庫叢集)。
Aurora Serverless v1 會刪除您的資料庫叢集。如果您選擇擁有最終快照,則會在 Aurora Serverless v1 資料庫叢集刪除之前看到資料庫叢集的狀態變更為「備份」,且不再出現在清單中。
開始之前, AWS CLI 請使用您的 AWS 存取金鑰 ID、 AWS Secret 存取金鑰和資料庫叢集 AWS 區域 所在的 Aurora Serverless v1 來設定 。如需詳細資訊,請參閱 AWS Command Line Interface 《 使用者指南》中的組態基本概念。
您必須先停用使用此選項設定之叢集的刪除保護,才能刪除 Aurora Serverless v1 資料庫叢集。如果您嘗試刪除已啟用此保護選項的叢集,您會看到下列錯誤訊息。
An error occurred (InvalidParameterCombination) when calling the DeleteDBCluster
operation: Cannot delete protected Cluster, please disable deletion protection and try again.
您可以使用 modify-db-cluster AWS CLI Aurora Serverless v1 命令變更資料庫叢集的刪除保護設定,如下所示:
aws rds modify-db-cluster --db-cluster-identifier
your-cluster-name
--no-deletion-protection
此命令會傳回指定資料庫叢集的修訂屬性。您現在就可以刪除 Aurora Serverless v1 資料庫叢集。
我們建議您每當刪除 Aurora Serverless v1 資料庫叢集時,一律建立最終快照。使用 AWS CLI delete-db-cluster 的下列範例會說明做法。您可以提供資料庫叢集的名稱和快照的名稱。
對於 Linux、 macOS或 Unix:
aws rds delete-db-cluster --db-cluster-identifier \
your-cluster-name
--no-skip-final-snapshot \ --final-db-snapshot-identifiername-your-snapshot
在 Windows 中:
aws rds delete-db-cluster --db-cluster-identifier ^
your-cluster-name
--no-skip-final-snapshot ^ --final-db-snapshot-identifiername-your-snapshot