https://serverless-stack.com/ logo
#help
Title
# help
a

Anthony Sanchez

05/13/2022, 11:12 PM
hey there, I've noticed some odd behavior so just wanted to get some clarification if possible. SST runs functions locally, correct? so if I'm performing http calls in a function, they're originating from machine? This appears to be manifesting itself in that live lambda development works on one machine but not another.
a

Adam Fanello

05/13/2022, 11:24 PM
CDK generally does not wait for promises, which can cause bad or inconsistent behavior. SST with functions added some async/await support, but take a close look at your use.
f

Frank

05/14/2022, 4:50 AM
Thanks @Adam Fanello
Hey @Anthony Sanchez is it http call consistently failing on one machine, while successful on another? Does the request time out or returns an error?
Maybe share a bit more detail on the error.
a

Anthony Sanchez

05/14/2022, 5:26 PM
@Frank yeah the http call succeeds on one machine and I get a 401 as I expect, whereas on the other machine it just hangs and the function will timeout eventually.
I did a bit more digging and it seems to be related to SST. I’m able to execute the script directly and it works as expected on both machines.