
Answer-first summary for fast verification
Answer: Set up an Amazon SQS queue and enable S3 bucket notifications to trigger the queue upon image uploads., Design the Lambda function to be invoked by the SQS queue and to remove messages after processing.
The correct answers are A and B. Option A suggests setting up an Amazon SQS queue and configuring the S3 bucket to send notifications to the queue when an image is uploaded. This method ensures that the image upload events are captured reliably. Option B recommends configuring the Lambda function to use the SQS queue as the invocation source and to delete the message after processing successfully. This ensures that the image processing is handled in a stateless manner by Lambda, and the queue helps to buffer and reliably deliver the image data to Lambda for processing.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A development team is creating a microservice for image compression. The service should automatically store uploaded images in an Amazon S3 bucket, compress them using an AWS Lambda function, and then store the compressed images in a separate S3 bucket. The solution must be durable and stateless. Which two actions should be implemented to meet these requirements?
A
Set up an Amazon SQS queue and enable S3 bucket notifications to trigger the queue upon image uploads.
B
Design the Lambda function to be invoked by the SQS queue and to remove messages after processing.
C
Enable Lambda to watch the S3 bucket for uploads, using in-memory text files to track processed images.
D
Deploy an EC2 instance to watch the SQS queue, log processed file names, and trigger the Lambda function.