aws-api-gatewaystaging

What is a "stage" in the context of Amazon API Gateway?


What is a "stage" in the context of Amazon API Gateway? What is its purpose and how is it created?

Is there any relation to "staging" in the production/staging/development convention?


Solution

  • I would consider API Gateway stages as different stages in your pipeline or different environments of your stack for the same application. You can have as many stages as you want. In a simple stack, we can think of 3 stages: dev, qa and prod. Few things which you can do with stages:

    1. You will have different URL's for each stage. like https://api-gateway-domain/dev/... , https://api-gateway-domain/qa/..,https://api-gateway-domain/prod/... Basically the URL would be https://api-gateway-domain/<stage_name>/...
    2. You can go with custom domain names to associate with each stage.
    3. You can associate different usage plans for each stage.
    4. You will mostly have at least 1 stage variable to define your stage uniquely. This could be an Elastic Beanstalk URL which is different for each environment. Through stage variables, you will be calling different backend URL's for each stage.
    5. You can deploy different versions of API Gateway configurations for that application to different stages.