- Newest
- Most votes
- Most comments
This is not a bug but rather an expected limitation of AWS Application Load Balancer (ALB) functionality. According to AWS documentation, transforms for listener rules can only modify the path or query string of the URL when forwarding requests to targets, not when performing redirects.
When you configure a redirect action, the ALB takes the original request URL and redirects it according to your redirect configuration. The transform functionality is designed to modify requests before they are routed to targets, not to modify the URL that's used in a redirect action.
You cannot modify the protocol or port of the URL with transforms, and importantly, transforms don't work with redirect actions. They're specifically designed for forwarding actions where the request is being sent to a target group.
For your use case, you have two options:
-
Use a forward action instead of a redirect, and apply your transform to modify the path before it reaches your backend service.
-
If you must use a redirect, you would need to create separate listener rules with specific path patterns that match your old paths and explicitly redirect to the new paths without using transforms.
This is a limitation in the current design of ALB listener rules rather than a bug that would be fixed in a future update.
Sources
Transforms for listener rules - Elastic Load Balancing
Elastic Load Balancing controls - AWS Control Tower
Relevant content
asked 21 days ago
