AWS re:Invent 2015 | (CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda
Why Stack Overflow recommends it
Stack Overflow users link it when answering how to run Lambda functions on a regular schedule, especially at roughly one-minute frequency, from before native scheduled events existed.
Recommended by 2 people across 2 different months, 2016 to 2020.
What it is
An AWS re:Invent 2015 session (CMP407) showing how to schedule AWS Lambda invocations without an external trigger. It builds a self-triggering setup from a CloudWatch metric, CloudWatch alarms, SNS and Lambda, giving minute-level, crontab-like scheduling. Presented by Amazon Web Services.
What people said
Recommends E.J. Brennan · 2016-02 · Stack Overflow · on “Invoke AWS Lambda(s) regularly every 1 minute”
There was a session at AWS Reinvent in 2015 that covered this exact topic, you can watch it here on youtube: [this video] shows how to use lambda and cloudwatch to get that 1 minute frequency with no external dependencies. Do you need to run an AWS Lambda function on a schedule, without an event to trigger the invocation? This session shows how to use an Amazon CloudWatch metric and CloudWatch alarms, Amazon SNS, and Lambda so that Lambda triggers itself every minute—no external services required! From here, other Lambda jobs can be scheduled in crontab-like format, giving minute-level resolution to your Lambda scheduled tasks. During the session, we build this functionality up from scratch with
Recommends Matt · 2020-05 · Stack Overflow · on “How to Automate Capturing Against Billing Agreements for Amazon Pay?”
The Amazon Pay recurring product does not have an automatic billing feature. If you want to automate this, you can set up a cron job that runs at your desired cadence and makes the AuthorizeOnBillingAgreement API call. If you want Amazon Pay to automatically capture upon a successful auth, make sure to pass true to the CaptureNow parameter. As this sounds like a rebilling workflow, you can also pass 1440 to the TransactionTimeout parameter to provide more time for the authorization to complete, which should translate to a higher auth success rate. Another option in case you're interested in a serverless option, you could use AWS services to trigger this on a cron-like basis - more details av
Cites AMA · 2016-03 · Stack Overflow · on “Scheduled AWS Lambda Task at less than 1 minute frequency”
We are trying to develop a true lambda-based application in which certain tasks need to be performed at schedules of variable frequencies. They are actually polling for data, and at certain times of the day, this polling can be as slow as once every hour, while at other times, it has to be once every second. I have looked at the options for scheduling (e.g. Using AWS Lambda with Scheduled Events [LINK] and AWS re:Invent 2015 | (CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda [this video] ), but it seems that short of spinning up an EC2 instance or a long-running lambda, there's no built-in way of firing up lambdas at a frequency of less than one minute. The lambda rate expression doe