🔷

API Gateway – Integration Types (High Level)

Lambda Function

  • Directly invokes an AWS Lambda function.
  • Simplest way to expose serverless REST APIs.
  • Ideal for event-driven and microservices architectures.

HTTP

  • Forwards requests to an HTTP backend (e.g., on-premises API, ALB).
  • Lets you add API Gateway features such as rate limiting, authentication, API keys, and caching to existing services.

AWS Service

  • Integrates directly with any AWS API without intermediate code.
  • Examples: start a Step Functions state machine, send a message to SQS, write to DynamoDB.
  • Provides authentication, public exposure, and traffic control for AWS service calls.

API Gateway – AWS Service Integration Example (Kinesis Data Streams)

Flow:
  1. Client sends a request to API Gateway.
  1. API Gateway pushes the data to Kinesis Data Streams.
  1. A connected Kinesis Data Firehose retrieves the stream data.
  1. Firehose transforms/batches and stores the records in Amazon S3 (e.g., as .json files).