5 ms·
Show HN: Deploy your Puppeteer scripts to AWS lambda and run them via URL / CRON
- superasn 7y agoHi HN, This is a OSS project I wrote last weekend for deploying puppeteer scripts to AWS lambda in just 1 click. I made it to scratch my own itch since I like to create such scripts to monitor my website, do some testing but so far I only run them locally and I always wanted a solution where I could deploy them to a server and have the tests done automatically every few hours/day. Unfortunately deploying puppeteer script to lambda isn't easy. There are solutions available like using serverless with aws-chrome-lambda but it's quite complicated and requires lots of configuration and knowledge of serverless framework. So my aim was to make it super easy and require no knowledge of any thing besides writing pupeteer scripts. For the curious here is how it works (this is all setup for you automatically when you type llp deploy): - LLP turns your puppeter scripts (aka puppets) into AWS lambda compatible scripts - It then creates an entry in AWS API Gateway so that you can invoke your puppets from a URL - If you're creating a cron job, it add entries to AWS cloudwatch to invoke your puppets at said times - It monitors the outputs of your puppets and it can send you alerts on telegram, email or URL ping. This is great for creating puppets that monitor website uptime, or changes in webpage. Hope you guys like it. Your feedback is most welcome
- fitzn 7y agoThis is a really cool idea and implementation. I am a big believer that Lambda has so many different areas to grow into and impact and this is a perfect use case for the Lambda value prop. We are working in a sort of similar space of automated web testing, but we're at a different part of the pyramid since we're strictly end-to-end, point-and-click testing at the user level, and we don't use Lambda. Link is in my bio if you're interested, don't want to hijack! :) Really cool work here. Kudos.
- superasn 7y agoThank you so much :) > I am a big believer that Lambda has so many different areas to grow Yes, I intially created it as a free tool for website monitoring since it can alert you in real time via email / telegram if your website goes down or doesn't look as expected. But as I developed the idea i found another benefit that since these are puppeteer scripts they can even do a login to the member's area and check the insides (most website monitoring sites only check for uptime of http codes). Now I'm also using it to monitor the price of a motherboard on Newegg and alert me if it changes (the script is in the examples folder) just for fun.