Hi everyone! I'm still working on an AWS ECS/ECR s...
# ask-community
f
Hi everyone! I'm still working on an AWS ECS/ECR setup for my flows and I'm using this github action from the recipes section: https://github.com/PrefectHQ/prefect-recipes/blob/main/devops/github-actions/prefect-deploy-aws-ecr.yaml The last line runs
prefect --no-prompt deploy --all
and that's where I get the following error:
Copy code
prefect.exceptions.MissingFlowError: Flow function with name 'hello-world' not found in 'hello_world.py'.
This is how my file containing the flow looks like (a demo from the prefect docs)
hello_world.py
Copy code
@flow(log_prints=True)
def hello_world(name: str = "world", goodbye: bool = False):
    print(f"Hello {name} from Prefect! šŸ¤—")

    if goodbye:
        print(f"Goodbye {name}!")


if __name__ == "__main__":
    hello_world.serve(name="my-first-deployment",
                      tags=["onboarding"],
                      parameters={"goodbye": True})
And this is the entry point I stated
prefect.yaml
Copy code
deployments:
- name: null
  version: null
  tags: []
  description: null
  schedule: {}
  flow_name: null
  entrypoint: hello_world.py:hello-world
Does anyone have ideas on how to fix this? I'd be very thankful for any and all advice and suggestions! šŸ™
Additional info: to kick off deployment locally the command suggested in the demo was
Copy code
prefect deployment run 'hello-world/my-first-deployment'
(This works locally!)
j
Hi Fina, I’m not certain if this is the issue but have you tried
hello_world.py:hello_world
as the entry point in your yaml file?
upvote 2
🌟 1
f
@Jenny Yesss that was it! Thanks so much! šŸ™ (I have new errors popping up but I'll try to deal with those myself first!)
j
šŸŽ‰
šŸ˜„ 1