API Gateway

  1. AWS provides low cost highly scalable REST API gateway for developers to seamlessly create front door to their programs/data
    1. Your core domain functionality/business logic and or data can be published thru API
    2. Your processes running on EC2/code running on Lambda/Web Applications can be used to publish this data thru API
  2. Typically the API consumers are your end users using
    1. Web browser running JavaScript calling the REST API
    2. Mobile applications
    3. Other server based processes inside your organization or clients outside your organization
  3. API gateway can be setup cache the results of the API for a predefined amount of time known as TTL
  4. You can throttle requests to prevent DOS attacks
  5. Can log requests to Cloud Watch logs
  6. Cross Origin Resource Sharing (CORS)
    1. CORS enables JavaScript served from domain1 to make REST API calls to domain2
    2. CORS can be enabled on AWS API Gateway
  7. 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.
  8. API Cacheing
    1. Not eligible for Free tier
  9. /ping and /sping are reserved by AWS so can’t use them in your API path
  10. 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: DELETEGETHEADOPTIONSPATCHPOST, and PUT.
  11. First create Lambda.
    1. Then create API.
    2. In the API, create resource.
    3. Under the resource create a method.
  12. 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.
    1. 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.
  13. 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.
  14. 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.
<<< Elastic TranscoderAWS Kinesis >>>
Copyright 2005-2016 KnowledgeHills. Privacy Policy. Contact .