What should the developer do to meet these requirements with the LEAST development effort?
Add logging statements for all events in the Lambda function. Filter AWS CloudTrail logs for errors.
Configure the Lambda function to start an AWS Step Functions workflow with retries for failed events.
Add a dead-letter queue to send messages to an Amazon Simple Queue Service (Amazon SQS) standard queue.
Add a dead-letter queue to send messages to an Amazon Simple Notification Service (Amazon SNS) FIFO topic.
Explanations:
Adding logging statements and filtering AWS CloudTrail logs would provide some visibility into errors but would require significant effort to manually filter and analyze logs, making it less efficient for handling failed events.
While starting an AWS Step Functions workflow with retries for failed events could handle failures, it introduces more complexity and development overhead, which contradicts the requirement for the least development effort.
Configuring a dead-letter queue (DLQ) with Amazon SQS allows failed events to be automatically sent to a specified SQS queue. This setup requires minimal development effort and provides a straightforward way to collect and analyze failed events for troubleshooting.
Using a dead-letter queue to send messages to an Amazon SNS FIFO topic does not align with typical use cases for failed event handling, as SNS is more suited for broadcasting messages rather than queuing them for later processing. This option would also require more configuration and complexity.