instance_groups.append(InstanceGroup(num_instances=1, role='MASTER', type=
    'm1.small', market='ON_DEMAND', name='Main node'))
instance_groups.append(InstanceGroup(num_instances=2, role='CORE', type=
    'm1.small', market='ON_DEMAND', name='Worker nodes'))
instance_groups.append(InstanceGroup(num_instances=2, role='TASK', type=
    'm1.small', market='SPOT', name='My cheap spot nodes', bidprice='0.002'))
How to launch and configure an EMR cluster using boto