Nate
01/09/2024, 10:57 PMMarvin
01/09/2024, 10:57 PMpython
from prefect.filesystems import S3
block = S3(
bucket_path="my-bucket/a-sub-directory",
aws_access_key_id="foo",
aws_secret_access_key="bar"
)
block.save("example-block")
After executing the above code, your block configuration named "example-block" will be available to anyone with appropriate access to your Prefect API. You can refer to this block by its slug, which is formatted as block-type/block-name
. In this case, it would be s3/example-block
.
For full details, please visit the block storage documentation.Kevin Grismore
01/09/2024, 10:58 PMMarvin
01/09/2024, 10:58 PM