Which combination of actions will meet these requirements?
(Choose two.)
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.
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.
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.
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.
Configure an Amazon EventBridge (Amazon CloudWatch Events) event to monitor the S3 bucket. When an image is uploaded, send an alert to an Amazon ample Notification Service (Amazon SNS) topic with the application owner’s email address for further processing.
Explanations:
Configuring an Amazon SQS queue to receive notifications when an image is uploaded to S3 provides a durable, reliable way to trigger subsequent actions like invoking the Lambda function for processing.
Configuring the Lambda function to use the SQS queue as its invocation source allows the Lambda to automatically process new images, and deleting messages after successful processing ensures that each image is processed only once.
Using a text file in Lambda memory to track processed images is not durable or reliable, as Lambda instances are stateless and may lose in-memory data between invocations.
Using an EC2 instance for queue monitoring and invoking Lambda adds unnecessary complexity and does not align with a stateless, serverless approach.
EventBridge and SNS could notify a user of uploads, but they do not support direct processing or automatic handling of the images, which is required here.