title: Cloud formation - Device index cannot be empty
body: <p>I have been trying to get two instances to join a domain and one be the dc. The code is from one of the templates however it doesnt let me run it with my modification.
  I am getting the error DeviceIndex cannot be empty when the DC01 instance initiates.
  This is the code for DC01</p>
  
  <pre><code> {
      "Resources": {
          "DC1": {
              "Type": "AWS::EC2::Instance",
              "Properties": {
                  "BlockDeviceMappings": [
                      {
                          "DeviceName": "/dev/sda1",
                          "Ebs": {
                              "VolumeSize": "40"
                          }
                      }
                  ],
                  "ImageId": {
                      "Ref": "BaseAmiId"
                  },
                  "InstanceType": "t2.micro",
                  "KeyName": {
                      "Ref": "KeyName"
                  },
                  "NetworkInterfaces": [
                      {
                          "AssociatePublicIpAddress": "false",
                          "DeleteOnTermination": "true",
                          "DeviceIndex": "0",
                          "GroupSet": [
                              {
                                  "Ref": "PrivateSecurityGroup"
                              }
                          ],
                          "PrivateIpAddress": "10.1.3.100"
                      },
                      {
                          "SubnetId": {
                              "Ref": "PrivateSubnetAZ1"
                          }
                      }
                  ],
                  "Tags": [
                      {
                          "Key": "Name",
                          "Value": "DC1"
                      }
                  ],
                  "UserData": {
                      "Fn::Base64": {
                          "Fn::Join": [
                              "",
                              [
                                  "&lt;script&gt;\n",
                                  "cfn-init.exe -v -c config -s ",
                                  {
                                      "Ref": "AWS::StackId"
                                  },
                                  " -r DC1",
                                  " --region ",
                                  {
                                      "Ref": "AWS::Region"
                                  },
                                  "\n",
                                  "&lt;/script&gt;\n"
                              ]
                          ]
                      }
                  }
              }
          }
      }
  }
  </code></pre>