at
⚡⏰ Serverless Instantly schedule one-time jobs to run on AWS Lambda using
Serverless Components. Inspired by the UNIX at
command.
1. Install
$ npm install -g dschep/serverless-at
2. Create a script
Create a file (Python & NodeJS currently supported) containing
a lambda handler called task
.
Eg: foo.py
containing:
def task(event, context):
print('huzzah')
return
or: foo.js
containing:
module.exports.task = async () => {
console.log('huzzah')
return
}
3. Deploy
$ sls-at foo.py 2019-08-16T12:00:00
The 1st argument is your script containing a task
lambda handler function,
the 2nd is an EcmaScript date.