When citizens upload photos to a code-enforcement bucket, the city wants automatic thumbnail creation. Which service best fits that event-driven pattern?
Select an answer to reveal the explanation.
Short Explanation
Upload happens, thumbnail pops out—that is classic event-driven Lambda. An always-on idle EC2 box works but wastes money; Direct Connect and Route 53 move networks and DNS, not pixels.
Full Explanation
When citizens upload photos to a code-enforcement bucket and the city wants automatic thumbnail creation, AWS Lambda is the service that best fits that event-driven pattern. Lambda runs short-lived functions in response to events such as an S3 ObjectCreated notification, so each upload can trigger image processing without an always-on server waiting for work. Municipal automation for thumbnails, metadata extraction, or virus-scan orchestration commonly starts with this pattern.
An always-idle EC2 instance waiting for uploads wastes money and still needs patching. AWS Direct Connect provides private network connectivity; it does not generate image thumbnails. Amazon Route 53 is DNS; it cannot resize images inside DNS records.
Exam caveat: Event-driven, intermittent compute → Lambda. Persistent long-running servers → EC2. Containers with orchestration needs → ECS/EKS/Fargate. Match “on upload / automatic reaction” to Lambda at foundational depth.
Operational check: enable S3 event notifications to Lambda (or via EventBridge), grant least-privilege permissions to read the object and write thumbnails to a derived bucket/prefix, handle failures with DLQs, set concurrency limits, and test with oversized images so code-enforcement staff see predictable outcomes before citywide rollout.