Which solution meets these requirements?
Use two ALBs: one for on-premises and one for the AWS resource. Add hosts to each target group of each ALB. Route with Amazon Route 53 based on the URL query string.
Use two ALBs: one for on-premises and one for the AWS resource. Add hosts to the target group of each ALB. Create a software router on an EC2 instance based on the URL query string.
Use one ALB with two target groups: one for the AWS resource and one for on premises. Add hosts to each target group of the ALB. Configure listener rules based on the URL query string.
Use one ALB with two AWS Auto Scaling groups: one for the AWS resource and one for on premises. Add hosts to each Auto Scaling group. Route with Amazon Route 53 based on the URL query string.
Explanations:
Using two ALBs and routing with Route 53 based on the URL query string is not feasible because Route 53 cannot route based on query strings; it only routes based on domain names and paths.
While this option suggests using two ALBs, it involves a software router on an EC2 instance, which adds unnecessary complexity and does not provide a direct solution for routing based on the URL query string.
This option correctly uses one ALB with two target groups. The ALB can be configured with listener rules that can route traffic to the appropriate target group based on the URL query string, allowing seamless integration of both on-premises and AWS-hosted applications.
This option suggests using Auto Scaling groups for routing, which is not applicable in this context. ALBs do not route traffic based on Auto Scaling groups directly, and like option A, Route 53 cannot route based on query strings.