capabilities.work

Secure an HTTP API with an Authorizer

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

Recipe · 4 steps

Secure an HTTP API with an Authorizer

Create an API, an authorizer, and a route protected by it.

  1. Create the HTTP API container.
  2. Create the authorizer that will guard routes on the API.
  3. Create a route protected by JWT authorization.
  4. Create a route protected by a custom (REQUEST) Lambda authorizer.
What you'll need to have ready
  • name: Name of the HTTP API.
  • authorizerName: Name of the authorizer.
  • authorizerType: Type of authorizer (REQUEST or JWT).
  • identitySource: Identity sources the authorizer reads (e.g. ["$request.header.Authorization"]).
  • authorizerUri: URI of the Lambda authorizer (used for REQUEST authorizers).
  • routeKey: Route key for the protected route (e.g. "GET /secure").
For your developer

Arazzo workflow aws-api-gateway:secure-http-api-authorizer, 4 operations: $sourceDescriptions.apisApi.createApi → CreateAuthorizer → CreateRoute → CreateRoute. Specs on APIs.io.