def get_fleet_instances(c, fleet_name):
    """Get all Spot Fleet instances for a Spot Fleet request."""

    instances = []
    next_token = None
    while True:
        if next_token is None:
            resp = c.describe_spot_fleet_instances(SpotFleetRequestId=fleet_name)
        else:
            resp = c.describe_spot_fleet_instances(SpotFleetRequestId=fleet_name,
                                                   NextToken=next_token)
        instances.extend(resp['ActiveInstances'])
        next_token = resp.get('NextToken', None)
        if next_token is None: break
    return instances