Dear All, I am relatively new to prefect. I am us...
# prefect-community
Dear All, I am relatively new to prefect. I am using prefect 2.0. I have followed the official Docs on how to create and run deployments. I am using AWS S3 as my block storage. I successfully upload the files to my block in S3 bucket and the first run is always successful. However, when i try to run the deployment from prefect UI, I always get this error "Flow run <run-name> - Flow could not be retrieved from deployment" AND "TypeError: object NoneType can't be used in 'await' expression". I have tried Docker infrastructure and the default LocalProcess. I have changed the IAM role on the AWS EC2 instance am using but does not seem to work. I NEED HELP. THANK YOU
how do you create a deployment? also, better to wrap the flow function call in main:
Copy code
from prefect import flow, task
# import function subflow from file
from subflow import my_subflow

@task(name="Print Hello")
def print_hello(name):
    msg = f"Hello {name}!"
    return msg

@flow(name="Hello Flow")
def hello_world(name="world"):
    message = print_hello(name)

if __name__ == "__main__":
you can try this for AWS setup
Thank you @Anna Geller. The example "How to deploy Prefect 2.0 flows to AWS" is very helpful. Thank you
🙌 1