Search code examples
amazon-web-servicesaws-api-gateway

How to describe AWS GatewayAPI in file and import?


We are using Amazon Gateway API and currently we describe API endpoints manually through the web console.

Is it possible to create definition of API in some file(s) and import it?

Why do we need this:

  • We want every change in the API be reviewed (it's our development process) by other people.
  • In case if API is deleted or broken accidently, we want to be able to restore it easily.

By now the only solution I see is to write script, based on aws apigateway command line command that creates all resources and methods. But probably there is a better way to do it?

Thanks!

P.S. It may partially overlaps with this question: exporting api definition from AWS api gateway.


Solution

  • I think the Swagger Importer feature of AWS API Gateway is what you are looking for: https://aws.amazon.com/about-aws/whats-new/2015/07/introducing-swagger-importer-easily-import-swagger-api-definitions-into-amazon-api-gateway/