AWS Certified Developer – Associate — Question 247
A development team is working on a mobile app that allows users to upload pictures to Amazon S3. The team expects the app will be used by hundreds of thousands of users during a single event simultaneously. Once the pictures are uploaded, the backend service will scan and parse the pictures for inappropriate content.
Which approach is the MOST resilient way to achieve this goal, which also smooths out temporary volume spikes for the backend service?
Answer options
- A. Develop an AWS Lambda function to check the upload folder in the S3 bucket. If new uploaded pictures are detected, the Lambda function will scan and parse them.
- B. Once a picture is uploaded to Amazon S3, publish the event to an Amazon SQS queue. Use the queue as an event source to trigger an AWS Lambda function. In the Lambda function, scan and parse the picture.
- C. When the user uploads a picture. invoke an API hosted in Amazon API Gateway. The API will invoke an AWS Lambda function to scan and parse the picture.
- D. Create a state machine in AWS Step Functions to check the upload folder in the S3 bucket. If a new picture is detected, invoke an AWS Lambda function to scan and parse it.
Correct answer: B
Explanation
Option B is the most resilient approach because using Amazon SQS allows for decoupling the upload process from the image scanning, enabling the system to handle spikes in upload volume without overwhelming the backend service. Options A and D rely on direct monitoring of the S3 bucket, which may not effectively manage high volumes. Option C directly ties the API Gateway to the upload process, which can create bottlenecks under heavy load.