我想要刪除與我的 AWS 帳戶相關聯的 Amazon Relational Database Service (Amazon RDS) 資源,以免持續產生費用。
注意: 如果您在執行 AWS Command Line Interface (AWS CLI) 命令時收到錯誤訊息,請參閱 Troubleshooting errors for the AWS CLI (對 AWS CLI 錯誤進行疑難排解)。此外,請務必使用最新版 AWS CLI。
若要取得您帳戶中會產生费用的使用中資源清單,請針對您資源所在的每個 AWS 區域執行下列命令。在每個命令中,請將 your_region 替換成您的區域。
資料庫執行個體和快照
若要取得特定區域中所有 RDS 資料庫執行個體的清單,請執行下列 describe-db-instances 命令:
aws rds describe-db-instances --region your_region
在前述命令的輸出內容中,請檢視 DBInstanceIdentifier 與 DeletionProtection 欄位。
在您刪除資料庫執行個體之前,請先修改執行個體以關閉刪除保護功能。然後,刪除資料庫執行個體。
若要取得特定區域中所有手動 RDS 資料庫執行個體快照的清單,請執行下列 describe-db-snapshots 命令:
aws rds describe-db-snapshots --snapshot-type manual --region your_region
在前述命令的輸出內容中,請檢視 DBSnapshotIdentifier 欄位。若要刪除資料庫快照,請參閱 Deleting a DB snapshot (刪除資料庫快照)。
Aurora 資料庫叢集和快照
若要取得特定區域中所有 Amazon Aurora 資料庫叢集的清單,請執行下列 describe-db-clusters 命令:
aws rds describe-db-clusters --region your_region
在前述命令的輸出內容中,請檢視 DBClusterIdentifier 與 DeletionProtection 欄位。
在您刪除資料庫叢集之前,請先修改叢集以關閉刪除保護功能。然後,刪除資料庫叢集。詳情請參閱如何對刪除 Aurora 資料庫叢集時發生的問題進行疑難排解?
若要取得特定區域中所有手動 Aurora 叢集快照的清單,請執行下列 describe-db-snapshots 命令:
aws rds describe-db-cluster-snapshots --snapshot-type manual --region your_region
在前述命令的輸出內容中,請檢視 DBSnapshotIdentifier 欄位。若要刪除叢集快照,請參閱 Deleting a DB cluster snapshot (刪除資料庫叢集快照)。
當您刪除資料庫執行個體時,Amazon RDS 會在您所設定的保留期內繼續保留該執行個體的自動備份。自動備份會持續產生儲存費用,直到過期或由您手動刪除為止。
若要取得自動備份的清單,請執行下列 describe-db-instance-automated-backups 命令:
aws rds describe-db-instance-automated-backups
若要在自動備份過期前手動將其刪除,請執行下列 delete-db-instance-automated-backup 命令:
aws rds delete-db-instance-automated-backup --dbi-resource-id resource-id
注意: 請將 resource-id 替換成您的資料庫執行個體資源 ID。
若您在刪除 RDS 和 Aurora 資源後仍持續產生費用,請採取下列行動:
確保您已檢查所有用於存放資源的區域。
確認您已刪除所有自動備份。
使用 AWS 帳單與成本管理主控台上的 AWS Cost Explorer,檢視您標記為「Amazon RDS」的項目。
若您已購買預留資料庫執行個體,請執行下列 describe-reserved-db-instances 命令,列出所有使用中的預留資料庫執行個體及其剩餘期限:
aws rds describe-reserved-db-instances
注意: 您可以刪除預留資料庫執行個體。不過,您仍需為預留資料庫執行個體支付費用,直到預留期限屆滿為止。
Amazon RDS 定價
This article was reviewed and updated on 2026-03-27.
AWS Official
回答 2 個月前
rePost-User-3765554
已提問 2 年前
jackietsairock
已提問 3 年前
david
Zoe
Diego
Donnie LI
已發佈 2 年前