aws api gateway

APIs are used to interact with web applications and apps use them to communicate with each other.

  1. Publish, maintain, monitor APIs - service to handle APIs at any scale
  2. Front door - like a front door for applications to access data/logic/functions

from backend services (apps on EC2, lambda)

  1. Supported API types:
    1. RESTful APIs - optimized for stateless, serverless workloads
    2. Websocket APIs - real time apps like chat applications

RESTful APIs

  • Representational State Transfer
  • Optimized for serverless and web applications
  • Stateless
  • Supports JSON

Advantages

  • Allows you to connect to applications running on Lambda, EC2, beanstalk, etc.
  • Send each API endpoint to a different target, if needed
  • Supports multiple versions - allowing dev/staging/prod, etc.
  • Serverless - cost effective and scalable
  • CloudWatch - API Gateway logs API calls, latencies, error rates
  • Throttling - helps manage throttling, DDOS attacks, etc.

Exam tips

  • Endpoint to apps running in AWS
  • Like the front door to an application
  • Serverless - cost effective and scales automatically
  • Throttle API Gateway to prevent overloading
  • CloudWatch logging for all calls, latencies, errors