jmglov / blambda Goto Github PK
View Code? Open in Web Editor NEWBlambda! is a custom runtime for AWS Lambda that lets you write functions using Babashka
License: Other
Blambda! is a custom runtime for AWS Lambda that lets you write functions using Babashka
License: Other
As far as I can tell, blambda uses the default AWS endpoint URL, which makes it incompatible with localstack.
Using a client such as the following would solve the problem:
(aws/client {:api :lambda
:region aws-region
:endpoint-override {:protocol :http
:hostname "localhost"
:port 4566}})
Unfortunately AWS doesn't yet provide a way to set the endpoint in .aws/credentials or with an env var. Would you consider exposing the endpoint URL in the API as well as the CLI as an optional input, so that users can override the current behaviour?
Thanks a lot for blambda! It has simplified the process of writing lambdas in Clojure quite a bit :)
Hello! Thank you for library, but...
All attempts to run any subcommand are failing with such error:
▸ bb blambda build-all
----- Error --------------------------------------------------------------------
Type: java.lang.ClassCastException
Message: java.lang.Character cannot be cast to java.util.Map$Entry
Location: /Users/laniakea/.gitlibs/libs/net.jmglov/blambda/b80ac1d3ad1c45666e6bbc448538c3673687a300/src/blambda/cli.clj:266:12
----- Context ------------------------------------------------------------------
262: ;; Assume that the subprocess has already printed an error message
263: (System/exit exit))
264:
265: :else
266: (throw e)))))))
^--- java.lang.Character cannot be cast to java.util.Map$Entry
267:
268: (defn -main [& args]
269: (apply dispatch {} args))
----- Stack trace --------------------------------------------------------------
clojure.lang.APersistentMap/KeySeq - <built-in>
clojure.core/first--5449 - <built-in>
clojure.core/reduce1 - <built-in>
clojure.core/set - <built-in>
babashka.cli/dispatch-tree' - <built-in>
babashka.cli/dispatch-tree - <built-in>
babashka.cli/dispatch - <built-in>
blambda.cli/dispatch - /Users/laniakea/.gitlibs/libs/net.jmglov/blambda/b80ac1d3ad1c45666e6bbc448538c3673687a300/src/blambda/cli.clj:266:12
blambda.cli/dispatch - /Users/laniakea/.gitlibs/libs/net.jmglov/blambda/b80ac1d3ad1c45666e6bbc448538c3673687a300/src/blambda/cli.clj:243:1
user-d7db72f9-b349-4918-834d-f742ce3e4fef - <expr>:26:1
Only simple bb blambda
returns help as expected.
bb.edn
file is simple also:
{:paths ["src"]
:deps {net.jmglov/blambda
{:git/url "https://github.com/jmglov/blambda.git"
:git/tag "v0.1.0"
:git/sha "b80ac1d"}}
:tasks
{:requires ([blambda.cli :as blambda])
blambda {:doc "Controls Blambda runtime and layers"
:task (blambda/dispatch
{:deps-layer-name "example-deps"
:lambda-name "example-test-1"
:lambda-handler "example.main/handler"
:lambda-iam-role "arn:aws:iam::******:role/service-role/example-test-1-role-******"
:source-files ["src"]})}}}
Please explain what could be wrong.
Thank you!
When I am trying to use pod from registry and a developing process is going on MacBook, command bb blambda build-deps-layer
loads pod for MacOS, but definitely we need Linux pod for deployment to AWS Lambda.
I tried some workarounds like:
os.name
system property in pod loading moment, but as we can see in code of pods/load-pod
it calls run-pod
function, that starts process from binary and fails because of wrong OSresolve-pod
instead of load-pod
, that doesn't starts a binary, but it is in babashka.pods.impl
, is unavailable and anyway will cause "code-smell"A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.