1 2 3 4 5 6 7 8
# Utility functions def get_s3_path(uri): parts = uri.replace("s3://", "").split("/") bucket = parts.pop(0) key = "/".join(parts) return bucket, key