2017-08-30 102 views
0

當我嘗試在新區域啓動我的AWS cloudformation堆棧時。在創建RDS服務時出現錯誤「vpc none does not exist」。任何人都可以幫我解決這個問題嗎?vpc none不存在。 - AWS CloudFormation

"dbsgdefault": { 
    "Type": "AWS::RDS::DBSecurityGroup", 
    "Properties": { 
     "GroupDescription": "default" 
    } 
}, 
+0

請提供stacktrace輸出或類似的東西來顯示問題描述。 – Reborn

+0

具體在你的堆棧跟蹤併發布可疑行。 – mootmoot

+0

07:52:57 UTC + 0550 \t CREATE_FAILED \t AWS :: RDS :: DBSecurityGroup \t dbsgdefault \t vpc none不存在。 客戶端請求令牌:Console-CreateStack-491b4476-2d48-4af7-9d38-08eb4ce5a80c –

回答

2

DBSecurityGroup documentation表明,創建在VPC一個DBSecurityGroup時EC2VpcId是必需的。它也建議DBSecurityGroupIngress是必需的。下面是使用兩個必填字段爲例組:

"DBSecurityGroup": {  
     "Type": "AWS::RDS::DBSecurityGroup", 
     "Properties": { 
      "EC2VpcId" : { "Ref" : "VpcId" }, 
      "DBSecurityGroupIngress": [ 
       {"EC2SecurityGroupName": { "Ref": "WebServerSecurityGroup"}} 
      ], 
      "GroupDescription": "Frontend Access"  
     } 
} 

如果您在VPC之外的工作,那麼你可能不會需要EC2VpcId但你絕對需要一個DBSecurityGroupIngress規則。

但是,它也表示DBSecurityGroup不是建議的將數據庫安全性添加到數據庫實例並使用VPCSecurityGroups代替的方式。

VPC的Id。指示該數據庫安全組應該屬於哪個VPC 。

重要的EC2VpcId屬性只用於與舊區域的向後兼容性 存在,不再推薦 提供安全信息的RDS數據庫實例。相反,請使用 VPCSecurityGroups。類型:字符串

必需:有條件的。必須指定爲VPC創建數據庫安全組 ;可能沒有另行規定。