Provider icon

How to schedule a periodic job on AWS Lambda?

AWS Lambda is an event-driven, serverless computing platform provided by Amazon as a part of Amazon Web Services. It is a computing service that runs code in response to events and automatically manages the computing resources required by that code.

When using that application, you may face the need to run periodic jobs within this platform. To achieve that, there are multiple solutions.

Schedule in AWS Lambda

AWS Lamdba, used individually, does not allow you to schedule the execution of functions in a recurring manner. However, you can easily rely on other tools provided by Amazon, such as Amazon EventBridge, which will allow you to define recurring events that result in the invocation of one of your lambda functions. To use it, you just have to create a new periodic event and choose the Lambda function you want to invoke as destination.

Schedule with Cronit

However, there is also an alternative to this system. Indeed, the EventBridge system is quickly limited in terms of granularity for calling your functions. If this limitation is a problem for you, you can also consider using an external tool, such as Cronit. Cronit allows you to call any HTTP endpoint available on the web, including your lambdas functions, if they allow it. All you need to do is to define a periodic task within the Cronit tool, and indicate as destination the web address of your lambda function, as well as the parameters you want to use for its invocation. Translated with (free version)