
Answer-first summary for fast verification
Answer: Configure the application to upload images directly from each user's browser to Amazon S3 through the use of a presigned URL, Configure S3 Event Notifications to invoke an AWS Lambda function when an image is uploaded. Use the function to resize the image.
## Explanation **Correct Answers: C and D** **C. Configure the application to upload images directly from each user's browser to Amazon S3 through the use of a presigned URL** - This improves website performance by offloading the upload process from the EC2 instances directly to S3 - Users upload images directly to S3, bypassing the EC2 web servers entirely - Reduces load on EC2 instances and network bandwidth consumption - Presigned URLs provide secure, temporary access to upload objects to S3 **D. Configure S3 Event Notifications to invoke an AWS Lambda function when an image is uploaded. Use the function to resize the image.** - Decouples the image resizing process from the upload process - Uses serverless architecture (Lambda) for resizing, which scales automatically - S3 Event Notifications trigger Lambda immediately when new objects are uploaded - Improves operational efficiency by using event-driven architecture **Why other options are incorrect:** **A. Configure the application to upload images to S3 Glacier.** - Glacier is for archival storage, not for active image serving - Glacier has retrieval delays (minutes to hours), unsuitable for user uploads - Doesn't address performance or decoupling requirements **B. Configure the web server to upload the original images to Amazon S3.** - Still uses EC2 instances for uploads, doesn't improve performance - Doesn't decouple the upload process from the web servers - Maintains the same coupling issue as the current architecture **E. Create an Amazon EventBridge (Amazon CloudWatch Events) rule that invokes an AWS Lambda function on a schedule to resize uploaded images.** - Uses scheduled processing instead of event-driven processing - Creates delays between upload and resizing - Less operationally efficient than immediate S3 Event Notifications - Doesn't provide real-time processing **Architecture Benefits:** 1. **Performance Improvement**: Direct browser-to-S3 uploads eliminate EC2 bottleneck 2. **Decoupling**: Lambda function for resizing separates concerns from the main application 3. **Scalability**: Both S3 and Lambda scale automatically with demand 4. **Cost Efficiency**: Pay only for Lambda execution time, no EC2 overhead for processing 5. **Operational Efficiency**: Event-driven architecture reduces manual intervention and monitoring needs
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A social media company allows users to upload images to its website. The website runs on Amazon EC2 instances. During upload requests, the website resizes the images to a standard size and stores the resized images in Amazon S3. Users are experiencing slow upload requests to the website.
The company needs to reduce coupling within the application and improve website performance. A solutions architect must design the most operationally efficient process for image uploads.
Which combination of actions should the solutions architect take to meet these requirements? (Choose two.)
A
Configure the application to upload images to S3 Glacier.
B
Configure the web server to upload the original images to Amazon S3.
C
Configure the application to upload images directly from each user's browser to Amazon S3 through the use of a presigned URL
D
Configure S3 Event Notifications to invoke an AWS Lambda function when an image is uploaded. Use the function to resize the image.
E
Create an Amazon EventBridge (Amazon CloudWatch Events) rule that invokes an AWS Lambda function on a schedule to resize uploaded images.