I'm trying to create an auto scaling group through cloud formation on a *non-default VPC* but I received two errors:

> 
> The security group 'SecurityGroup' does not exist in default VPC
> 
> 
> No default VPC for this user
> 
> 
> 

My first attempt I did it on a region w/ no default VPC that's when i first got the `No default VPC for this user` which i thought it was strange that it wanted/needed the default vpc when i'm not trying to use it. Then, I proceeded to recreate the default VPC and I got the `The security group 'SecurityGroup' does not exist in default VPC`.

I proceeded to run my template without the auto scaling part just to have the network infrastructure in place so i could play on the console (please see below)

```
Resources:
  VpcT:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: 192.168.0.0/16
      EnableDnsSupport: true
      EnableDnsHostnames: true

  PublicSubnet1:
    Type: AWS::EC2::Subnet
    Properties:
      AvailabilityZone: !Sub ${AWS::Region}a
      VpcId: !Ref VpcT
      CidrBlock: 192.168.0.0/24
      MapPublicIpOnLaunch: true

  PublicSubnet2:
    Type: AWS::EC2::Subnet
    Properties:
      AvailabilityZone: !Sub ${AWS::Region}b
      VpcId: !Ref VpcT
      CidrBlock: 192.168.1.0/24
      MapPublicIpOnLaunch: true

  SecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: sg
      VpcId: !Ref VpcT
      SecurityGroupIngress:
        - IpProtocol: -1
          CidrIp: 0.0.0.0/0
      SecurityGroupEgress:
        - IpProtocol: -1
          CidrIp: 0.0.0.0/0

```

Using that template i get a VPC(VpcT), two subnets that assign an automatic IP address(PublicSubnet1 and PublicSubnet2) and finally a security group(SecurityGroup).

Went through the console and configured my launch configuration and through advanced details I selected `Assign a public IP address to every instance` then on the last part where you select the security group i got the following message `No default VPC found Select another VPC, or contact AWS Support if you want to create a new default VPC` which i just ignored and finalized the launch configuration

Proceeded to create the auto scaling group with the previously created launch configuration and got exactly the same message when i was trying to create the launch configuration `No default VPC found Select another VPC, or contact AWS Support if you want to create a new default VPC` which once again i just ignored an continued with the process and selected PublicSubnet1 and PublicSubnet2 that i have previously created and finalized the auto scaling group configuration. Everything worked, the instances specified on my auto scaling group were created and everything worked just fine.

So i validated that you can create an auto scaling group without a default vpc and there's something i may be missing on my cloudformation auto scale template(please see below)

```
  LaunchConfig:
    Type: AWS::AutoScaling::LaunchConfiguration
    Properties:
      LaunchConfigurationName: LaunchConfig
      AssociatePublicIpAddress: true
      ImageId: ami-02ccb28830b645a41
      EbsOptimized: false
      InstanceMonitoring: false
      InstanceType: t2.micro
      KeyName: gh_rsa
      SecurityGroups:
        - SecurityGroup

  AutoScalingGrpPubInstances:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      Cooldown: 300
      HealthCheckGracePeriod: 300
      VPCZoneIdentifier:
        - !Ref PublicSubnet1
        - !Ref PublicSubnet2
      LaunchConfigurationName: !Ref LaunchConfig
      DesiredCapacity: 1
      MaxSize: 3
      MinSize: 1

```

According to the documentation all i need to supply to let the auto scaling group where to create the instances is `VPCZoneIdentifier` i've tried with `!Ref PublicSubnetX` and the actual subnet id `subnet-0e15c1ff36f7a228b` with no luck.

Can someone point me in the right direction on how to fix this?