
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
An application development team is designing a microservice that will convert large images to smaller, compressed images. When a user uploads an image through the web interface, the microservice should store the image in an Amazon S3 bucket, process and compress the image with an AWS Lambda function, and store the image in its compressed form in a different S3 bucket.
A solutions architect needs to design a solution that uses durable, stateless components to process the images automatically.
Which combination of actions will meet these requirements? (Choose two.)
A
Create an Amazon Simple Queue Service (Amazon SQS) queue. Configure the S3 bucket to send a notification to the SQS queue when an image is uploaded to the S3 bucket.
B
Configure the Lambda function to use the Amazon Simple Queue Service (Amazon SQS) queue as the invocation source. When the SQS message is successfully processed, delete the message in the queue.
C
Configure the Lambda function to monitor the S3 bucket for new uploads. When an uploaded image is detected, write the file name to a text file in memory and use the text file to keep track of the images that were processed.
D
Launch an Amazon EC2 instance to monitor an Amazon Simple Queue Service (Amazon SQS) queue. When items are added to the queue, log the file name in a text file on the EC2 instance and invoke the Lambda function.
E
Configure an Amazon EventBridge (Amazon CloudWatch Events) event to monitor the S3 bucket. When an image is uploaded, send an alert to an Amazon Simple Notification Service (Amazon SNS) topic with the application owner's email address for further processing.
Explanation:
Correct Answers: A and B
Option A: Creating an SQS queue and configuring S3 bucket notifications to send events to the queue provides a durable, decoupled messaging system. When an image is uploaded to S3, S3 can send an event notification to the SQS queue, which will store the message until it's processed. This ensures no upload events are lost even if the processing system is temporarily unavailable.
Option B: Configuring the Lambda function to use SQS as an invocation source creates an event-driven, stateless architecture. Lambda can be triggered by SQS messages, and when a message is successfully processed, Lambda automatically deletes it from the queue (or you can configure it to do so). This ensures exactly-once processing semantics and automatic scaling based on queue depth.
Option C: This approach is problematic because:
Option D: This introduces unnecessary complexity and stateful components:
Option E: This doesn't automate the processing:
This architecture ensures reliable, scalable, and maintainable image processing without manual intervention.