Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.4K
Views
Función AWS Lambda que devuelve el error Runtime.HandlerNotFound

Soy nuevo en AWS Lambdas. Estoy tratando de escribir una función lambda para recuperar algunos datos de firebase. Llamé a esta función export.handler y la subí a Lambda con los módulos de nodo como un archivo Zip. Sin embargo, cuando intento ejecutarlo, devuelve el siguiente error:

 { "errorType": "Runtime.HandlerNotFound", "errorMessage": "index.handler is undefined or not exported", "trace": [ "Runtime.HandlerNotFound: index.handler is undefined or not exported", " at Object.module.exports.load (/var/runtime/UserFunction.js:144:11)", " at Object.<anonymous> (/var/runtime/index.js:43:30)", " at Module._compile (internal/modules/cjs/loader.js:1156:30)", " at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)", " at Module.load (internal/modules/cjs/loader.js:1000:32)", " at Function.Module._load (internal/modules/cjs/loader.js:899

Aquí está mi función:

 module.exports.handler = async (event) =>{ ref.on("value", function(snapshot) { snapshot.forEach(function(childSnapshot) { responses.push({ date: childSnapshot.val().Date, name:childSnapshot.val().name, response: childSnapshot.val().response }) }); printObjects(responses); console.log(json(responsesByPerson)); }) })

Miré las otras respuestas a preguntas similares a la mía e implementé algunas de esas soluciones, pero ninguna funcionó.

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Cuando comprimimos un directorio, el directorio de shell también se agrega al zip, mientras que Lambda espera que esté sin el directorio de shell. Use el siguiente comando para crear el zip correctamente.

 $ cd my_lambda_fun $ zip -r lambda_one.zip .
over 4 years ago · Santiago Trujillo Report

0

Asegúrese de que index.js esté en la raíz del directorio de funciones de Lambda

over 4 years ago · Santiago Trujillo Report

0

zip -r lambda_one.zip. trabajó para mi

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!