async function getP(){
var params = {
Name: 'MY-NAME',
WithDecryption: true
};
var request = await ssm.getParameter(params).promise();
return request.Parameter.Value;
}
async function getParam(){
var resp = await getP()
console.log(resp)
}
getParam()
This is the code inside my lambda function which is currently not working and I'm not sure why..
when I change it to:
const x = getParam()
console.log(x) // it says that this is pending
but I thought the async awaits would have resolved that, any ideas?
edited:
console.log('first') // never logged
const res = await ssm.getParameter(paramUsername).promise(); // paramUsername deffo exists in SSM
console.log(res, 'res') // never logged
console.log('second') // never logged