def test_ec2_instance_status(cloud_connection, aws_region, instance_ids, instance_state):
    """ Get EC2 instance status

        :param  cloud_connection: The app Cloud Connection object
        :param  aws_region:  string: The region to use
        :param  instance_ids: array[] string: Instances IDs to check
        :param  instance_state: string: Instance to check
        :return True if every instances are in the instance_state provided.
    """
    conn = cloud_connection.get_connection(aws_region, ["ec2"], boto_version='boto3')
    ec2_statuses = conn.describe_instances(
        InstanceIds=instance_ids
    )["Reservations"][0]["Instances"]
    for instance in ec2_statuses:
        if not instance['State']['Name'] == instance_state:
            return False
    return True