Forward request to multiple destination
I have an infrastructure consisting of Cloudfront and an ALB as the source of this distribution. I need to direct requests not only to the ALB Target Group but also to redirect requests to an external URL. Anyone have any suggestions on how to fix this issue?
You can use Lambda@edge to redirect the requests, Please look at the Official Docs from the AWS , I also seen the article with sample configuration with node.js , this link will help you, Kindly look into it.
I assume there are some URIs that you want to redirect, while others are served by the ALB? While this can be done with Lambda@Edge as described above, you can also do this with AWS WAF, which would reduce the complexity of your configuration. This blog post: https://aws.amazon.com/blogs/security/customize-requests-and-responses-with-aws-waf/ describes various options for achieving this with WAF. Note that you would attach WAF to your CloudFront distribution rather than your ALB.
Thanks for the reply. I already have a WAF attached to my CloudFront distribution. I believe that with the WAF this is not an applicable solution as the path I want to redirect to both destinations is the same, both the Target Group of the ALB and the URL must receive the same request.
Forward request to multiple destinationasked a month ago
Will the "TargetConnectionErrorCount" be counted even if there are two servers in the target group and one cannot respond?Accepted Answerasked 12 days ago
Secure ALB access only from Amazon CloudFrontAccepted Answerasked 2 years ago
504 error when Cloudfront send https-only request to ALB with specific security groupasked 5 months ago
Is it possible to use an internal ALB as an EventBridge Rule API Destination?Accepted Answerasked 3 months ago
Cloudfront not respecting Origin Pathasked a month ago
How to make ALB seamlessly re-forward to a healthy target?asked 8 days ago
Lambda+ALB vs Lambda+API GWAccepted Answerasked 4 months ago
Load Balancer and API GatewayAccepted Answerasked 4 months ago
Health checks when using ALB as target of NLBasked 4 months ago