Which solution will meet these requirements with the LEAST development effort?
Set the image resize Lambda function as a destination of the avatar generator Lambda function for the events that fail processing.
Create an Amazon Simple Queue Service (Amazon SQS) queue. Set the SQS queue as a destination with an on failure condition for the avatar generator Lambda function. Configure the image resize Lambda function to poll from the SQS queue.
Create an AWS Step Functions state machine that invokes the avatar generator Lambda function and uses the image resize Lambda function as a fallback. Create an Amazon EventBridge rule that matches events from the S3 bucket to invoke the state machine.
Create an Amazon Simple Notification Service (Amazon SNS) topic. Set the SNS topic as a destination with an on failure condition for the avatar generator Lambda function. Subscribe the image resize Lambda function to the SNS topic.
Explanations:
Setting the image resize Lambda function as a destination for failed processing events directly connects the two functions without needing additional components, providing a simple fallback.
Using an SQS queue as a destination for failed events adds unnecessary complexity since an additional polling mechanism is required to trigger the resize Lambda function.
A Step Functions state machine is more complex and requires extra setup, including an EventBridge rule, which adds more development effort than setting a direct failure destination.
An SNS topic adds unnecessary overhead by requiring an additional messaging layer, and using SNS here is redundant when a direct Lambda destination for failure handling is possible.