mantil-io / mantil

Build your AWS Lambda-based Go backends quicker than ever
https://www.mantil.com
MIT License
109 stars 3 forks source link

Responses from long-running lambdas #14

Closed djelusic closed 3 years ago

djelusic commented 3 years ago

In some cases we expect a response from a long-running lambda (eg mantil deploy expects to receive the API gateway url). This is an API gateway limitation (30s timeout), so we currently get around this by doing another request after log streaming has finished: https://github.com/mantil-io/mantil/blob/41c820015c644d18851130858ffe124406b1286a/internal/cli/commands/deploy/deploy.go#L124

Proposal: Invoke the functions asynchronously and upgrade log streaming to cover multiple message types (logs, responses, errors etc).

ianic commented 3 years ago

We should switch to the ws streaming as the primary communication between cli and runtime. That should solve all category of problems like this.