Courseiva
Design for New SolutionsmediumMultiple ChoiceObjective-mapped

Serverless Image Processing: Trigger Lambda from S3 Uploads

A company is designing a new serverless application using AWS Lambda to process high-resolution images uploaded to Amazon S3. Each image can be up to 500 MB. The processing must complete within 5 minutes. What is the MOST cost-effective and scalable design to meet these requirements?

Quick Answer

The correct answer is to configure S3 event notifications to invoke a Lambda function that processes the image in memory and writes the result to another S3 bucket. This design works because Lambda can handle images up to 500 MB within its 15-minute timeout, and processing in memory avoids the latency and cost of intermediate storage or orchestration services. On the AWS Certified Solutions Architect Professional SAP-C02 exam, this scenario tests your understanding of serverless image processing with Lambda and S3 as a direct, event-driven integration, often appearing as a trap where candidates overcomplicate the solution with Step Functions or SQS. The key trap is assuming that large files require Fargate or additional queuing, but Lambda’s 10 GB memory limit and 15-minute max execution make it fully capable for this workload. Memory tip: “Lambda loves large files—just keep it direct and in memory.”

⚠ Common exam trap

It's easy for candidates to assume Lambda cannot handle large files or long-running tasks, leading them to choose more complex and costly options like SQS, Fargate, or EC2, when in fact Lambda's 15-minute timeout and S3 GetObject support easily accommodate 500 MB images processed within 5 minutes.

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

Configure S3 event notifications to invoke a Lambda function that processes the image in memory and writes the result to another S3 bucket.

Lambda can directly process images up to 500 MB within its 15-minute timeout (5 minutes is well within limits), and processing in memory avoids the latency and cost of intermediate storage or compute. S3 event notifications invoke Lambda synchronously, making this the most cost-effective and scalable design for serverless image processing.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use S3 event notifications to send the image to an Amazon SQS queue, then process it with a Lambda function.

    Why it's wrong here

    Adding SQS introduces unnecessary latency and cost without benefit, as Lambda can be triggered directly.

  • Use AWS Fargate to run a containerized image processing service triggered by S3 event notifications.

    Why it's wrong here

    Fargate is more expensive and complex for simple, short-lived processing tasks.

  • Configure S3 event notifications to invoke a Lambda function that processes the image in memory and writes the result to another S3 bucket.

    Why this is correct

    Lambda can handle up to 10 GB of memory and 15-minute timeout, suitable for 500 MB images. Direct S3 trigger is simple and cost-effective.

  • Use AWS Step Functions to orchestrate a Lambda function and an EC2 instance for processing.

    Why it's wrong here

    Step Functions adds complexity and cost; a single Lambda function is sufficient.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

This SAP-C02 question is part of Courseiva's 1,660-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

3 more ways this is tested on SAP-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is designing a new application that will process images uploaded by users. The application must automatically resize images and store them in Amazon S3. The solution should be serverless and event-driven. Which THREE AWS services should be used together? (Choose three.)

easy
  • A.Amazon S3
  • B.AWS Lambda
  • C.Amazon EC2
  • D.Amazon Simple Queue Service (SQS)
  • E.Amazon S3 Event Notification

Why A: Options A, B, and E are correct. Amazon S3 can trigger a Lambda function on object uploads. Lambda can process the image and store the result back in S3. Option C is wrong because EC2 is not serverless. Option D is wrong because SQS is not needed for this event-driven flow.

Variation 2. A company is designing a serverless application that processes images uploaded to an S3 bucket. The processing must be asynchronous and can take up to 15 minutes per image. Which AWS service should be used to trigger the processing?

easy
  • A.Configure S3 Event Notifications to send an event to an Amazon SQS queue, which is polled by an AWS Lambda function
  • B.Configure S3 Event Notifications to publish a message to an Amazon SNS topic, which triggers an AWS Lambda function
  • C.Configure S3 Event Notifications to invoke an AWS Lambda function synchronously
  • D.Use Amazon EventBridge to capture S3 events and trigger an AWS Step Functions workflow

Why A: S3 Event Notifications can asynchronously deliver events to an SQS queue, and an AWS Lambda function can poll that queue. This decouples the processing from the S3 upload, allowing the Lambda function to handle the 15-minute processing limit asynchronously without timing out, since Lambda's maximum execution time is 15 minutes.

Variation 3. A company is designing a serverless application using AWS Lambda to process incoming files from Amazon S3. Each file is less than 1 MB and processing must complete within 10 seconds. The application must handle bursts of up to 1,000 concurrent invocations. Which configuration will provide the MOST cost-effective solution?

medium
  • A.Use provisioned concurrency for 1,000 concurrent executions with 128 MB memory.
  • B.Place the Lambda function in a VPC with 1,024 MB memory for faster processing.
  • C.Set reserved concurrency to 1,000 and function memory to 256 MB.
  • D.Set function memory to 128 MB and leave concurrency at the account default of 1,000.

Why D: The default account-level concurrency limit is 1,000 concurrent executions, which meets the burst requirement without additional cost. With files under 1 MB and a 10-second timeout, 128 MB memory is sufficient for lightweight processing, and provisioned or reserved concurrency would incur unnecessary charges since the workload is sporadic and does not require pre-warmed instances.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SAP-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 SAP-C02 exam.