
目次
What is AWS_API_Gateway?
Amazon API Gateway is a fully managed API service that allows you to easily
fully managed API service that allows you to easily create and manage
Amazon API Gateway is a fully managed API service that makes it easy to create and manage APIs.
API Gateway is a
Frequently used to build serverless architectures in conjunction with Lambda
Lambda is a server-less architecture that is used in conjunction with Lambda.
The API gateway provides
Provides HTTP access to backend services via APIs
It can be integrated with Lambda functions to allow control from HTTP. This allows customers to invoke these functions via HTTP.
API Gateway provides a comprehensive API call processing solution, including traffic management, authorization and access control, monitoring, API version control, and more.
API Gateway can handle up to hundreds of thousands of concurrent API calls
API Gateway can handle up to hundreds of thousands of simultaneous API calls.
There is no minimum or initial fee for API Gateway, and you are charged based on the amount of API calls received and data transferred.
API Gateway is not completely language-neutral and can be implemented through workflows, but must be integrated with coding processes such as Lambda functions.
Reference Site
feature
The API Gateway can be used without requiring a server.
This is a typical use case for API Gateway due to the requirement of call requests via HTTP.
API Gateway provides HTTP access to back-end services via APIs.
Integration with Lambda functions enables request control from HTTP for serverless applications.
Who uses it and why?
Who uses it?
Why use it?
What can it do? (Function)
API Gateway provides HTTP access to back-end services via APIs.
Integration with Lambda functions allows control from HTTP.
This allows customers to invoke these functions via HTTP.
Customers can retrieve, register, and modify DynamoDB data from Lambda functions via HTTP.
The specific procedure is to call an AWS Lambda function via HTTPS.
To do this, use Amazon API Gateway to define a custom REST API and endpoints, and map individual methods (such as GET and PUT) to specific Lambda functions.
You can also add a special method called ANY to map all supported methods (GET, POST, PATCH, DELETE) to a Lambda function.
When an HTTPS request is sent to an API endpoint, the Amazon API Gateway service calls the corresponding Lambda function.
Working with Lambda
API code can be converted to serverless applications using Lambda functions and API Gateway.
Lambda saves money because you don't pay for infrastructure, only for the time it takes to execute a Lambda function.
API Gateway can then be integrated to generate and manage APIs, along with AWS Lambda functions that can scale accordingly.
API Gateway allows Lambda functions to be called via HTTPS
The API Gateway is a web-based API that allows you to call Lambda functions via HTTPS.
To do so, use Amazon API Gateway to define custom REST APIs and endpoints and map them to specific Lambda functions.
You can also add a special method called ANY to map all supported methods (GET, POST, PATCH, DELETE) to a Lambda function.
When sending an HTTPS request to an API endpoint, the Amazon API Gateway service calls the corresponding Lambda function
use case
Your company operates mobile applications linked to various social networking sites such as Instagram.
Instagram data is retrieved and stored in DynamoDB tables.
You, as the solution architect, will be responsible for
You have been asked to add a function that displays the ranking of Instagram posts from a specific word
You have been asked to add a function to display the ranking of Instagram posts from a specific word.
Cost-effective and scalable solution support
- Using Lambda and API Gateway
reason
This scenario requires a scalable, cost-effective implementation method for the ability to perform Instagram post ranking by specific words from the application screen.
The most likely architecture here is to use Lambda and API Gateway.
You could increase the number of EC2 instances to accommodate this, but unlike using EC2 instances that run all the time, the
API Gateway and Lambda functions are charged only when they are used.
This can help keep costs down.
This allows a Lambda function based on an API call to retrieve data from a DynamoDB table that retrieves and stores Instagram data and
Ranking process is possible
The function is then able to perform the ranking process.
Such a mobile app can be built with a microservice architecture using ECS and Fargate, but it is not cost-optimal compared to using Lambda functions.
API Type
RESTful API
When users navigate to the underlying service via the Amazon API, AWS X-Ray can be used to track and analyze user requests.
API Gateway supports AWS X-Ray tracing for all API Gateway endpoint types (regional, edge-optimized, and private).
You can use AWS X-Ray with Amazon API Gateway in all regions where X-Ray is available.
WEBSOCKET API
About Authorization Settings
As part of API Gateway authorization management, developers, IT administrators, and users must be given the appropriate level of authorization to manage the API Gateway, and how to set access privileges to the API Gateway is being questioned.
Access to Amazon API Gateway is controlled by access rights using IAM policies.
To control access to Amazon API Gateway with IAM access privileges, control access to the two API Gateway component processes.
To allow API callers to make API calls or update the API cache, you must create an IAM policy that allows a specific API caller to call API methods for which IAM user authentication is enabled.
The API developer sets the authorizationType property of the method to AWS_IAM to require the caller to send the access key of the IAM user to be authenticated.
Next, attach this policy to the IAM user as the source of the API call, the IAM group to which the user belongs, or the IAM role the user assumes.
It is required to implement data acquisition and processing functions using Lambda functions, and to integrate Amazon API Gateway with Lambda functions so that Lambda functions can be accessed and used from HTML.
API Gateway is a fully managed service that allows you to create, distribute, maintain, monitor, and protect your APIs.
REST APIs and WebSocket APIs can be created to serve as a "front door" to access data, business logic, and functionality from code running in AWS Lambda.
It is also possible to call the code by writing directly into HTML.
use case
requirement
In a serverless application, data registration to the database and data retrieval process should be realized by a call request via HTTP.
The requirement for call requests over HTTP makes it a typical use case for API Gateway, which provides HTTP access to back-end services via an API. When integrated with Lambda functions, it enables request control from HTTP for serverless applications.
Amazon API Gateway and AWS Lambda to build a serverless architecture. The application allows users to access the Amazon API Gateway s Restful API to track and analyze user requests when they call the service.
Services to meet this requirement
- AWS X-Ray
When users navigate to the underlying service via the Amazon API, AWS X-Ray can be used to track and analyze user requests. API Gateway supports AWS X-Ray tracing for all API Gateway endpoint types (regional, edge-optimized, and private). You can use AWS X-Ray with Amazon API Gateway in all regions where X-Ray is available.