AWS Certified Solutions Architect - Associate / Question #1930 of 1019

Question #1930

A company operates a video-sharing platform where users upload videos to an Amazon S3 bucket. Approximately 200 videos are uploaded daily. The company wants to design a solution that generates a preview image for each new video and stores the preview 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 30 minutes on a general-purpose Amazon EC2 instance that runs continuously. Configure the script to generate previews for videos without them and upload the previews to the second S3 bucket.

B

Configure an Amazon EventBridge scheduled rule to trigger a script hourly on a persistent Amazon EKS cluster. Configure the script to create previews for videos lacking them and upload the previews to the second S3 bucket.

C

Configure an S3 event notification to invoke an AWS Lambda function each time a new video is uploaded. Configure the Lambda function to generate a preview image and upload it to the second S3 bucket.

D

Configure Amazon CloudWatch Events to invoke an AWS Lambda function every 15 minutes. Configure the Lambda function to scan the S3 bucket for new videos, generate previews, and upload them to the second S3 bucket.

Explanation

Option C is correct because it uses S3 event notifications to trigger an AWS Lambda function immediately when a new video is uploaded. This approach is event-driven, meaning resources are only consumed when needed, eliminating costs for idle compute time. Lambda's pay-per-use model ensures cost-effectiveness, and it scales automatically with the number of uploads.

Other options are less cost-effective:
- A & B rely on persistent EC2/EKS resources, which incur costs even when idle.
- D uses periodic polling (every 15 minutes), which may delay processing and incur costs for empty scans.

Key points:
1. Event-driven architecture (S3 event notifications) minimizes latency and costs.
2. Serverless (Lambda) avoids provisioning/managing servers and scales seamlessly.
3. Avoid persistent infrastructure (EC2/EKS) and polling mechanisms for cost optimization.

Answer

The correct answer is: C