typelevel / feral

Feral cats are homeless, feral functions are serverless
Apache License 2.0
172 stars 41 forks source link

sbt plugin #92

Open armanbilge opened 2 years ago

armanbilge commented 2 years ago

As described in https://gist.github.com/djspiewak/37a4ea0d7a5237144ec8b56a76ed080d

Then, once this is done, within the resulting project they should be able to run sbt deploy and immediately get a running, functioning HTTP lambda. Assume we have an AWS_API_KEY in an environment variable (or similar), presumably referenced in some way from the build.sbt.

I have an example of how to deploy an AWS lambda with SAM in https://github.com/christopherdavenport/js-test/tree/serverless.

Easy:

Hard:

Ideally we should have a plugin for both JVM lambdas and JS lambdas (or a hybrid plugin that can handle both) but let's focus on JS use-case for now since that's newer/more foreign to Scala folks. The nice thing is the SJS plugin can also adjust the Scala.js settings that tend to trip users up (namely, module configs).

armanbilge commented 2 years ago

As of #97 the easy part is done. So now, the hard part 😅

Correction: hmm, actually not. Didn't do the SAM cli stuff yet.