Open codeananda opened 3 months ago
Update: this works
import boto3
from cloudpathlib import S3Path
from loguru import logger
output_path = S3Path("s3://bucket-name/key.gpkg")
if isinstance(output_path, S3Path):
a.to_file(output_path.name, engine='pyogrio')
logger.info(f"Written to disk locally {output_path.name}")
s3 = boto3.resource('s3')
s3.Bucket(output_path.bucket).upload_file(output_path.name, output_path.key)
logger.info(f"Uploaded to S3!")
I can easily read from S3 out of the box (assuming the required env variables are set).
But I cannot write to S3 out of the box.
This works
But this doesn't
Any ideas?