2 Minute Tip: Schedule Calling Webhooks with Cron Like Syntax in AWS Lambda
Today we were looking for a quick way to replace scheduled jobs in Jenkins with GitLab CI. Unfortunately GitLab CI does not support scheduled runs.
Being the lambda lovers we are, we figured a quick scheduled lambda function could fix this. However, I took it one step further and built a general usage “scheduled webhook caller”.
Go to your AWS Console, create a new “Blank” lambda function. Configure a scheduled event that looks like the following…
Hit next, fill in the rest of the info as you please, make sure you use
Node.js 4.3 as your runtime. Use a basic execution role or create one if need be. Set memory to 512MB and timeout to 30 seconds. That’s it!
Copy paste in the below code, edit your
webhookURLs and away you go. You can also check out the full source. Happy Webhooking!