capabilities.work

Provision and Deploy a REST API

A 5-step recipe with Amazon API Gateway. We can help you get access.

Recipe · 5 steps

Provision and Deploy a REST API

Stand up a deployable REST API end to end.

  1. Create the REST API container that will hold resources, methods, and deployments.
  2. List the resources for the new REST API to obtain the root resource id that the method will be attached to.
  3. Add the requested HTTP method to the root resource so the API can receive requests.
  4. Create a deployment that snapshots the current configuration and publishes it to the named stage.
  5. List the stages for the REST API to confirm the deployment created the requested stage.
What you'll need to have ready
  • name: Name of the new REST API.
  • description: Optional description for the REST API.
  • version: Optional version identifier for the REST API.
  • httpMethod: The HTTP verb to add to the root resource (e.g. GET, ANY).
  • authorizationType: Authorization type for the method (e.g. NONE, AWS_IAM).
  • apiKeyRequired: Whether the method requires an API key.
  • stageName: Name of the stage to deploy the API to.
For your developer

Arazzo workflow aws-api-gateway:provision-rest-api, 5 operations: CreateRestApi → GetResources → PutMethod → CreateDeployment → GetStages. Specs on APIs.io.