astuyve / lambda-stream

Implements AWS Lambda Response Streaming in TypeScript for local development and testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`isInAws` always returns `false`

meirna opened this issue · comments

commented

Hey guys, thanks for this library!

I'm having an issue with isInAws function: it always returns false, even in AWS Lambda.

It works for me if I change the condition to:

function isInAWS() {
    return typeof awslambda !== 'undefined';
}

Do you know what might be the reason for this?

Hey folks, thanks for flagging this - I was traveling the last few weeks. I'll take a look soon.

I copied this from code we used in datadog's instrumentation which as far as I know still works, however the runtime can always change on us.

Thanks!

hey @meirna, @bmul - I've prepared a patch in #7 which seems to work in my manual testing. I'll cut a new release tomorrow.

Thanks!

Published in v0.4.0