What is an Amazon API Gateway?

An Amazon API gateway is an AWS-based API management tool that helps to create, maintain, publish, monitor, operate, and secure HTTP, REST, and WebSocket APIs at any scale. With this gateway, developers can create APIs that can access AWS or other web services. The Amazon API gateway also helps to create APIs to access data stored in the AWS cloud.

The RESTful APIs created using the API gateway are HTTP-based, and it enables the communication between client and server. The RESTful API uses the HTTP method as the implementation standard, such as POST, PATCH, DELETE, PUT, and GET.

The HTTP APIs offer low-latency, cost-effective HTTP proxy, and AWS Lambda proxy APIs. The authentication methods offered by HTTP APIs are OAuth 2.0 and OIDC. These APIs come with built-in support for automatic deployments and CORS.

The WebSocket APIs created using the Amazon API Gateway adheres to the WebSocket protocol. The WebSocket protocol enables full-duplex and stateful communication between the client and the server. The WebSocket APIs also offers a feature to route incoming messages based on the content of the message. One can access the API gateway using any of the following methods.

  • AWS Management Console
  • AWS Command-line Interface
  • AWS SDKs
  • API Gateway V1 and V2 APIs
  • AWS Tools for Windows PowerShell

The Architecture of API Gateway

The Amazon  API gateway performs all the tasks involved in the accepting and processing of multiple concurrent API calls. The tasks performed by the API gateway includes authorization, authentication, traffic management, monitoring, access control, and API version control and management.

This gateway acts as a door for the applications to access business logic, data, or functionality from the back-end services. Some example of the back-end services are:

  • Workload running on Amazon EC2 (Elastic Compute Cloud)
  • Code running on AWS Lambda
  • Code running on web applications
  • Real-time communication applications

Features of Amazon API Gateway

Some features offered by Amazon API Gateway are the following:

  • Support for REST, HTTP, and WebSocket APIs
  • Private integration with AWS Cloud Map and AWS ELB
  • Flexible and powerful authentication mechanisms, such as Lambda authorizer functions, AWS Identity and Access Management policies, and Amazon Cognito user pools
  • Easy API creation and deployment
  • Easy publishing of the API using the Developer portal
  • Support for custom domain names
  • Protect API against common web exploits with the help of AWS WAF
  • Understands and triage performance latency with the help of AWS X-Ray

Amazon API Gateway HTTP APIs Update

Amazon has transitioned the HTTP APIs for Amazon API Gateway into general availability. Amazon team states that following during the product announcement:

“With the availability of new technology and the expertise of running API Gateway for almost five years, we built HTTP APIs to run more efficiently.”

As they have kept efficiency at most priority, the HTTP APIs receive an all-new user interface that makes it easier to use and more intuitive. This new release has decreased the latency by 60% in HTTP APIs.
The new release also offers several new features for the platform, such as private integrations, request throttling, and custom domain cross-compatibility. The ability to share the custom domains across HTTP and REST APIs allows the developers to build applications that can rely on both REST and HTTP APIs.