我在 Amazon Virtual Private Cloud (Amazon VPC) 中啟動 Amazon Relational Database Service (Amazon RDS) 資料庫執行個體時收到錯誤訊息。
解決方法
若要在特定的 Amazon VPC 中啟動 Amazon RDS 資料庫執行個體,請根據下列要求設定 Amazon VPC 和資料庫執行個體:
- 在要部署資料庫執行個體的 AWS 區域中,使用具有至少兩個子網路的 Amazon VPC。如果 Amazon VPC 沒有至少兩個子網路,您則會收到下列錯誤訊息: 「VPC must have a minimum of 2 subnets in order to create a DB Subnet Group.Go to the VPC console to add subnets.」
- 建立資料庫子網路群組,並僅包含您希望 Amazon RDS 在其中啟動資料庫執行個體的子網路。如果未建立資料庫子網路群組,Amazon RDS 則會建立包含 Amazon VPC 所有子網路的資料庫子網路群組。每個資料庫子網路群組必須含有在 AWS 區域中至少兩個可用區域的子網路。如果子網路群組未包含來自至少兩個可用區域的子網路,您則會收到下列錯誤訊息: 「DB Subnet Group doesn't meet availability zone coverage requirement.Please add subnets to cover at least 2 availability zones.」
- 使用經核准的 Amazon Elastic Compute Cloud (Amazon EC2) 專用執行個體類型。這可讓您將資料庫執行個體置於專用的 Amazon VPC 中,並將執行個體租用屬性設定為專用。如果您使用的執行個體類型不受專用 Amazon VPC 支援,該 Amazon VPC 則不會列出。
注意:如果 Amazon VPC 屬性 DNS 主機名稱和 DNS 解析未開啟,當您選擇啟動 RDS 執行個體時,則會列出 Amazon VPC。但是,如果您啟動的執行個體為可公開存取,您則會收到下列錯誤訊息: 「Cannot create a publicly accessible DB Instance.The specified VPC does not support DNS resolution, DNS hostnames, or both.Update the VPC and then try again.」
相關資訊
在 VPC 中建立資料庫執行個體
在 VPC 中使用資料庫執行個體
如何變更 Amazon RDS 資料庫執行個體的 Amazon VPC?
VPC 中的 DNS 屬性
使用資料庫子網路群組