Amazon API Gateway
Developer Guide

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Set Up API Keys Using the API Gateway REST API

To set up API keys, do the following:

  • Configure API methods to require an API key.

  • Create or import an API key for the API in a region.

Before setting up API keys, you must have created an API and deployed it to a stage.

For the REST API calls to create and deploy an API, see restapi:create and deployment:create, respectively.

Require an API Key on a Method

To require an API key on a method, do one of the following:

  • Call method:put to create a method. Set apiKeyRequired to true in the request payload.

  • Call method:update to set apiKeyRequired to true.

Create or Import API Keys

To create or import an API key, do one of the following:

With the API key created, you can now proceed to Create, Configure, and Test Usage Plans Using the API Gateway CLI and REST API.