Aravind Vasudevan
Aravind Vasudevan

Reputation: 11

The vpc none does not exist. - AWS CloudFormation

When I try to launch my AWS cloudformation stack in new region. Am getting error "The vpc none does not exist" when creating RDS service. Can anyone help me to fix this issue?

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

Upvotes: 0

Views: 902

Answers (1)

Neil Bostrom
Neil Bostrom

Reputation: 2349

The DBSecurityGroup documentation suggests that EC2VpcId is required when creating a DBSecurityGroup in a VPC. It also suggests DBSecurityGroupIngress is required. Here is an example group using the two required fields:

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

If you are working outside of a VPC then you probably won't need EC2VpcId but you will definitely need a DBSecurityGroupIngress rule.

However, it does also say that DBSecurityGroup is not the recommended way to add security to DB instances and to use VPCSecurityGroups instead.

The Id of the VPC. Indicates which VPC this DB Security Group should belong to.

Important The EC2VpcId property exists only for backwards compatibility with older regions and is no longer recommended for providing security information to an RDS DB instance. Instead, use VPCSecurityGroups. Type: String

Required: Conditional. Must be specified to create a DB Security Group for a VPC; may not be specified otherwise.

Upvotes: 2

Related Questions