如何在Amazon API Gateway的API端点URL中省略阶段名称。
例如,而不是api.domain.com/stagename/resource/我想拥有api.domain.com/resource。
答案 0 :(得分:2)
您无法从API网址更改阶段,这是API网关的实现,但您可以根据需要将自定义域提供给API网址。
如果您使用自定义域名,则stage是可选的 - http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html#how-to-custom-domains-console
或使用CloudFormation模板 - http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html