SAP-C02 · Question #49
A company is building an image service on the web that will allow users to upload and search random photos. At peak usage, up to 10,000 users worldwide will upload their images. The service will…
The correct answer is C. Store the uploaded images in an Amazon S3 bucket and configure an S3 bucket event. For a global image service with high-volume uploads requiring text overlays and web publication, the most scalable and operationally efficient design is to store uploaded images in Amazon S3, use S3 event notifications to trigger an AWS Lambda function for text overlay…
Question
A company is building an image service on the web that will allow users to upload and search random photos. At peak usage, up to 10,000 users worldwide will upload their images. The service will then overlay text on the uploaded images, which will then be published on the company website. Which design should a solutions architect implement?
Options
- AStore the uploaded images in Amazon Elastic File System (Amazon EFS).
- BStore the uploaded images in an Amazon S3 bucket and configure an S3 bucket event
- CStore the uploaded images in an Amazon S3 bucket and configure an S3 bucket event
- DStore the uploaded images on a shared Amazon Elastic Block Store (Amazon EBS) volume
How the community answered
(33 responses)- A6% (2)
- B27% (9)
- C55% (18)
- D12% (4)
Why each option
For a global image service with high-volume uploads requiring text overlays and web publication, the most scalable and operationally efficient design is to store uploaded images in Amazon S3, use S3 event notifications to trigger an AWS Lambda function for text overlay processing, and then store the processed images back into S3 for website delivery.
Amazon EFS is a regional network file system designed for shared access by EC2 instances, which is not an optimal or scalable solution for direct user uploads from a web application or for global access, nor is it serverless.
While using SQS and a fleet of EC2 instances is a viable pattern, it involves managing EC2 instances (scaling, patching, maintenance), which leads to higher operational overhead and potentially higher costs compared to the fully serverless Lambda-based image processing in option C, especially for sporadic workloads.
Storing uploaded images in Amazon S3 provides highly scalable, durable, and globally accessible storage. Configuring an S3 bucket event to invoke an AWS Lambda function creates a serverless, event-driven architecture where Lambda automatically scales to process image text overlays, and the processed images can be stored back in S3, minimizing operational overhead and perfectly handling varying workloads.
Amazon EBS volumes are block storage attached to a single EC2 instance within an Availability Zone and are not designed for direct user uploads from a global web service or for highly scalable, shared image storage across multiple regions.
Concept tested: Serverless image processing workflow (S3, Lambda)
Source: https://docs.aws.amazon.com/lambda/latest/dg/with-s3-example.html
Community Discussion
No community discussion yet for this question.