Q37 — AWS SAA-C03 Ch.10
Question 37 of 100 | ← Chapter 10
Q637. A company runs an application that stores and shares photos. Users upload the photos to an Amazon S3 bucket. Every day, users upload approximately 150 photos. The company wants to design a solution that creates a thumbnail of each new photo and stores the thumbnail in a second S3 bucket. Which solution will meet these requirements MOST cost-effectively?
- A. Configure an Amazon EventBridge scheduled rule to invoke a script every minute on along-running Amazon EMR cluster. Configure the script to generate thumbnails for the photos that do not have thumbnails. Configure the script to upload the thumbnails to the second S3 bucket.
- B. Configure an Amazon EventBridge scheduled rule to invoke a script every minute on a memory- optimized Amazon EC2 instance that is always on. Configure the script to generate thumbnails for the photos that do not have thumbnails. Configure the script to upload the thumbnails to the second S3 bucket
- C. Configure an S3 event notification to invoke an AWS Lambda function each time a user uploads a new photo to the application. Configure the Lambda function to generate a thumbnail and to upload the thumbnail to the second S3 bucket ✓
- D. Configure S3 Storage Lens to invoke an AWS Lambda function each time a user uploads a new photo to the application. Configure the Lambda function to generate a thumbnail and to upload the thumbnail to a second S3 bucket
Correct Answer: C. Configure an S3 event notification to invoke an AWS Lambda function each time a user uploads a new photo to the application. Configure the Lambda function to generate a thumbnail and to upload the thumbnail to the second S3 bucket
Explanation
To meet the requirements of generating thumbnails for uploaded photos and storing them in a second S3 bucket in a cost-effective manner, the most suitable solution is:C. Configure an S3 event notification to invoke an AWS Lambda function each time a user uploads a new photo to the application. Configure the Lambda function to generate a thumbnail and upload it to the second S3 bucket.This solution leverages the event-driven architecture of AWS services to automatically trigger thumbnail generation whenever a new photo is uploaded. By configuring an S3 event notification, you can make use of the S3 bucket's event system to invoke an AWS Lambda function. The Lambda function can then generate the thumbnail for the uploaded photo and store it in the second S3 bucket.Option A is not the best choice for this scenario:A. Configuring an Amazon EventBridge scheduled rule to invoke a script on a long-running Amazon EMR cluster every minute would not be the most cost-effective solution. EMR clusters are typically used for big data processing and analytics, and maintaining a long-running cluster just for generating thumbnails would incur unnecessary costs.Option B is also not the best choice:B. Configuring an Amazon EventBridge scheduled rule to invoke a script on a memory-optimized Amazon EC2 instance that is always on would result in high operational costs. Keeping an EC2 instance running continuously would incur expenses even when there is no photo upload activity.Option D is not the best choice either:D. Configuring S3 Storage Lens to invoke an AWS Lambda function each time a user uploads a new photo is not a suitable solution for generating thumbnails. S3 Storage Lens provides insights into S3 storage usage but does not have a direct mechanism for triggering Lambda functions or executing custom logic. Therefore, option C is the most cost-effective choice for generating thumbnails and storing them in a second S3 bucket.