Hey Everyone, on Ive been trying to add upload a j...
# prefect-community
c
Hey Everyone, on Ive been trying to add upload a json file onprem to an s3 bucket, everytime i try to load the S3Bucket though, it keeps raising a ValueError, saying its unable to find the block document. Is there something that I need to load first?
Copy code
async def uploadJsontoS3(path):
    s3_bucket = await S3Bucket.load("my_bucket")
    with open(r"\\filepathtoJson", "rb") as f:
        s3_bucket.upload_from_file_object(f, "aws-batch-args/testArgs.json")
z
Loading a block pulls the config from our API — if you haven’t configured a block for your bucket in the UI that’s not what you want
Instead you just want
S3Bucket(bucket_name="my_bucket")