API Versioning with AWS API Gateway

丶灬走出姿态 提交于 2020-12-12 09:52:07

问题


I am having trouble implementing a viable versioning scenario with API Gateway + Lambda. My requirement is to have major versioning at the API level but then minor versioning at the service level. My environments are also spread across accounts so staging is not an option for env propagation. Has anyone had success implementation API management with AWS API Gateway?


回答1:


In API Gateway, major versions should be represented by separate APIs. You can use the custom domain feature to map base paths to each API (i.e. myapi.com/v1 => API 1, myapi.com/v2 => API 2). You can also make use of the import/export functionality to manage changes between APIs.

Using separate accounts per environment is actually a suggested best-practice. I would suggest taking a good look at CloudFormation to manage your workflow - a single CloudFormation template would work well across multiple accounts.



来源:https://stackoverflow.com/questions/38987316/api-versioning-with-aws-api-gateway

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!