Guys, not sure if this is the right channel, but w...
# prefect-docker
r
Guys, not sure if this is the right channel, but we're having issues self hosting the Prefect server on ECS along with the agents: What will this require in order to get it working? (Env variables, permissions, etc) Is there any documentation for prefect v2 that can help us understand the ECS integration with the docker image? Thanks a lot!
a
I've hosted Prefect server on ECS for a while, where are you stuck with?
r
Hey @Amruth VVKP , thank you so much for your attention! My basic question are: 1. How we can implement the Prefect server on the ECS along with our Prefect agents? 2. What will this require in order to get it working? (Env variables, permissions, etc) 3. Is there any documentation for prefect v2 that can help us understand the ECS integration with the docker image?
a
1. I've used RDS for the DB. My cluster has server running as a service with service discovery open to all other services in the same cluster. Work pools and agents run as separate services within the cluster with access to the server through the mapped dns. You can serve it out to internal or external with an application load balancer and cloud front with WAF enabled. I'd you need external access to API, consider routing API Gateway as a proxy that forwards requests to the Prefect server. 2. You need to setup env variables for the rds postgres connection on all tasks. Agent and work pool tasks take in a connection to API, I've setup server over servicenamediscovery as http://server. which means work pools need to point to http://server/api for the API requests. 3. I do mot think there are recipes on the documentation for Prefect Server. There's alimited documentation on prefect docs for self hosting.