

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 部署解決方案
<a name="deploy-the-solution"></a>

設定必要條件之後，請依照 [DR 協調程式架構模式](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/automate-cross-region-failover-and-failback-by-using-dr-orchestrator-framework.html)中的指示進行。Amazon 和 Amazon RDSAurora 包括說明 ElastiCache。若要測試解決方案，請檢閱先決條件和限制，並在上部署範例資料庫 AWS。

**先決條件**
+ 主動[AWS 帳戶](https://aws.amazon.com/free/)部署此解決方案。
+ 建立 [Amazon Simple Storage Service (Amazon S3)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) 儲存貯體的許可，以及[AWS CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html)範本中使用的資源。
+ 在運行`DR Orchestrator FAILBACK`狀態機之前：
  + 手動[修改RDS執行個體](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html)或[修改 Amazon Aurora 資料庫叢集，然後](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Modifying.html)停用`DeletionProtection`。
  + 如果您打算執行根本原因分析 (RCA)，請在刪除 Amazon RDS 執行個體或 Aurora 叢集之前拍攝[資料庫快照](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateSnapshot.html)。

**限制**
+ 功能可用性和支援會因每個資料庫引擎的特定版本而有所不同 AWS 區域。如需跨區域複寫功能和區域可用性的詳細資訊，請參閱[跨區域僅供讀取](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RDS_Fea_Regions_DB-eng.Feature.CrossRegionReadReplicas.html)複本。
+ 此解決方案已使用主要資料庫執行個體與一個僅供讀取複本進行測試。如果您想要使用一個以上的僅供讀取複本，請先徹底測試解決方案，然後再在生產環境中實作。
+ 對於 AmazonRDS，該解決方案僅支持以下引擎：[我RDS的 Amazon SQL](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html)[，Postgre RDS SQL 的](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html) Amazon 和 [Amazon RDS 的 MariaDB](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html)。

**部署範例資料庫 **AWS****

若要在上展示適用於資料庫的跨區域 DR 解決方案 AWS，您可以[RDS為我的SQL、Amazon Aurora 我](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html)[的SQL相容版本](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.AuroraMySQL.html)和 [Amazon ElastiCache (RedisOSS)-](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html) 全球資料存放區部署亞馬遜。使用 [aws-cross-region-dr-數據庫 GitHub 存庫`App-Stack``README`文件中的](https://github.com/aws-samples/aws-cross-region-dr-databases/tree/main/App-Stack)說明。在此範例中，主要「區域」為`us-east-1`，次要「區域」為`us-west-2`。

應用程式堆疊使用 [ AWS CloudFormation [輸](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html)出] 區段來匯出 DR Orchestrator Framework 所使用的 AWS 參數，以自動化資料庫的容錯移轉和容錯回復。