A 311 photo-upload API currently waits for virus scan and thumbnail generation before returning HTTP 200, causing citizen timeouts on large images. What should developers change?
Select an answer to reveal the explanation.
Short Explanation
Do not make the citizen stand at the counter while someone scans and shrinks the photo in the back room. Take the upload, say thanks, and finish the heavy work on a queue or S3 event. Fast sync path, async for the long jobs.
Full Explanation
Synchronous request paths should return promptly; long-running work belongs on an asynchronous path such as SQS, SNS, EventBridge, or S3 event notifications to Lambda. Stretching client timeouts hides the design flaw and still burns connections. API Gateway validators check request shape; they do not replace virus scanners or image pipelines. Arbitrary size rejection is a product constraint, not a substitute for async offload.