AWS App Mesh
User Guide

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Path-based Routing

To create a route with path-based routing using the AWS Management Console, complete the following steps. To create a route using the AWS CLI version 1.16.235 or higher, see the example in the AWS CLI reference for the create-route command.

  1. Open the App Mesh console at https://console.aws.amazon.com/appmesh/.

  2. Choose the mesh that you want to create the route in.

  3. Choose Virtual routers in the left navigation.

  4. Choose the virtual router that you want to associate a new route with.

  5. In the Routes table, choose Create route.

  6. For Route name, specify the name to use for your route.

  7. For Route type, choose the protocol for your route. The protocol that you select must match the listener protocol that you selected for your virtual router and the virtual node that you're routing traffic to.

  8. (Optional) For Route priority, specify a priority from 0-1000 to use for your route. Routes are matched based on the specified value, where 0 is the highest priority.

  9. For Virtual node name, choose the virtual node that this route will serve traffic to. If none are listed, then you need to create a virtual node first.

  10. For Weight, choose a relative weight for the route. Select Add target to add additional virtual nodes. The total weight for all targets combined must be less than or equal to 100.

  11. (Optional) To use HTTP path and header-based routing, choose Additional configuration.

  12. (Optional) To use HTTP path-based routing, specify the Prefix that the route should match. For example, if your virtual service name is service-b.local and you want the route to match requests to service-b.local/metrics, your prefix should be /metrics.

  13. (Optional) Select a Method to use header-based routing for your route. For additional information about HTTP header-based routing, see HTTP Headers.

  14. (Optional) Select a Scheme to use header-based routing for your route.

  15. (Optional) Select Add header. Enter the Header name that you want to route based on, select a Match type, and enter a Match value. Selecting Invert will match the opposite.

  16. (Optional) Select Add header to add up to ten headers.

  17. (Optional) For Retry timeout, enter the number of units for the timeout duration. For additional information about retry policy, see Retry Policy.

  18. (Optional) For Retry timeout unit, select a unit.

  19. (Optional) For Max retries, enter the number of times to retry the route when an attempt fails.

  20. (Optional) Select one or more HTTP retry events.

  21. (Optional) Select a TCP retry event.

  22. Choose Create route to finish.