2016-08-19 66 views

回答

0

Working with DB Security Groups

一個DB安全組控制對數據庫實例,它是不是一個VPC內的網絡接入。

如果您使用的是VPC(除非系統安裝在多年前,否則應始終如此),您應該使用AWS::EC2::SecurityGroup來控制安全性。它確實你想要的屬性,例如:

"InstanceSecurityGroup" : { 
    "Type" : "AWS::EC2::SecurityGroup", 
    "Properties" : { 
     "GroupDescription" : "Allow http to client host", 
     "VpcId" : {"Ref" : "myVPC"}, 
     "SecurityGroupIngress" : [{ 
      "IpProtocol" : "tcp", 
      "FromPort" : "80", 
      "ToPort" : "80", 
      "CidrIp" : "0.0.0.0/0" 
     }], 
     "SecurityGroupEgress" : [{ 
     "IpProtocol" : "tcp", 
     "FromPort" : "80", 
     "ToPort" : "80", 
     "CidrIp" : "0.0.0.0/0" 
     }] 
    } 
}