theam / aws-lambda-haskell-runtime

⚡Haskell runtime for AWS Lambda
https://theam.github.io/aws-lambda-haskell-runtime/
Other
269 stars 48 forks source link

AWS complains "Handler bootstrap does not exist on project" #66

Closed LazyBrush closed 4 years ago

LazyBrush commented 4 years ago

Hope not too dumb a question...

I've made the bootstrap (via docker method) and then function.zip from that.

I could run ./bootstrap locally which wanted the env variable AWS_LAMBDA_RUNTIME_API set.

I've manually loaded the function.zip and set the runtime to 'custom runtime' and then tried several permutations for 'handler'. But I get the error -

"Handler bootstrap does not exist on project"

Can you point me in the right direction please?

LazyBrush commented 4 years ago

After a bit of guesswork...

Handler should be 'src/Lib.handler'

Then to test both good and bad paths, use the data in the lambda console

{ "personName": "Bobby", "personAge": 21 }

{ "personName": "Bobby", "personAge": -2 }

NickSeagull commented 4 years ago

Thanks for reporting this. This in fact is a bug of the documentation. I've created an issue for tracking this for the future. If you are up to it, feel free to submit a PR :)

LazyBrush commented 4 years ago

I'll have a go.