Amazon API Gateway, Main Features and Core Concepts

In this article, we are going to learn What is Amazon API Gateway, Main Features and Core Concepts.

Amazon API Gateway | API Management | Amazon Web Services

By the end of the article, we will learn What is Amazon API Gateway, Architecture of API Gateway, Main Features of API Gateway, Amazon API Gateway Use Cases, API Gateway as a Lambda Synchronous Event Sources
and Amazon API Gateway Core Concepts.

I have just published a new course — AWS Lambda & Serverless — Developer Guide with Hands-on Labs.

What is Amazon 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 backend services. Using API Gateway, we can create RESTful APIs and WebSocket APIs that enable real-time two-way communication applications. API Gateway also supports containerized and serverless workloads as well as web applications.

So we can say that, we can create, deploy, and manage a RESTful APIs in order to expose backend HTTP endpoints, AWS Lambda functions, or other AWS services with using Amazon API Gateway.

API Gateway creates RESTful APIs that are HTTP-based. And enable stateless client-server communication and also implement standard HTTP methods such as GET, POST, PUT, PATCH, and DELETE.

There are 3 main types of APIs in Amazon API Gateway;

  • HTTP API
  • REST API
  • Websocket API

HTTP API

HTTP APIs are the best choice for building APIs that only require API proxy functionality.

REST API

Restful APIs for require API proxy functionality and API management features.

Websocket API

Websocket API for building real-time two-way communication applications, such as chat apps and streaming dashboards.

Architecture of API Gateway

API Gateway acts as a “front door” for applications to access data, business logic, or functionality from your backend services. API Gateway handles all tasks involved in accepting and processing thousands of concurrent API calls. When you create APIs in Amazon API Gateway, it also provides an integrated and consistent developer environment.

Amazon API Gateway | API Management | Amazon Web Services

Main Features of API Gateway

Amazon API Gateway has lots of features, but we will share only important ones:

  • Support for stateful WebSocket and stateless HTTP and REST APIs.
  • Provide different authentication methods like AWS IAM, Lambda authorizer and Amazon Cognito user pools.
  • Supports OAuth2 and OpenID Connect protocols.
  • Built-in CORS support and automatic deployments
  • Provide Developer portal for publishing Restful APIs
  • Canary release deployments for safely rolling out changes.
  • Logging and monitoring of API usage and API changes
  • Ability to use IaC tools like AWS CloudFormation templates to enable API creation

Amazon API Gateway Use Cases

There are 3 main use cases for Amazon API Gateway

  • Use API Gateway to create HTTP APIs
  • Use API Gateway to create REST APIs
  • Use API Gateway to create WebSocket APIs
404 Not Found (amazon.com)

First use case is Use API Gateway to create HTTP APIs. The main use case of Amazon API Gateway is creating HTTP APIs. HTTP APIs enable you to create RESTful APIs with lower latency and lower cost than REST APIs.

Second one is Using API Gateway to create REST APIs. An API Gateway REST API is made up of resources and methods. A resource is a logical entity that an application can access via a resource path.

The last use case is Use API Gateway to create WebSocket APIs. In a WebSocket API, the client and the server can both send messages to each other at any time.

Amazon API Gateway Core Concepts

We will see these Core Concepts directly into AWS Management Console when creating API Gateways. The main core concept is API Gateway. But also we can API deployment, API endpoint and Proxy integrations are other core concepts that we can configure when create API Gateways.

  • API deployment
    A snapshot of your API Gateway API. The deployment must be associated with one or more API stages for clients to use it.
  • API endpoint
    Hostname for an API deployed to a specific Region in API Gateway.
  • Proxy integration
    A simplified API Gateway integration configuration.

Step by Step Design AWS Architectures w/ Course

I have just published a new course — AWS Lambda & Serverless — Developer Guide with Hands-on Labs.

In this course, we will learn almost all the AWS Serverless Services with all aspects. We are going to build serverless applications with using AWS Lambda, Amazon API Gateway, Amazon DynamoDB, Amazon Cognito, Amazon S3, Amazon SNS, Amazon SQS, Amazon EventBridge, AWS Step Functions, DynamoDB and Kinesis Streams. This course will be 100% hands-on, and you will be developing a real-world application with hands-on labs together and step by step.

Source Code

Get the Source Code from Serverless Microservices GitHub — Clone or fork this repository, if you like don’t forget the star. If you find or ask anything you can directly open issue on repository.

References

Amazon API Gateway | API Management | Amazon Web Services

--

--

Mehmet Ozkaya
AWS Lambda & Serverless — Developer Guide with Hands-on Labs

Software Architect | Udemy Instructor | AWS Community Builder | Cloud-Native and Serverless Event-driven Microservices https://github.com/mehmetozkaya