def s3_arn_to_s3_path()

in migration/bring-your-own-gdc-assets/bring_your_own_gdc_assets.py [0:0]


def s3_arn_to_s3_path(arn):
    """
    Convert an S3 ARN to an S3 path.
    Example: 'arn:aws:s3:::bucket/key' -> 's3://bucket/key'
    """
    # Remove the ARN prefix (everything up to and including the triple colon)
    s3_path = arn.rstrip('/').split(':::', 1)[1]
    return f"s3://{s3_path}"