What is Amazon API Gateway?
What is Amazon API Gateway?
Amazon API Gateway is an AWS service which is used for creating, maintaining, publishing monitoring, and securing REST and WebSocket APIs at any scale. It allows developers to define the HTTP endpoints of a REST API or a WebSocket API and connect those endpoints with the corresponding backend business logic.
Table of Contents
- Application Programming Interface (API)
- Architecture of API Gateway
- Key concepts of Amazon API Gateway
- Benefits of using Amazon Gateway API
Application Programming Interface (API) :
A set of defined instructions which help developers to interface with applications are called Application Programming Interface i.e. API.
API are used with SDK i.e. Software Development Kit, which is a collection of tools for developers which help them to create downstream applications using API.
The key goal of forming the API is to create an ecosystem of developers. The individual microservices are easy to deploy and developed of other services. Microservices become popular because of segregation of services into each specific service.
When we try to access different product information it is being displayed on various pages and owned by the various microservices.
If we need to access data through various clients using various microservices, it becomes a tedious task. A better option and solution is API Gateway. Using API gateway all requests for routing, composition and data are generated. Also, requests for access, authentication, cache are handed by gateway API.
For AWS, such a facility is being provided by Amazon API gateway. If using Lambda or EC2 service of Amazon, it is absolutely necessary to use Amazon API gateway.
Architecture of API Gateway:
The following diagram demonstrates API Gateway architecture.
This diagram demonstrates how to build the APIs in Amazon API Gateway which provides you or your developer customers with an integrated and consistent developer experience for building AWS serverless applications. It is used to handle all the tasks which are involved in accepting and processing up to thousands of concurrent API calls, which include access control, traffic management, authorization, and API version management. It acts as a “front door” for applications for accessing the data, business logic, or functionality from your back-end services, like workloads running on Amazon EC2, code running on AWS Lambda, or real-time communication applications.
Key concepts of Amazon API gateway:
Following are the key concepts of Amazon API gateway:
- API Gateway REST API
- API Gateway WebSocket API
- API endpoint
- API key
- Edge-optimized API endpoint
- Integration request and response
- Mapping template
- Method request/ response
- Routes, Websocket connection
Benefits of using Amazon Gateway API:
- Efficient API development
- Performance at any scale
- Flexible security controls
- RESTful API options
- Cost savings at scale
- Easy monitoring