By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: Amazon API Gateway Adds Dynamic Routing Based on Headers and Paths
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > News > Amazon API Gateway Adds Dynamic Routing Based on Headers and Paths
News

Amazon API Gateway Adds Dynamic Routing Based on Headers and Paths

News Room
Last updated: 2025/06/13 at 7:51 AM
News Room Published 13 June 2025
Share
SHARE

AWS recently introduced a new capability for Amazon API Gateway featuring dynamic routing rules for custom domain names – allowing users to route API requests based on HTTP header values, either independently or in combination with URL paths. 

Earlier, developers relying on API Gateway for dynamic routing often resorted to different URL paths, such as /v1/products and /v2/products, to segment traffic. However, this approach, although functional, may lead to complex URL structures and an increase in API endpoints. Yet, with the new dynamic routing rules feature, users can make routing decisions directly within custom domain name settings, simply by configuring a custom domain name – thus allowing routing decisions to be based on incoming HTTP headers, base paths, or a combination of both.

Additionally, with this feature, users don’t need to alter or create new paths for API transitions, providing a smoother path for API versioning and A/B testing. Furthermore, it also unlocks dynamic backend selection based on criteria like hostname, tenant ID, or even cookie values, allowing for fine-grained control over API traffic without the need for additional proxy layers.

(Source: AWS Compute blog post)

At its core, an API Gateway routing rule functions as a specific resource tied to a custom domain, dictating how incoming requests are forwarded. Each rule is defined by three critical properties: Conditions, which specify criteria based on up to two header and one base path values (all must be met, with wildcards supported for flexible matching); Actions, which define the API stage to be invoked upon a match; and Priority, determining the evaluation order. For instance, a header condition like x-version can use wildcards such as *v2* to match x-version=alpha-v2-latest or x-version=beta-v2-test, enabling nuanced routing strategies.

Before creating routing rules, users need at least one API, stage, and custom domain name. There are three routing modes: “API mappings only,” which uses base path mappings without Routing Rules; “Routing rules then API mappings,” where Routing Rules take precedence and unmatched requests fall back to base path mappings; and “Routing rules only,” the recommended mode that relies solely on Routing Rules, ideal for new domains or after transitioning from API mappings. Always test changes in non-production environments before switching to production, as existing mappings will be overwritten.

While dynamic routing capabilities for API versioning and A/B testing exist in other major cloud API management platforms, such as Azure API Management and Google Apigee, their implementations typically rely on policy expressions or proxy-level configurations. Amazon API Gateway’s new approach distinguishes itself by offering a dedicated, declarative routing rule resource directly at the custom domain level, aiming to simplify these specific routing scenarios.

Furthermore, API Gateway offers visibility into request processing through access logging. Each request now includes context variables that clarify routing decisions, such as the $context.customDomain.routingRuleIdMatched, which indicates the matched rule. Other variables like $context.domainName, $context.apiId, and $context.Stage provides the full routing context. Analyzing these logs allows users to verify routing behavior, troubleshoot issues, and gain insights into traffic patterns across API versions or test variants.

In a Medium blog post, a software engineer, Paul Issack Minoltan, concluded:

In essence, the new routing rules in API Gateway allow you to move sophisticated routing logic directly into your API Gateway configuration, streamlining your architecture and providing more control over how your API traffic is directed.

Lastly, more information can be found in the service documentation, and an end-to-end example for the feature is available on GitHub.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article Ransomware Gangs Exploit Unpatched SimpleHelp Flaws to Target Victims with Double Extortion
Next Article Steam finally goes native on Apple Silicon, here’s how to try it – 9to5Mac
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

Illegal Premier League streamers warned of hidden dangers on ‘dodgy’ Fire Sticks
News
Yupp launches with $33M to build crypto-incentivized AI evaluation platform – News
News
10 Best General Contractor Software in 2025 |
Computing
I Played ‘Shinobi: Art of Vengeance,’ a Gorgeous, Action-Packed Ninja Game, and Loved Every Minute
News

You Might also Like

News

Illegal Premier League streamers warned of hidden dangers on ‘dodgy’ Fire Sticks

4 Min Read
News

Yupp launches with $33M to build crypto-incentivized AI evaluation platform – News

5 Min Read
News

I Played ‘Shinobi: Art of Vengeance,’ a Gorgeous, Action-Packed Ninja Game, and Loved Every Minute

7 Min Read
News

5 misinformation trends that circulate around mass protests

8 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?