1.1.2 • Published 3 years ago

islambdawarm v1.1.2

Weekly downloads
112
License
MIT
Repository
github
Last release
3 years ago

isLambdaWarm

A simple module that'll tell you if your lambda is warm, by checking for the existence of /tmp/isLambdaWarm, which is the most reliable way to check this kind of thing (as the /tmp/ folder is shared across invocations).

If it's not, it writes the Date.now() when this module was invoked to /tmp/isLambdaWarm. That should give you an approximate time when the Lambda container was first booted.

Usage

const lambdaWarm = require('./index');

lambdaWarm(function (err, warm, date){
    console.log(err); // any errors
    console.log(warm); // boolean
    console.log(date); // Date object with when this module was first ran in a lambda
});
1.1.1

3 years ago

1.1.2

3 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago