Replies: 2 comments
-
I tried doing this by setting |
Beta Was this translation helpful? Give feedback.
-
Hi @ssyberg To add CloudFront in front of an ALB in AWS without causing any downtime, you’ll need to take a few steps to ensure a smooth transition. The idea is to configure your AWS Copilot app so that traffic can be routed to both the ALB and CloudFront temporarily while DNS propagates. Here’s a straightforward workflow: 1. Set Up CloudFront
2. Update Copilot Manifest to Support Both ALB and CloudFront
Update your manifest to allow traffic from both sources: http:
path: "/"
targetContainer: "my-service"
healthcheck:
path: "/health"
allowed_source_ips:
- "ALB_IP_RANGE" # Allow ALB traffic
- "CLOUDFRONT_IP_RANGE" # Allow CloudFront traffic This ensures that both CloudFront and the ALB can serve requests during the transition. 3. Update DNS Record
4. Monitor Traffic
5. Remove Direct ALB Access (Optional)
By setting it up this way, you ensure that there’s no downtime while DNS changes propagate. Let me know if you need help with any specific part of this! |
Beta Was this translation helpful? Give feedback.
-
I'm wondering if there's a feasible workflow with copilot to add cloudfront in front of a ALB without incurring downtime? I think this would require a manifest that (temporarily) allowed for traffic hitting ALB or CDN directly so that while DNS propagates both endpoints can serve traffic.
Beta Was this translation helpful? Give feedback.
All reactions