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

243
Views
Firebase Admin + Lambda AWS Callback function not returning data
var firebase = require('firebase-admin');
const serviceAccount = require('./admin-key.json');
firebase.initializeApp({
  credential: firebase.credential.cert(serviceAccount),
  databaseURL: 'https://xxxxxx.firebaseio.com/'
});

exports.handler = async (event, context, callback) => {
    var db = firebase.database();
    var ref = db.ref(`users/${event.userID}`);
    const snapshot = await ref.once('value');
    console.log(snapshot.val())
    callback(null, snapshot.val());
    context.succeed();
};

I'm getting the snapshot variable coming up on the logs, but the function does not return any data, just times out after the maximum time limit. Any idea how to get it working for NodeJS 14.x?

about 4 years ago · Juan Pablo Isaza
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!