Testing and Deployment

A Regional custom domain uses API mappings: orders to API A's prod stage, and orders/v2 to API B's beta stage. With no routing rules configured, how is a request to /orders/v2/items routed?

Show the answer

Correct answerB. To API B's beta stage with resource path /items.

AWhy not this: The shorter orders mapping loses to the longer matching orders/v2 mapping.

BWhy this is right: The longest mapping selects API B's beta stage, and removing orders/v2 leaves /items.

CWhy not this: API Gateway removes the matched mapping path instead of forwarding the complete custom-domain path.

DWhy not this: The mapping selects the beta stage without inserting beta into the resource path.

API Gateway selects the longest matching API mapping, orders/v2, and strips that mapping path before invoking API B's beta stage. The stage is selected by the mapping; its name is not added to the resource path.