DVA-C03 API Gateway: throttling, caching, authorizers and the error codes the exam loves
Amazon API Gateway is one of those services that shows up in almost every domain of the AWS Certified Developer Associate exam (DVA-C03): development, security, deployment and troubleshooting. The questions rarely ask "what is API Gateway?". They describe a symptom or a requirement and expect you to know which setting or feature fits. This guide walks through the parts that come up most, with the…
The Amazon API Gateway is a frequently appearing service in the AWS Certified Developer Associate exam (DVA-C03), covering development, security, deployment, and troubleshooting. The exam typically doesn't ask about what API Gateway is, but rather presents symptoms or requirements and expects knowledge of appropriate settings or features.
There are two main types of APIs within API Gateway: REST API and HTTP API. HTTP API is cheaper, has lower latency, and is simpler, while REST API offers more features. Key differences include support for caching, API keys and usage plans, request validation, AWS WAF integration, private endpoints, and mapping templates for request/response transformation in REST API, while HTTP API supports Lambda and HTTP integrations, JWT authorizers, Lambda authorizers, and IAM authorization.
Status codes are another commonly tested topic. A 429 Too Many Requests indicates throttling, either at the account-level limit, stage, method, or through a usage plan. Solutions include raising the limit, adding a usage plan, or having the client retry with exponential backoff. A 502 Bad Gateway typically means a Lambda proxy integration returned an incorrect response format.
A 504 Gateway Timeout occurs when the integration takes too long, often resolved by making the work asynchronous rather than waiting for the backend.
Throttling in API Gateway happens at several levels, including account-level limit per Region, stage and method limits, and per-client limits through usage plans. Usage plans link one or more API stages to API keys and set rates, bursts, and optional quotas. When a question mentions limiting requests per customer or offering free and paid tiers, usage plans are the answer. Remember that API keys are for client identification and metering, not authentication.
Response caching is another frequently tested aspect of REST APIs. By default, caching is enabled with a TTL (time-to-live) of 300 seconds, but the maximum TTL is 3600 seconds. Cache keys can include specific parameters like headers, query strings, and path. If users see stale data after an update, a lower TTL or cache invalidation is the solution.
Token-based authorizers, like JWT, are used for web and mobile apps with user sign-up and sign-in, while IAM, Cognito, and Lambda authorizers are better suited for AWS services, internal tools, and third-party identity providers.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.