SAP-C02 · Question #641
SAP-C02 Question #641: Real Exam Question with Answer & Explanation
The correct answer is B: Use Amazon EventBridge to process the S3 event that occurs when a user uploads an image.. For cost-effective, scalable, and reliable image processing with variable demand and rerun capability, use Amazon EventBridge to trigger an AWS Lambda function for image resizing and storage, leveraging the serverless model.
Question
A company that provides image storage services wants to deploy a customer-facing solution to AWS. Millions of individual customers will use the solution. The solution will receive batches of large image files, resize the files, and store the files in an Amazon S3 bucket for up to 6 months. The solution must handle significant variance in demand. The solution must also be reliable at enterprise scale and have the ability to rerun processing jobs in the event of failure. Which solution will meet these requirements MOST cost-effectively?
Options
- AUse AWS Step Functions to process the S3 event that occurs when a user stores an image. Run
- BUse Amazon EventBridge to process the S3 event that occurs when a user uploads an image.
- CUse S3 Event Notifications to invoke an AWS Lambda function when a user stores an image. Use
- DUse Amazon Simple Queue Service (Amazon SQS) to process the S3 event that occurs when a
Explanation
For cost-effective, scalable, and reliable image processing with variable demand and rerun capability, use Amazon EventBridge to trigger an AWS Lambda function for image resizing and storage, leveraging the serverless model.
Common mistakes.
- A. While AWS Step Functions and AWS Batch provide robust orchestration and batch processing capabilities, Lambda for simple image resizing is often more cost-effective for variable, event-driven workloads, as Batch involves managing compute environments and Step Functions adds overhead for simpler tasks.
- C. Amazon Kinesis Data Firehose is designed for streaming data delivery, not for processing or resizing data, making it an inappropriate tool for the core image resizing requirement.
- D. Using Amazon SQS with EC2 instances in an Auto Scaling group requires more operational overhead and management of EC2 instances compared to a fully serverless approach with Lambda, making it generally less cost-effective and more development effort for varying demand.
Concept tested. Serverless image processing, event-driven architecture, S3 event notifications
Reference. https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-rules.html, https://docs.aws.amazon.com/lambda/latest/dg/welcome.html, https://docs.aws.amazon.com/AmazonS3/latest/userguide/EventNotifications.html
Community Discussion
No community discussion yet for this question.