The sequenceToken parameter is now ignored in PutLogEvents actions. PutLogEvents actions are now accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException even if the sequence token is not valid.
Traceback...
File "/usr/local/lib/python3.10/logging/__init__.py", line 1624, in _log
self.handle(record)
File "/usr/local/lib/python3.10/logging/__init__.py", line 1634, in handle
self.callHandlers(record)
File "/usr/local/lib/python3.10/logging/__init__.py", line 1696, in callHandlers
hdlr.handle(record)
File "/usr/local/lib/python3.10/logging/__init__.py", line 968, in handle
self.emit(record)
File "/usr/local/lib/python3.10/site-packages/cloudwatch/cloudwatch.py", line 100, in emit
self.send_log(timestamp, log_entry)
File "/usr/local/lib/python3.10/site-packages/cloudwatch/cloudwatch.py", line 88, in send_log
self.next_sequence_token = response['nextSequenceToken']
KeyError: 'nextSequenceToken'
The
SequenceTokenis ignored by the API and actually deprecated:The sequenceToken parameter is now ignored in PutLogEvents actions. PutLogEvents actions are now accepted and never return InvalidSequenceTokenException or DataAlreadyAcceptedException even if the sequence token is not valid.
We get this error here because the response expect it: