<@ULVA73B9P> How do I configure generic S3 storage...
# marvin-in-the-wild
a
@Marvin How do I configure generic S3 storage for flows in prefect.yaml
m
To configure generic S3 storage for your flows in
prefect.yaml
, you'll need to create a storage block and use it within your deployment configuration. Here is how you can do it: 1. Create a storage block: You can create an S3 storage block using the Prefect CLI:
Copy code
prefect block create s3 <block-name> --bucket <your-bucket-name>
Replace
<block-name>
with your desired block name and
<your-bucket-name>
with the name of your S3 bucket. 2. Add storage block to
prefect.yaml
: Once you have your storage block created, you can reference it in your
prefect.yaml
file. Below is an example configuration:
Copy code
yaml
   version: 2.0
   name: my-flow
   description: A flow using S3 storage
   storage:
     - id: <block-name>  
   infrastructure:
     - id: process
     env_vars:
       PREFECT_LOGGING_LEVEL: INFO
Replace
<block-name>
with the name of your S3 storage block. For more detailed examples and configurations, please refer to the links below: - Prefect Storage Documentation - Code Example for Basic Flow Configuration
n
not quite @Marvin there's a setting called
PREFECT_DEFAULT_RESULT_STORAGE_BLOCK
that you can set in
env
for a given deployment if you want so like
Copy code
job_variables:
  env:
    PREFECT_DEFAULT_RESULT_STORAGE_BLOCK: s3/my-bucket
🙌 1
m
To configure generic S3 storage for flows in
prefect.yaml
, you can set the
PREFECT_DEFAULT_RESULT_STORAGE_BLOCK
environment variable. This will specify the default storage block for your deployments. Here is how you can include it in your
prefect.yaml
file:
Copy code
yaml
job_variables:
  env:
    PREFECT_DEFAULT_RESULT_STORAGE_BLOCK: "s3/my-bucket"
Replace
"s3/my-bucket"
with the appropriate storage block identifier for your S3 bucket. For more detailed information and examples, you can refer to the official Prefect storage documentation: Prefect Storage Documentation
n
original!