from typing import Tuple
import re


def decompose_s3_path(s3_path: str) -> Tuple[str, str]:
    """Get bucket and key from full s3 path.

    Args:
        s3_path: Full path on s3 in format "s3://<bucket_name>/<obj_path>".

    Returns:
        Tuple of bucket and key.
    """
    assert s3_path.startswith(
        "s3://"
    ), f"s3_path must start with s3:// invalid s3_path='{s3_path}'"
    match = re.match("s3://([^/]+)/(.+)", s3_path)
    if not match:
        raise ValueError(f"ERROR: not a valid s3_path: {s3_path}")
    bucket, key = match.groups()
    return (bucket, key)