- A
Increase the API Gateway integration timeout to 30 seconds.
Why wrong: The maximum integration timeout for API Gateway is 29 seconds; it cannot be increased.
- B
Refactor the Lambda function to use asynchronous invocation, return a 202 immediately, and have the client poll for results.
Correct. Asynchronous processing avoids the timeout by decoupling the request from the long-running work.
- C
Enable API Gateway caching to avoid repeated calls.
Why wrong: Caching helps with repeated identical requests but does not solve the timeout for unique requests.
- D
Use multiple Lambda functions to parallelize processing.
Why wrong: Parallelization might reduce total time but each individual invocation could still exceed 29 seconds.
Quick Answer
The correct answer is to refactor the Lambda function to use asynchronous invocation, return a 202 Accepted immediately, and have the client poll for results. This resolves the API Gateway 504 timeout because the default integration timeout of 29 seconds is hard-capped, and your backend Lambda occasionally runs up to 30 seconds. By switching to async invocation, the API Gateway triggers the Lambda without waiting for it to finish, returning a 202 response well within the timeout window, while the client polls a separate status endpoint—like a DynamoDB record or S3 presigned URL—for the final result. On the AWS Certified Developer Associate DVA-C02 exam, this scenario tests your understanding of decoupling synchronous API calls from long-running processes; a common trap is trying to increase the timeout or use synchronous invocation with a longer Lambda execution, which still hits the 29-second Gateway limit. Remember the mnemonic: “202 buys you time, async frees the line.”
DVA-C02 Troubleshooting and Optimization Practice Question
This DVA-C02 practice question tests your understanding of troubleshooting and optimization. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. A key principle to apply: aPI Gateway integration timeout has a hard limit of 29 seconds.. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A developer is troubleshooting an Amazon API Gateway REST API that returns 504 Gateway Timeout errors for certain requests. The backend is a Lambda function that performs a resource-intensive operation that occasionally takes up to 30 seconds. API Gateway has a default integration timeout of 29 seconds. The developer cannot reduce the execution time. What should the developer do to resolve the timeout issue?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
Refactor the Lambda function to use asynchronous invocation, return a 202 immediately, and have the client poll for results.
Option B is correct because it decouples the client from the long-running Lambda execution. By invoking the Lambda asynchronously, the API Gateway can return a 202 Accepted response immediately, well within the 29-second integration timeout. The client then polls a separate endpoint (e.g., using a presigned S3 URL or a DynamoDB status record) to retrieve the final result, completely sidestepping the timeout limitation.
Key principle: API Gateway integration timeout has a hard limit of 29 seconds.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the API Gateway integration timeout to 30 seconds.
Why it's wrong here
The maximum integration timeout for API Gateway is 29 seconds; it cannot be increased.
- ✓
Refactor the Lambda function to use asynchronous invocation, return a 202 immediately, and have the client poll for results.
Why this is correct
Correct. Asynchronous processing avoids the timeout by decoupling the request from the long-running work.
Related concept
API Gateway integration timeout has a hard limit of 29 seconds.
- ✗
Enable API Gateway caching to avoid repeated calls.
Why it's wrong here
Caching helps with repeated identical requests but does not solve the timeout for unique requests.
- ✗
Use multiple Lambda functions to parallelize processing.
Why it's wrong here
Parallelization might reduce total time but each individual invocation could still exceed 29 seconds.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates assume the integration timeout is configurable to any value, but AWS enforces a hard 29-second limit for REST APIs, making Option A technically impossible.
Detailed technical explanation
How to think about this question
Under the hood, API Gateway's integration timeout is enforced at the network layer—the service will close the TCP connection after 29 seconds if no response is received from the backend. Asynchronous Lambda invocation returns a 202 immediately and places the event in an internal SQS queue, allowing the function to run for up to 15 minutes (the maximum Lambda timeout). A common real-world pattern is to store the result in DynamoDB or S3 and expose a separate GET endpoint for the client to poll until the status changes to 'COMPLETE'.
KKey Concepts to Remember
- API Gateway integration timeout has a hard limit of 29 seconds.
- Asynchronous processing decouples long-running tasks from immediate API responses.
- A 202 Accepted status indicates a request has been received for processing.
- Clients can poll a separate endpoint to retrieve results of asynchronous operations.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
API Gateway integration timeout has a hard limit of 29 seconds.
Real-world example
How this comes up in practice
A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.
What to study next
Got this wrong? Here's your next step.
Review aPI Gateway integration timeout has a hard limit of 29 seconds., then practise related DVA-C02 questions on the same topic to reinforce the concept.
- →
Troubleshooting and Optimization — study guide chapter
Learn the concepts, then practise the questions
- →
Troubleshooting and Optimization practice questions
Targeted practice on this topic area only
- →
All DVA-C02 questions
1,616 questions across all exam domains
- →
AWS Certified Developer Associate DVA-C02 study guide
Full concept coverage aligned to exam objectives
- →
DVA-C02 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related DVA-C02 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Development with AWS Services practice questions
Practise DVA-C02 questions linked to Development with AWS Services.
Security practice questions
Practise DVA-C02 questions linked to Security.
Deployment practice questions
Practise DVA-C02 questions linked to Deployment.
Troubleshooting and Optimization practice questions
Practise DVA-C02 questions linked to Troubleshooting and Optimization.
DVA-C02 fundamentals practice questions
Practise DVA-C02 questions linked to DVA-C02 fundamentals.
DVA-C02 scenario practice questions
Practise DVA-C02 questions linked to DVA-C02 scenario.
DVA-C02 troubleshooting practice questions
Practise DVA-C02 questions linked to DVA-C02 troubleshooting.
Practice this exam
Start a free DVA-C02 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this DVA-C02 question test?
Troubleshooting and Optimization — This question tests Troubleshooting and Optimization — API Gateway integration timeout has a hard limit of 29 seconds..
What is the correct answer to this question?
The correct answer is: Refactor the Lambda function to use asynchronous invocation, return a 202 immediately, and have the client poll for results. — Option B is correct because it decouples the client from the long-running Lambda execution. By invoking the Lambda asynchronously, the API Gateway can return a 202 Accepted response immediately, well within the 29-second integration timeout. The client then polls a separate endpoint (e.g., using a presigned S3 URL or a DynamoDB status record) to retrieve the final result, completely sidestepping the timeout limitation.
What should I do if I get this DVA-C02 question wrong?
Review aPI Gateway integration timeout has a hard limit of 29 seconds., then practise related DVA-C02 questions on the same topic to reinforce the concept.
What is the key concept behind this question?
API Gateway integration timeout has a hard limit of 29 seconds.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 11, 2026
This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.