lambda-warmer icon indicating copy to clipboard operation
lambda-warmer copied to clipboard

lastAccessed field in log may be incorrect

Open msmolens opened this issue 6 years ago • 0 comments

Expected behavior

The lastAccessed field in the log is the timestamp of when the function was last accessed by a non-warming event.

Actual behavior

The lastAccessed field in the log may be the timestamp of when the function was last accessed by a warming event; it's updated when processing warming events: https://github.com/jeremydaly/lambda-warmer/blob/de1ffe85949fdd37b909a4a8c82e3e5e352bf153/index.js#L67

Details

As the documentation states, the lastAccessed field, along with lastAccessedSeconds, can help determine if the concurrency can be lowered. However, if lastAccessed is updated when processing warming events, then it cannot be used for that purpose.

This behavior was introduced in #6.

msmolens avatar Jul 09 '19 18:07 msmolens