How to access the aws parameter store from a lambda using node.js and aws-sdk
问题 I've created a lambda and cloud formation template which grants a lambda access to the parameter store and secrets manager. When I test the lambda I have the following functions outside of the export.handler function: function getParameterFromStore(param){ let promise = new Promise(function(resolve, reject){ console.log('++ ' + param.Path); servmgr.getParametersByPath(param, function(err, data){ if(err){ reject(console.log('Error getting parameter: ' + err, err.stack)); } else { resolve(data)