Deploying a REST API from the API Gateway console
You must have created a REST API before deploying it for the first time. For more information, see Creating a REST API in Amazon API Gateway.
Topics
Deploy a REST API to a stage
The API Gateway console lets you deploy an API by creating a deployment and associating it with a new or existing stage.
Note
To associate a stage in API Gateway with a different deployment, see Associate a stage with a different REST API deployment instead.
Redeploy a REST API to a stage
To redeploy an API, perform the same steps as in Deploy a REST API to a stage. You can reuse the same stage as many times as desired.
Update the stage configuration of a REST API deployment
After an API is deployed, you can modify the stage settings to enable or disable the API cache, logging, or request throttling. You can also choose a client certificate for the backend to authenticate API Gateway and set stage variables to pass deployment context to the API integration at runtime. For more information, see Update stage settings.
Important
After modifying stage settings, you must redeploy the API for the changes to take effect.
Note
If the updated settings, such as enabling logging, requires a new IAM role, you can add the required IAM role without redeploying the API. However, it can take a few minutes before the new IAM role takes effect. Before that happens, traces of your API calls are not logged even if you have enabled the logging option.
Set stage variables for a REST API deployment
For a deployment, you can set or modify stage variables to pass deployment-specific data to the API integration at runtime. You can do this on the Stage Variables tab in the Stage Editor. For more information, see instructions in Setting up stage variables for a REST API deployment.
Associate a stage with a different REST API deployment
Because a deployment represents an API snapshot and a stage defines a path into a snapshot, you can choose different deployment-stage combinations to control how users call into different versions of the API. This is useful, for example, when you want to roll back API state to a previous deployment or to merge a 'private branch' of the API into the public one.
The following procedure shows how to do this using the Stage Editor in the API Gateway console. It is assumed that you must have deployed an API more than once.