in skills/contextual-embeddings/contextual-rag-lambda-function/s3_adapter.py [0:0]
def parse_s3_path(self, s3_path):
# Remove 's3://' prefix if present
s3_path = s3_path.replace('s3://', '')
# Split the path into bucket and key
parts = s3_path.split('/', 1)
if len(parts) != 2:
raise ValueError("Invalid S3 path format")
bucket_name = parts[0]
file_key = parts[1]
return bucket_name, file_key