我不斷收到關於CloudFormation此錯誤:爲什麼CloudFormation不會創建我的數據庫?
Cannot create a db.t2.small database instance because no subnets exist
in availability zones with sufficient capacity for VPC and storage
type : standard for db.t2.small.
Please first create at least one new subnet; choose from these
availability zones: us-west-2b, us-west-2a, us-west-2c.
我已經得到了VPC及其子網以外的其他安全地創建和提供通過CloudFormation我的應用程序沒有特定的目標。數據庫必須能夠與EC2實例通信。理想情況下,我也可以使用PgAdmin安全地訪問數據庫,但這不是一個破壞交易的行爲。
下面是相關線路從我的配置文件的部分:
DatabaseInstance:
Type: AWS::RDS::DBInstance
Properties:
AllocatedStorage: 1
DBInstanceClass: db.t2.small
PubliclyAccessible: no
VirtualPrivateNetwork:
Type: "AWS::EC2::VPC"
Properties:
CidrBlock: 10.0.0.0/16
PrivateSubnet:
Type: "AWS::EC2::Subnet"
Properties:
AvailabilityZone: us-west-2b
CidrBlock: 10.0.1.0/24
VpcId:
Ref: VirtualPrivateNetwork
PublicSubnet:
Type: "AWS::EC2::Subnet"
Properties:
AvailabilityZone: us-west-2b
CidrBlock: 10.0.0.1/24
VpcId:
Ref: VirtualPrivateNetwork
上它爲什麼給我這個令人沮喪的錯誤信息有什麼想法?
我想這可能是因爲您首先啓動RDS然後創建VPC? – error2007s
有趣的建議,但我只是交換訂單到VPC子網子網數據庫,並沒有區別 –