AWS API Gateway

Jul 8, 2024

AWS API Gateway

Introduction

  • Overview video by Intellipat on Amazon API Gateway
  • Upcoming topics:
    • What is an API
    • Types of APIs
    • Amazon API Gateway explanation
    • Use cases
    • Pricing

What is an API?

  • Definition: Set of definitions and protocols for building and integrating application software
  • API = Application Programming Interface
  • Functions as an intermediary allowing two applications to communicate
  • Examples:
    • Web browser interacting with a server
    • Delivery service apps using Google Maps API
    • Websites making payments via APIs like PayPal or Google Pay

Types of APIs

  • HTTP API:

    • Web server or web browser related
    • Limited to web applications, client-side
    • May be public or private (access token required for private)
  • REpresentational State Transfer (REST) API:

    • A subset of HTTP API
    • More flexible
    • Not tied to methods/resources
    • Handles multiple types of calls and data formats
  • WebSocket API:

    • Creates web sockets for bi-directional, full-duplex communication
    • Persistent TCP connection
    • Written in JavaScript
    • Used for chat apps, streaming dashboards

What is an API Gateway?

  • API management tool
  • Acts as a single entry point for backend services
  • Ensures API is delivered with consistency (security, scalability, high availability)
  • Combines necessary services into a seamless user experience
  • Examples of top API Gateways: APG, Mulesoft, Axway, 3Scale

Amazon API Gateway

  • Amazon's variant of API Gateway
  • AWS service for creating, publishing, maintaining, monitoring REST APIs, HTTP APIs, WebSocket APIs
  • API developers can target AWS or other web services/data in AWS cloud

Working of Amazon API Gateway

  • Common in architectures with a Lambda function
  • Handles requests through features like authentication, authorization, rate limits, quotas, monitoring, caching
  • Acts as an abstract layer ensuring consistent API management

Need for Amazon API Gateway

  • Useful in devops methodologies
  • Manages microservices effectively
  • Ensures hassle-free communication between applications and microservices

Use Cases of API Gateway

  • Vogue (PhotoVogue):

    • Photography website using Amazon API Gateway
    • Users upload photos; reviewed by editorial team
  • Fox Network (Fox Now):

    • Handles streaming of digital content
    • Uses containerized microservices on AWS
    • Delivers content via web/mobile/setup devices

Amazon API Gateway Pricing

  • Pay-as-you-go model
  • No minimum fees or upfront payments
  • Free tier includes:
    • 1 million HTTP requests
    • 1 million REST API calls
    • 1 million messages
    • 750,000 connections per minute
    • Free for up to 12 months

Conclusion

  • Amazon API Gateway essential for managing multiple APIs
  • Used by enterprises like Fox and Vogue
  • Cost-effective ($1 per 1 million requests)
  • Enhanced user experience when combined with other AWS services (Lambda, Elastic Container Services)

  • Additional info: Intellipat offers an advanced certification on Cloud and DevOps by IIT Madras.