API Gateway
Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. APIs act as the "front door" for applications to access data, business logic, or functionality from your backend services.



For a Lambda function, you can have the Lambda proxy integration, or the Lambda custom integration
For an HTTP endpoint, you can have the HTTP proxy integration or the HTTP custom integration
For an AWS service action, you have the AWS integration of the non-proxy type only


Authentication

Endpoint Types

Stages

Errors

Caching
You can add caching to API calls by provisioning an Amazon API Gateway cache and specifying its size in gigabytes
Caching allows you to cache the endpoint's response
Caching can reduce number of calls to the backend and improve latency of requests to the API


Methods and Resources

Integrations
You choose an API integration type according to the types of integration endpoint you work with and how you want data to pass to and from the integration endpoint.
For a Lambda function, you can have the Lambda proxy integration, or the Lambda custom integration. For an HTTP endpoint, you can have the HTTP proxy integration or the HTTP custom integration.
For an AWS service action, you have the AWS integration of the non-proxy type only. API Gateway also supports the mock integration, where API Gateway serves as an integration endpoint to respond to a method request.



Mapping Templates

Stages & Deployments
A stage is a named reference to a deployment, which is a snapshot of the API. You use a Stage to manage and optimize a particular deployment. For example, you can configure stage settings to enable caching, customize request throttling, configure logging, define stage variables, or attach a canary release for testing.


Throttling
API Gateway sets a limit on a steady-state rate and a burst of request submissions against all APIs in your account
Limits:
By default API Gateway limits the steady-state request rate to 10,000 requests per second
The maximum concurrent requests is 5,000 requests across all APIs within an AWS account
If you go over 10,000 requests per second or 5,000 concurrent requests you will receive a 429 Too Many Requests error response
Upon catching such exceptions, the client can resubmit the failed requests in a way that is rate limiting, while complying with the API Gateway throttling limits

Stage Variables

Open API & Swagger
You can use API Gateway to import a REST API from an external definition file into API Gateway. Currently, API Gateway supports OpenAPI v2.0 and OpenAPI v3.0 definition files. You can update an API by overwriting it with a new definition, or you can merge a definition with an existing API.


Last updated