AWS API Gateway - Manage multiple model versions for different stages

旧巷老猫 提交于 2019-12-11 07:23:11

问题


I use multiple AWS API Gateway for many of our backend services.

This is the standard structure of the Gateway (in relation to my question);

  • API Gateway
  • 2 stages (test and prod)
  • AWS CLI Tool for automated changes and deployments

The problem I'm having (this has been since I started using AWS API Gateway);

The Gateway manages versionsing of the API perfectly fine, however, not model versioning...

During a quarter (we work in 3 month sprints), we would make changes multiple models. This stage would be deployed tested and things would continue to work as expected.

The problem comes when we need to make a hotfix, during the quarter.

A hotfix would only contain a small part of development we would like to release into the production environment, however, the Gateway only holds one version of model. Meaning, if i've made changes to 10 models during our quarter, and then need to release a hotfix that affects only 1 model, we're in trouble.

I typically would need to roll back all model changes, to match that of initial prod release, add the 1 new model change and release to live - then go back and re-add all the models that I had to remove (sync test and prod back up).

I can get around this (dirty hack) by creating multiple Gateways (called Gateway-test and Gateway-live). These would each be a duplicate of each other with 1 stage each, but have their own models. That way, when production needs changes for a hotfix, i'll simple add what's needed and deploy it. At the end of the quarter, i'd sync them both up and deploy live.

I'm sure you can see how this can become a pain - as now, instead of managing versions of models, I have to manage 2 completely separate Gateways.

I've spoken with AWS support and our AWS architect (business support), however, this seems to be a case of "it's possibly getting added to the roadmap".

Has anyone else managed to get around this issue?

Thanks in advance.

来源:https://stackoverflow.com/questions/52922428/aws-api-gateway-manage-multiple-model-versions-for-different-stages

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