Course menuSAA-C03

Exams / SAA-C03 / Choosing compute / Question 1

SAA-C03 practice question: Choosing compute (1 of 3)

Design High-Performing Architectures A free question from our original SAA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

A photo-sharing app stores user uploads in an Amazon S3 bucket. A thumbnail must be available within 10 seconds of each upload, and creating one takes about 2 seconds of processing. Uploads are irregular: there are none for hours overnight, then bursts of up to 600 uploads a minute after popular events. The small team does not want to manage servers or pay for capacity that sits idle. Which solution meets these requirements with the LEAST operational overhead?

Choose one answer.

  1. A. Send S3 event notifications to an Amazon SQS queue, and process the queue with EC2 instances in an Auto Scaling group that scales on the queue backlog.
  2. B. Use Amazon EventBridge Scheduler to invoke an AWS Lambda function every minute that lists the bucket and processes any new objects it finds.
  3. C. Send S3 event notifications to an Amazon SQS queue, and process the queue with an Amazon ECS service that runs two AWS Fargate tasks at all times.
  4. D. Configure S3 event notifications for new objects to invoke an AWS Lambda function that writes each thumbnail to a separate bucket.
Show the answer and explanation

Answer: D

  • A. Wrong: Queue-based scaling with EC2 Auto Scaling is a sound pattern for bursty work and would keep up with the bursts. However, the team would have to patch and manage the instances, and at least one instance usually runs all night to avoid slow scale-out, which breaks both the no-servers and no-idle-capacity constraints. Learn more: Scaling policy based on Amazon SQS (opens in a new tab)
  • B. Wrong: This is serverless and costs little while idle, but polling once a minute means a photo can wait up to a minute before work starts, which misses the 10-second target. Listing a growing bucket on every run also gets slower and costlier over time; an event-driven trigger avoids both problems. Learn more: Managing a schedule in EventBridge Scheduler (opens in a new tab)
  • C. Wrong: Fargate removes server management, but two tasks working one photo at a time handle about 60 photos a minute, so a burst of 600 a minute builds a backlog far beyond 10 seconds. The two tasks also run and are billed all night when there is nothing to do. Learn more: AWS Fargate for Amazon ECS (opens in a new tab)
  • D. Right: Correct. S3 invokes the function for each new object within moments, and Lambda runs as many copies as the burst needs, so 600 uploads a minute (about 20 concurrent 2-second jobs) are handled without any servers. Nothing runs or is billed overnight, and writing to a separate bucket avoids the function triggering itself. Learn more: Process Amazon S3 event notifications with Lambda (opens in a new tab)

Explanation

The work is triggered by an event, is short, and arrives in unpredictable bursts with long idle periods. S3 event notifications invoking Lambda start each job straight away, scale out automatically to the roughly 20 concurrent jobs a 600-per-minute burst needs, and cost nothing when idle. Polling misses the 10-second target, a fixed pair of tasks cannot keep up with bursts, and an EC2 fleet adds servers to manage.

Study

Keep practising

Answer questions with a score at the end, or practise just this topic with the explanation after each one. No sign-up needed.