- Newest
- Most votes
- Most comments
The behavior you're experiencing with your EventBridge Pipe is indeed unexpected based on the documentation. However, there are a few things to consider and potential solutions to address your issue:
-
Verify Configuration: Ensure that you have correctly configured the
maximumRetryAttemptsandmaximumRecordAgeInSecondssettings on your pipe. Double-check these values in the AWS Console or CLI to make sure they are set as intended. -
Error Handling in Lambda: Instead of relying solely on the pipe's retry mechanism, implement proper error handling within your Lambda function. Catch exceptions and return an appropriate error response. This way, you can control how the pipe handles the error.
-
Partial Batch Response: For DynamoDB stream sources, you can implement partial batch processing. Configure your enrichment Lambda to return an object indicating which messages succeeded and which failed. This allows EventBridge to avoid reprocessing successfully processed messages in a failed batch.
-
Dead Letter Queue (DLQ): Since you mentioned you have configured a DLQ, ensure it's properly set up. For DynamoDB stream sources, you can configure a DLQ for the pipe to route events that fail processing after the specified number of attempts.
-
Synchronous Invocation: Make sure your Lambda function is invoked synchronously by the pipe. EventBridge Pipes needs to be aware of runtime errors to retry them properly.
-
CloudWatch Logs: Monitor your pipe's CloudWatch Logs for any error messages or unexpected behavior. This might provide insights into why the retry mechanism isn't working as expected.
-
AWS Support: If after verifying all the above, you still don't see the expected behavior, it might be worth contacting AWS Support. There could be a discrepancy between the documented behavior and the actual implementation.
Remember, EventBridge Pipes automatically retries on AWS failures, but for customer implementation failures (like unhandled exceptions in your Lambda), the pipe's polling throughput will gradually back off. In extreme cases of continuous errors, the pipe might even be automatically disabled.
By implementing these suggestions, particularly focusing on error handling within your Lambda function and utilizing partial batch responses, you should be able to better control the retry behavior and limit unnecessary Lambda invocations while still capturing enrichment errors effectively.
Sources
Amazon EventBridge Pipes error handling and troubleshooting - Amazon EventBridge
Amazon DynamoDB stream as a source for EventBridge Pipes - Amazon EventBridge
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 3 years ago
