Given a bucket name, check to see if the given bucket exists.

    Returns True if the given bucket exists and returns False if the given
    bucket does not exist.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_s3_bucket.exists mybucket

def exists(Bucket,
           region=None, key=None, keyid=None, profile=None):
    '''
    Given a bucket name, check to see if the given bucket exists.

    Returns True if the given bucket exists and returns False if the given
    bucket does not exist.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_s3_bucket.exists mybucket

    '''

    try:
        conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
        buckets = conn.head_bucket(Bucket=Bucket)
        return {'exists': True}
    except ClientError as e:
        if e.response.get('Error', {}).get('Code') == '404':
            return {'exists': False}
        err = __utils__['boto3.get_error'](e)
        return {'error': err}