Deploying a REST API from the API Gateway console - Amazon API Gateway

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.

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.


To associate a stage in API Gateway with a different deployment, see Associate a stage with a different REST API deployment instead.

  1. Sign in to the API Gateway console at

  2. In the APIs navigation pane, choose the API you want to deploy.

  3. In the Resources navigation pane, choose Actions.

  4. From the Actions drop-down menu, choose Deploy API.

  5. In the Deploy API dialog, choose an entry from the Deployment stage dropdown list.

  6. If you choose [New Stage], enter a name in Stage name and optionally provide a description for the stage and deployment in Stage description and Deployment description. If you choose an existing stage, you might want to provide a description of the new deployment in Deployment description.

  7. Choose Deploy to deploy the API to the specified stage with default stage settings.

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.


After modifying stage settings, you must redeploy the API for the changes to take effect.


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.

  1. If you're not already in Stage Editor, choose the stage that you want to update the deployment from an API's Stages option in the APIs main navigation pane.

  2. On the Deployment History tab, choose the option button next to the deployment you want the stage to use.

  3. Choose Change Deployment.