AWS provides low cost highly scalable REST API gateway for developers to seamlessly create front door to their programs/data
Your core domain functionality/business logic and or data can be published thru API
Your processes running on EC2/code running on Lambda/Web Applications can be used to publish this data thru API
Typically the API consumers are your end users using
Other server based processes inside your organization or clients outside your organization
API gateway can be setup cache the results of the API for a predefined amount of time known as TTL
You can throttle requests to prevent DOS attacks
Can log requests to Cloud Watch logs
Cross Origin Resource Sharing (CORS)
CORS can be enabled on AWS API Gateway
When request submissions exceed the steady-state request limits and burst limits, API gateway fails the limit exceeding requests and returns 429 Too many requests error.
Not eligible for Free tier
/ping and /sping are reserved by AWS so can’t use them in your API path
In a lambda proxy integration, the entire request is sent to the backend Lambda function as-is, via a catch-all ANY method that represents any HTTP method. The actual HTTP method is specified by the client at run time. The ANY method allows you to use a single API method setup for all of the supported HTTP methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT.
First create Lambda.
Then create API.
In the API, create resource.
Under the resource create a method.
Build an API Gateway API with Lambda Proxy Integration describe how to create an API Gateway API to expose the integrated Lambda function. In addition, you can create an API Gateway API to expose other AWS services, such as Amazon SNS, Amazon S3, Amazon Kinesis, and even AWS Lambda. This is made possible by the AWS integration. The Lambda integration or the Lambda proxy integration is a special case, where the Lambda function invocation is exposed through the API Gateway API.
you create an IAM role that your AWS service proxy uses to interact with the AWS service. We call this IAM role an AWS service proxy execution role. Without this role, API Gateway cannot interact with the AWS service. In later steps, you specify this role in the settings for the GET method you just created.
In addition to exposing Lambda functions or HTTP endpoints, you can also create an API Gateway API as a proxy to an AWS service, such as Amazon SNS, Amazon S3, Kinesis, enabling your client to access the back end AWS services through your APIs.
In addition to using IAM roles and policies or custom authorizers, you can also use a user pool in Amazon Cognito to control who can access your API in API Gateway. A user pool serves as your own identity provider to maintain a user directory. It supports user registration and sign-in, as well as provisioning identity tokens for signed-in users.