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:
- Client sends a request to API Gateway.
- API Gateway pushes the data to Kinesis Data Streams.
- A connected Kinesis Data Firehose retrieves the stream data.
- Firehose transforms/batches and stores the records in Amazon S3 (e.g., as
.json
files).