def get_ami_info(ec2, ami_id):
    """
    Returns information about the specified AMI.

    Parameters
    ----------
    ec2 : botocore.client.EC2
        AWS EC2 client.
    ami_id : str
        AMI ID.

    Returns
    -------
    dict
    """
    resp = ec2.describe_images(ImageIds=[ami_id])
    return resp['Images'][0]