With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js. Learn more →
Lambda-surf Alternatives
Similar projects and alternatives to lambda-surf based on common topics and language
-
chrome-aws-lambda
Chromium Binary for AWS Lambda and Google Cloud Functions
-
browser-fingerprinting
Analysis of Bot Protection systems with available countermeasures 🚿. How to defeat anti-bot system 👻 and get around browser fingerprinting scripts 🕵️♂️ when scraping the web?
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
chrome-aws-lambda-layer
58 MB Google Chrome to fit inside AWS Lambda Layer compressed with Brotli
-
website-scraper-puppeteer
Plugin for website-scraper which returns html for dynamic websites using puppeteer
-
serverless-puppeteer-layers
Serverless Framework + AWS Lambda Layers + Puppeteer = ❤️
-
lambda-surf reviews and mentions
-
Using AWS Lambda and Slack to find Xbox Series X stock, so you don't have to
A plugin task provider loads the tasks from a specified location and parses the schedule into a more filterable object representation using the schedule parser:
I set up this demo to test the scheduled running of tasks, it consists of 4 tasks that are scheduled to run every 5 minutes, 10 minutes, once an hour and every 2 hours. The tasks don’t do much other than return some text detailing that they ran, but each has a number emoji so I can see if it’s working correctly:
I’ve published the code for the tool on Github with the examples from the demos further on in the post, feel free to use it and adapt it. Below are some notes on the implementation:
Now a chainable task filter can easily filter a list of tasks based on their schedules.
One of the reasons I chose the serverless framework is due to its extensibility, I've previously written about using plugins and lifecycle hooks to add new capabilities. I created a serverless framework plugin that hooks into the before:package:initialize lifecycle hook to load the tasks and build a unique list of schedules, which it adds to the function definition dynamically before the function is packaged and deployed.
The task host is the execution environment that receives the invocation event and is responsible for resolving the invocation schedule. In this case, the host is a Lambda function, and unfortunately the event payload only contains a reference to the CloudWatch event rule ARN that invoked the Lambda, rather than the rule itself. So, I have to jump through some hoops to split the rule ARN to get the rule name using the resource parser, then get the rule with its schedule from the CloudWatch events API before parsing it with the schedule parser. This all comes together in the host to load the tasks and filter them based on the invocation schedule, and if there are any, runs them via the task runner and awaits the results:
This task loads the gossip page, finds all the individual paragraphs and applies a regular expression (rumourMatcher) to filter paragraphs that contain the words Newcastle or Toon:
This task loads the stock availability page for the standalone Xbox Series X, finds all the retailers, extracts the retailer name (or domain) from the alt text of the logo image and the stock availability text:
-
A note from our sponsor - SurveyJS
surveyjs.io | 28 Mar 2024
Stats
peasey/lambda-surf is an open source project licensed under MIT License which is an OSI approved license.
The primary programming language of lambda-surf is JavaScript.