- Newest
- Most votes
- Most comments
- Retry Mechanism: Utilize SQS and Lambda for reprocessing failed Kinesis records with exponential backoff and DLQ for handling persistent failures.
- Payload Handling: Decode and reprocess the original payload within the Lambda function.
- Monitoring: Set up comprehensive monitoring and alerting to handle failures and retries effectively.
- Scalability: Consider AWS Step Functions for complex retry logic or the circuit breaker pattern for resilient systems.
Hi. AFAIK you can't access the original SQL transformation in the error action, but you can use SQL functions and substitution templates in the error action. For example, in the key field when you use the S3 action: https://docs.aws.amazon.com/iot/latest/developerguide/rule-error-handling.html#rule-error-example. This could help you format the data in the bucket in such a way that a single Lambda could more easily process all errors from all topics.
I can't afford reprocessing them from my local machine
You could have a Lambda do it.
For the data landing in Kinesis Data Streams, are you processing it in real-time? Or are you just taking it from KDS and landing it into a data lake? If the latter, then I wonder if it might be a better option to swap to Amazon Data Firehose? This might have the happy side effect of allowing you to sidestep the problem.
https://aws.amazon.com/blogs/iot/unlocking-scalable-iot-analytics-on-aws/
Some other relevant links:
https://docs.aws.amazon.com/wellarchitected/latest/iot-lens/failure-management.html
https://iotatlas.net/en/best_practices/aws/data_ingest/#use-error-actions-for-your-iot-rules
Relevant content
- asked 4 years ago
- Accepted Answerasked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
That's exactly what I started with, but this is not maintainable. In many places we have a simply query just adding some clientid() or topic() information, but there are others that have dedicated SQL queries. You suggest I do dedicated lambdas for each case? This seems like so much unnecessary work. If I had access to the processed SQL result that would be so much easier!