Baker
02/28/2024, 10:02 PMfrom prefect.filesystems import S3
s3_block = S3.load("data-warehouse")
s3_block.read_path("test.txt")
>>> AttributeError: 'coroutine' object has no attribute 'read_path'Jeff Hale
02/28/2024, 10:06 PMBaker
02/28/2024, 10:14 PMBaker
02/28/2024, 10:14 PMNate
02/28/2024, 10:23 PMload is async if you're in an async context, so you have to await itBaker
02/29/2024, 8:55 AMprefect-aws instead of using:
from prefect.filesystems import S3 and S3.load(...) ?Baker
02/29/2024, 8:55 AMJeff Hale
02/29/2024, 1:55 PMS3 block that ships with Prefect is fine to use. The S3Bucket block has some additional functionality and the methods are different. You’re welcome to use whichever meets your needs - the guide just used S3Bucket.