import time


def get_s3_bucket_and_dir(bucket_arg):
    """Return the name of the S3 bucket and path to upload Lambda artifacts
    to. If no additional path is provided a default value will be used.

    Bucket Only: ``my-bucket``
    Bucket with Path: ``my-bucket/my-path``

    :param str bucket_arg: The string passed for the ``s3_bucket`` argument.

    :returns Tuple containing the bucket name and path
    :rtype: tuple
    """
    try:
        bucket, dir_ = bucket_arg.split('/', 1)
    except ValueError:
        bucket = bucket_arg
        dir_ = f'possum-{int(time.time())}'

    return bucket, dir_