API Gateway in AWS

Shan
2 min readAug 1, 2023

--

Amazon API Gateway is a fully managed service that makes it easy for developers to publish, maintain, monitor, and secure APIs at any scale.

To put it simply, one can understand API Gateway acting as a door / “front-end” for your backend services. It would proxy incoming client requests to backend services.

Here is an example:

Why use API Gateway?

  • API Versioning (Publish different versions of API)
  • Authorization
  • Traffic management (Eg. Throttling)
  • Request and response transformation (Incompatibility in format between client and backend services. )
  • Manage API at scale. (Able to handle high volume of API requests)

Limitation of API Gateway?

  • Timeout of 29 seconds
  • 10 MB max payload data size (Not ideal if handling with large files)

How is deployment handled ?

There is a concept of stages in API Gateway which can be viewed as tags.
Stages such as DEV, PROD help with the development lifecycle of APIs.
E.g https://xxx.sample.com/dev/cars, https://xxx.sample.com/prod/cars
Each stage will have a unique endpoint URL which clients can access.

Can API Gateway only interact or integrate with AWS lambda functions?

No. Other than AWS lambda functions, API Gateway can interact with HTTP endpoints which can be on prem, allowing developers to leverage on rate limiting, caching and authentication functionalities. API Gateway can also be integrated with AWS API Services such as posting message to SQS (Simple Queue Service).

Hopefully this short article will help you understand AWS Api gateway a little better.

--

--