A microservice must convert large uploaded images to compressed versions. When a user uploads an image through the web interface, the microservice should store the image in an Amazon S3 bucket, compress it with an AWS Lambda function, and store the compressed image in a different S3 bucket. The solution should use durable, stateless components and process images automatically. Which combination of actions meets these requirements? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: 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., Configure the Lambda function to use the Amazon Simple Queue Service (Amazon SQS) queue as the invocation source. When an SQS message is successfully processed, delete the message from the queue..
Why this is the answer
The first correct option establishes an event-driven architecture. S3 event notifications can directly publish messages to an SQS queue when new objects are created, ensuring that every upload triggers a processing event. SQS provides a durable, decoupled buffer for these events, which aligns with the stateless and durable component requirements. The second correct option describes how the Lambda function consumes these events. Configuring Lambda to use SQS as an event source allows it to automatically poll the queue, process messages (compress the image), and then delete the message from the queue upon successful completion. This ensures reliable processing and prevents duplicate work. The incorrect options introduce unnecessary complexity, single points of failure, or do not meet the automatic processing requirement. Monitoring S3 directly from Lambda is less robust than SQS-triggered processing. Using an EC2 instance to monitor SQS and invoke Lambda adds an extra, stateful component that is not needed. EventBridge/SNS for alerts is not a processing mechanism.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed