Lamba trusted auth

getAuthToken: () => fetch( tokenURL, { method: 'POST', body: JSON.stringify(tokenBody), } ).then(r => r.text()) .catch(e => { console.error(e); return ''; })
5 Replies
ashish
ashish15mo ago
Hey Michael, seems like something lamba is doing ? Did you try calling the lamba from outside (postman or something) when it's down to see if it comes back ?
Michael
MichaelOP15mo ago
Yes, the moment I call it it starts working again. That's what's odd about it. Why doesn't the init function call have the same effect?
ashish
ashish15mo ago
Did you check in the network tab that it's indeed calling the right end point?
Michael
MichaelOP15mo ago
Yes, and it works great after I hit the endpoint Checking in on this one
ashish
ashish15mo ago
Not able to help more here, if the API call is made appropriately as seen in the network tab .. Its hard to tell why the lambda does not wake up. One thing might be to compare the whole curl request both from SDK and postman .. And see if there are some headers which are missing.

Did you find this page helpful?