Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

185
Visualizações
Puppeteer Node.js Script on Lambda

I have an app that uses puppeteer to scrape through a website (log in, book some reservations, log out). The app uses a mongodb database to get the data it needs to log in and book reservations, and then store new data based on its success in completing those tasks.

I need this app to run everyday (i.e. 5:00 AM each day). I want to use AWS in order to automate this process instead of having to tell my own computer to run the app each day. I'd like to be able to use AWS to host my website, access my mongodb atlas database, and run my node.js script.

After some research it looks like AWS Lambda will be the simplest way to get my app online. I have already built the app so it executes on my local computer with a simple node app.js command. My question is how do I link/upload my node index.js file to Lambda. I selected a simple "hello world" framework and see where an index.js file on lambda has been created with an exports.handler function inside it.

Do I need to copy and paste my local app.js file (the one that runs the app) into this index.js file on Lambda (that's several hundred lines of code and it needs to access a mongodb atlas database), or can I put a line of code inside the Lambda index.js file to call my app.js file (after I upload it). If I can call app.js inside the exports.handler, then what line of code would I need?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I recommend checking the CDK workshop on: https://cdkworkshop.com/. It is a short intro which also goes throught how to setup a small stack using lambda and apigateway. Going through it will probably answer many of the questions you have.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda