Hi guys, I have flow deployment issue. Agent does...
# prefect-community
Hi guys, I have flow deployment issue. Agent does not pickup flow registered in different host  Host A 1. I was doing my development on my local Macbook: 2. I created a flow  3. I switched backend to prefect cloud 4. I connected to Prefect cloud with API key. 5. I registered flow to to Prefect Cloud. 6. I started local agent  7. I can see both the flow and agent in Prefect Cloud UI 8. I ran the flow, agent picked up and execute the flow, it worked fine 9. I shutdown the agent Host B 1. I created AWS EC2 instance and deploy my code 2. I connected to Prefect Cloud with same API key  3. I switched backend to Prefect Cloud and started local agent 4. I can see agent in UI 5. However, when I start running Flow I registered earlier, agent does not pickup flow Please advise
Agents not picking up are normally Label issues. Check that the labels of the Flow and agent match. But what storage did you use? Because the default storage places the file in Host A. Host B might not be able to run the flow because the file does not exist there.
Have you seen the Storage docs? You would need a remote type of storage for this to work like S3 or Github
Do disable the default hostname label from your Flow, you can also do:
flow.storage = SomeStorage(add_default_labels=False)
Host B is AWS EC2 instance, let me look into the doc. thanks for the pointer
I made a mistake in the link. You’ll want to scroll up from my link and Local storage is the default for all Flows
Yes I did scroll up and saw it
btw if you use
prefect run --watch
to run your flow it’ll warn if labels aren’t matching after a little bit
Hey @Patrick Tan were you able to work around the AWS ec2 challenge? currently having similar challenge what did you do?
@Hedgar I was having permission issue on S3 and did not go forward with this but will revisit later.