Hey folks, I was hoping to understand how Prefect Cloud communicates with an agent that’s inside a VPC. I setup a local agent on an EC2 instance and was able to connect with Prefect Cloud and use the instance as an agent. Can someone point me to the right resources for this? Thank you!
04/29/2022, 1:23 PM
Yes! For Prefect 2.0 you can use this tutorial
for 1.0 this should be similar when it comes to deploying the infrastructure. The main aspect to keep in mind is that your agent only needs to open outbound access to communicate with Prefect Cloud. Cloud API never sends any incoming requests to your infrastructure, it always goes in a single direction - from your infrastructure to Cloud (your agent must actively poll Prefect Cloud API for scheduled runs)
and if you are confused about 2.0 vs. 1.0, check this post
04/29/2022, 1:28 PM
Thank you so much @Anna Geller! This made things very clear.