'Return image object representing an AMI.
Raises exception.AMIDoesNotExist if unsuccessful'

def get_image(self, image_id):

    try:
        return self.get_images(filters={'image-id': image_id})[0]
    except boto.exception.EC2ResponseError as e:
        if (e.error_code == 'InvalidAMIID.NotFound'):
            raise exception.AMIDoesNotExist(image_id)
        raise
    except IndexError:
        raise exception.AMIDoesNotExist(image_id)
