From the accepted Stack Overflow answer: You need wait for the async call to finish. Inside your main handler you will have something like: // inside your main handler exports.handler = async function(event, context) { var secret [your value] getSecret('mySecret') console.log('mysecret - ' + secret ) return ... }

Context: Problem: Accepted solution (score 20): You need wait for the async call to finish. Inside your main handler you will have something like: // inside your main handler exports.handler = async function(event, context) { var secret [your value] getSecret('mySecret') console.log('mysecret - ' + secret ) return ... }