DVA-C02

Introduction to Amazon API Gateway

Create, publish and secure REST, HTTP and WebSocket APIs.

  • 7 lessons
  • Module quiz

An application programming interface (API) lets clients, such as web pages, mobile apps or other systems, use an application's functions over the network. Running an API involves more than the code behind it: requests must be received over HTTPS, authenticated, checked, limited to protect the backend, routed to the right code and monitored.

Amazon API Gateway is a fully managed service that provides this front door. Clients call an API Gateway endpoint, and API Gateway authorises the request and forwards it to a backend, which can be a Lambda function, any HTTP endpoint or another AWS service, then returns the response. It offers three types of API: REST APIs with the fullest feature set, HTTP APIs that are simpler and cheaper, and WebSocket APIs for two-way, real-time communication. API Gateway is charged per million requests, plus data transfer and optional caching.

Where API Gateway fits

API Gateway and Lambda together form the most common serverless backend on the exam. Questions focus on choosing the right API type, on how requests and responses pass between API Gateway and Lambda, on releasing changes through stages, and on securing and protecting the API. Two default limits are frequently relevant: an integration must respond within 29 seconds by default, and an account is throttled at 10,000 requests per second by default across its APIs in a Region.

How this module is organised

Understanding Resources, Methods and Integrations in API Gateway introduces resources, methods and routes, the Lambda proxy contract and deployment. Choosing an API Type, Endpoint and Integration compares the API types and the ways an API connects to its backend. Deploying APIs to Stages with Stage Variables, Canaries and Caching explains how changes are released to environments. Controlling Access to APIs with Authorizers, Resource Policies and CORS covers the ways to control who may call an API, and Protecting Backends with Throttling, Usage Plans and API Keys explains how request rates are limited for the API and for each client. Validating and Transforming Requests and Responses explains how requests are checked and reshaped, and Publishing APIs on Custom Domain Names explains how an API is given a stable, branded address.

  1. Understanding Resources, Methods and Integrations in API Gateway Lesson 1
  2. Choosing an API Type, Endpoint and Integration Lesson 2
  3. Deploying APIs to Stages with Stage Variables, Canaries and Caching Lesson 3
  4. Controlling Access to APIs with Authorizers, Resource Policies and CORS Lesson 4
  5. Protecting Backends with Throttling, Usage Plans and API Keys Lesson 5
  6. Validating and Transforming Requests and Responses Lesson 6
  7. Publishing APIs on Custom Domain Names Lesson 7
  8. Practise and review
  9. Test your knowledge 12 questions