

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

# 使用 CloudFormation 範本執行 Neptune 藍/綠解決方案
<a name="neptune-BG-console-cfn"></a>

您可以使用 AWS CloudFormation 部署 Neptune 藍/綠解決方案。CloudFormation 範本會在與您的藍色來源 Neptune 資料庫相同的 VPC 中建立 Amazon EC2 執行個體、在該處安裝解決方案，然後執行它。您可以在 CloudWatch 日誌中監控其進度，如[監控進度](neptune-BG-monitoring.md)中所述。

您可以使用這些連結來檢閱解決方案範本，或選取**啟動堆疊**按鈕以在 CloudFormation 主控台中啟動：


|  |  |  | 
| --- |--- |--- |
| [檢視](https://aws-neptune-customer-samples-us-east-1.s3.amazonaws.com/neptune-bg/bg.yaml) | [在設計工具中檢視](https://console.aws.amazon.com/cloudformation/designer/home?templateURL=https://aws-neptune-customer-samples-us-east-1.s3.amazonaws.com/neptune-bg/bg.yaml) | [https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=NeptuneBG&templateURL=https://aws-neptune-customer-samples-us-east-1.s3.amazonaws.com/neptune-bg/bg.yaml](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=NeptuneBG&templateURL=https://aws-neptune-customer-samples-us-east-1.s3.amazonaws.com/neptune-bg/bg.yaml)  | 

在 主控台中，從視窗右上角的下拉式清單中選擇您要執行解決方案 AWS 的區域。

設定堆疊參數，如下所示：
+ **`DeploymentID`** – 每個 Neptune 藍/綠部署獨有的識別符。

  其會用作綠色資料庫叢集識別符，以及用作字首以命名在部署期間建立的新資源。
+ **`NeptuneSourceClusterId`** – 您要升級之藍色資料庫叢集的識別符。
+ **`NeptuneTargetClusterVersion:`** – 您要將藍色資料庫叢集升級到的 [Neptune 引擎版本](engine-releases.md)。

  此版本必須高於目前藍色資料庫叢集的引擎版本。
+ **`DeploymentMode`** – 指示這是新部署還是繼續先前部署的嘗試。當您使用與先前部署相同的 `DeploymentID` 時，請將 `DeploymentMode` 設定為 `resume`。

  有效值為：`new` (預設值) 和 `resume`。
+ **`GraphQueryType`** – 資料庫的圖形資料類型。

  有效值為：`propertygraph` (預設值) 和 `rdf`。
+ **`SubnetId`** – 來自藍色資料庫叢集所在之相同 VPC 的子網路 ID。(請參閱[從同一 VPC 中的 Amazon EC2 執行個體連線至 Neptune 資料庫叢集](get-started-connect-ec2-same-vpc.md))。

  如果您想要透過 [EC2 Connect](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html) 使用 SSH 連線至執行個體，請提供公有子網路的 ID。
+ **`InstanceSecurityGroup`** – Amazon EC2 執行個體的安全群組。

  安全群組必須有權存取藍色資料庫叢集，而且您必須能夠使用 SSH 連線至執行個體。請參閱 [使用 VPC 主控台建立安全群組](get-started-vpc.md#security-vpc-security-group)。

等到堆疊完成。一旦完成，解決方案就會啟動。然後，您可以使用 CloudWatch 日誌監控部署程序，如下一節所述。