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 keywords that point to each answer. Everything here is based on the official exam page and the API Gateway developer guide. AWS changes limits and features over time, so always check the docs before your exam.
1. REST API or HTTP API?
API Gateway has two main flavours for request/response APIs:
- HTTP API: cheaper, lower latency, simpler. Supports Lambda and HTTP integrations, JWT authorizers (for example with Amazon Cognito or any OIDC provider), Lambda authorizers and IAM authorization.
- REST API: more features. API keys and usage plans, response caching, request validation, AWS WAF integration, resource policies, private endpoints, and mapping templates to transform requests and responses.
How to read the question: if the requirement mentions caching, usage plans per customer, API keys, request validation or WAF, the answer is a REST API. If it says lowest cost or lowest latency and needs none of those, HTTP API is usually the better fit.
2. Status codes: 429, 502, 504 and 403
Troubleshooting questions love to give you a status code and ask for the cause.
- 429 Too Many Requests: throttling. Either the account-level limit for the Region, a stage or method throttle you set, or a usage plan limit for that API key. Fix: raise the limit, add a usage plan, or have the client retry with exponential backoff.
- 502 Bad Gateway: very often a Lambda proxy integration returning a response in the wrong format. With proxy integration, your function must return an object with
statusCode,headersand a stringbody. Returning a plain object or a non-string body gives a 502. - 504 Gateway Timeout: the integration took too long. REST API integrations have a default timeout of 29 seconds. If the backend needs longer, the answer is usually to make the work asynchronous (for example, put the job on SQS or start a Step Functions execution and return right away) rather than wait.
- 403 Forbidden: missing or invalid authorization, a missing API key when the method requires one, or a resource policy that denies the caller.
A quick memory aid: 4xx means the client side or limits, 5xx means something behind API Gateway went wrong.
3. Throttling and usage plans
API Gateway throttles at several levels: an account-level limit per Region, then stage and method limits you configure, then per-client limits through usage plans.
A usage plan links one or more API stages to API keys and sets a rate, a burst and an optional quota (for example, 10,000 requests per month). This is the classic answer when a question says "each customer must be limited to N requests" or "offer a free tier and a paid tier of the API".
Important nuance for the exam: API keys are for identifying and metering clients, not for authentication. If the question is about securing who can call the API, look at authorizers or IAM instead.
4. Response caching
REST APIs can cache responses per stage. The key facts:
- The default TTL is 300 seconds, the maximum is 3600 seconds, and a TTL of 0 turns caching off.
- You can choose which parameters (headers, query strings, path) are part of the cache key. If two users get each other's data, the cache key is probably missing a parameter.
- A client can ask to skip the cache with the header
Cache-Control: max-age=0, but only if it is allowed to invalidate the cache. You can require authorization for this so random clients cannot flush your cache.
How to read the question: "reduce the number of calls to the backend" or "improve latency for repeated identical requests" points to stage caching. "Users see stale data after an update" points to a lower TTL or cache invalidation.
5. Authorizers: IAM, Cognito, JWT or Lambda?
This is one of the most tested areas.
- IAM authorization: callers sign requests with Signature Version 4. Best for AWS services, internal tools and other AWS accounts.
- Cognito user pool authorizer (REST API) or JWT authorizer (HTTP API): users sign in to a user pool or OIDC provider and send a token. Best for web and mobile apps with user sign-up and sign-in.
- Lambda authorizer: your own function decides. Use it for custom tokens, third-party identity providers that are not OIDC, or decisions based on headers, query strings or the source IP. There are two types: TOKEN (looks at a single header such as a bearer token) and REQUEST (can look at headers, query strings, stage variables and context).
Lambda authorizer results can be cached (by default for 300 seconds). If a question says "the authorizer function is invoked on every request and costs too much", enable or increase authorizer caching. If it says "a user still has access after their permissions were removed", the cached policy is the likely cause.
6. Stages, stage variables and canary releases
A deployment is a snapshot of your API, and a stage (dev, test, prod) is where a deployment is published.
- Stage variables act like environment variables for a stage. A common pattern is pointing each stage at a different Lambda alias, for example
${stageVariables.lambdaAlias}. Remember that API Gateway needs permission to invoke each alias. - Canary release on a REST API stage sends a percentage of traffic to a new deployment. That is the API Gateway answer when a question asks for gradual rollout at the API level. If the question is about the Lambda function itself, weighted aliases or CodeDeploy traffic shifting are the more common answers.
7. CORS: the proxy integration trap
If a browser app on another domain calls your API and gets a CORS error:
- Enable CORS on the API so the
OPTIONSpreflight request returns the right headers. - With Lambda proxy integration, API Gateway passes the response straight through, so your function must return the
Access-Control-Allow-Originheader itself. Enabling CORS in the console alone is not enough. This detail shows up in exam questions more than you would expect.
8. A quick decision checklist
Before you look at the answer options, find the one constraint in the question:
- Is it about cost/latency with simple needs? → HTTP API.
- Is it about per-customer limits? → Usage plan with API keys.
- Is it about repeated identical reads? → Stage caching.
- Is it about who can call the API? → IAM, Cognito/JWT, or a Lambda authorizer.
- Is there a status code? → 429 throttling, 502 bad proxy response, 504 timeout, 403 auth or policy.
- Is it about safe rollout? → Stage canary, or Lambda alias traffic shifting.
How to practice this
Reading is not enough for API Gateway. Build a small API in your own account: a Lambda proxy integration, a usage plan with an API key, a Cognito authorizer, and a stage with caching turned on. Then break it on purpose: return a body that is not a string, add a sleep longer than the timeout, call it without the key. Seeing the 502, 504 and 403 yourself makes these questions much easier.
After that, timed practice questions help you get used to how the scenarios are worded.
Disclosure: I am the author of a set of DVA-C03 practice exams on Udemy: 6 full exams (390 questions) that follow the C03 domain weights, with an explanation and an AWS docs link for every answer. If you want timed practice on topics like the ones above, the current price is $34.99 with this link: AWS Developer Associate DVA-C03 – 6 Practice Exams. Not affiliated with AWS. Parts of this article were drafted with AI assistance and reviewed against the AWS documentation.


