options.withSecurityGroupIds(launchSpec.getSecurityGroupIds());
options.asType(checkNotNull(launchSpec.getInstanceType(), "instanceType"));
if (launchSpec.getSubnetId() != null)
options.withSubnetId(launchSpec.getSubnetId());
if (launchSpec.getKernelId() != null)
options.withKernelId(launchSpec.getKernelId());
if (launchSpec.getKeyName() != null)
options.withKeyName(launchSpec.getKeyName());
if (launchSpec.getRamdiskId() != null)
options.withRamdisk(launchSpec.getRamdiskId());
if (Boolean.TRUE.equals(launchSpec.isMonitoringEnabled()))