<@ULVA73B9P> I need to restrict egress rules on my...
# ask-marvin
g
@Marvin I need to restrict egress rules on my security groups to only allow access to prefect cloud IPs, is this possible and do you have a list of IPs?
m
thought for 94.6 seconds
Short answer: there isn’t a static list of Prefect Cloud IPs to allowlist. Prefect Cloud is fronted by Cloudflare, so IPs are dynamic and can change. We don’t publish fixed egress IPs. What you can do instead: - Allowlist by domain/FQDN: Workers/flows need outbound HTTPS (TCP 443) to
api.prefect.cloud
for REST and WebSocket connections. If your flows fetch code/data from other services (e.g., S3, Git, DBs), those destinations must be allowed too. - Use a proxy or firewall that supports FQDN rules: AWS Security Groups don’t support domain-based egress, but you can route workers through a proxy (e.g., NAT instance with a proxy or AWS Network Firewall) where you allow
api.prefect.cloud:443
. - Enterprise PrivateLink (recommended for strict egress): Prefect offers AWS/GCP PrivateLink so traffic to Prefect Cloud stays on the provider’s private backbone instead of the public internet. This is the cleanest way to meet tight egress controls. - Secure access by PrivateLink - As a last resort with IP-only egress controls: Allow the published Cloudflare IP ranges (kept up to date). This will be broad (covers many Cloudflare-backed services), but it’s sometimes used when SGs must be IP-based: - Cloudflare IP ranges Related docs: - IP allowlisting Note: this feature restricts who can reach Prefect Cloud (ingress to Prefect), not your egress, but may be relevant for your security posture. - PrivateLink setup for AWS/GCP A few specifics: - Required port: 443/TCP (HTTPS and WebSockets) to
api.prefect.cloud
- DNS resolution must work for
api.prefect.cloud
- If you use external storage (e.g., S3/GCS/Azure) for code or data, those endpoints must also be allowed If you can share: - Are you on AWS (Security Groups) and is a proxy/Network Firewall an option? - Are you on a Prefect Enterprise plan or open to PrivateLink? I can then outline an exact pattern for your setup.