In case of error or exception, Java AWS Lambda tries to re-invoke the function up to three times. Is there a way to keep track of the current invocation count, i.e. to know whether it is the first, second or third invocation? Thanks
From my understanding there are no built in Metrics in CloudWatch that tracks this. One idea would be to log a timestamp with the parameters of the Lambda and then create a custom metric that checks for the same parameters being executed within a certain time interval.
That would not guarantee 100% accuracy, but it might provide a semi-accurate count of retries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With