AWS App Mesh
User Guide

Routes

A route is associated with a virtual router. It is used to match requests for the virtual router and distribute traffic to its associated virtual nodes. If a route matches a request, it can distribute traffic to one or more target virtual nodes. You can specify relative weighting for each virtual node. This topic helps you work with routes in a service mesh.

Creating a Route

To create a route using the AWS Management Console, complete the following steps. To create a route using the AWS CLI version 1.16.219 or higher, see the examples 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.

  8. 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-based routing, choose Additional configuration and then specify the Prefix that the route should match. For additional information about path-based routing, see Path-based Routing.

  12. (Optional) Select a Method to use header-based routing for your route.

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

  14. (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. For additional information about HTTP header-based routing, see HTTP Headers.

  15. Choose Create route to finish.

Deleting a Route

To delete a route using the AWS Management Console, complete the following steps. To delete a route using the AWS CLI version 1.16.219 or higher, see the examples in the AWS CLI reference for the delete-route command.

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

  2. Choose the mesh that you want to delete a route from.

  3. Choose Virtual routers in the left navigation.

  4. Choose the router that you want to delete a route from.

  5. In the Routes table, choose the route that you want to delete and select Delete.

  6. In the confirmation box, type delete and then select Delete.