Does AWS API Gateway RestAPI allow the creation of path based versioning at the API RestAPI level natively?

Viewed 531

For example, Azure API Management service allows the creation of an API "proxy" front end and the ability to create an api version such as

Here is screenshot of that in Azure platform.

enter image description here

https://docs.microsoft.com/en-us/azure/api-management/api-management-get-started-publish-versions

Does AWS API Gateway RestAPIs allow this type of versioning natively? If it does, how can I setup for example "v1" of a restAPI?

And if the AWS RestAPI "Stage" is the way to accomplish this, how would I still support the idea of creating stages per environment, while still doing versioning? To me stage seems more associated with environments, whereas versioning is a completely separate concept.

Note: The rest APIs are private

1 Answers

First limitation of private APIs from the documentation is the following:

Custom domain names are not supported for private APIs.

This limits what you can do with API Gateway to support multiple versions.

  • Run an API Gateway per version - This option grants you complete separation between API versions, however, unfortunately you will need to call a separate endpoint per API.
  • Deploy a single private API Gateway containing all API versions - This option scopes everything to a single endpoint but as a limitation could become quite complex and hard to manage depending on the number of verbs.

Hopefully in the future this feature from custom domains detailed below will be added.

Previous Answer - Before known using Private API

This can be done in API Gateway through the combination of stages and custom domain configuration.

If you deploy each version of API Gateway to either its own stage i.e. v1, v2 stage you have seperated the schema and actions between the versions.

Alternatively you can have a separate API and stage for each version of your specific API.

Then create a custom domain name for your API endpoint, under base path mappings you can map a specific subfolder v1 to the API and select the v1 stage in your API Gateway endpoint.

Related