GithubHelp home page GithubHelp logo

jmglov / blambda Goto Github PK

View Code? Open in Web Editor NEW
83.0 83.0 13.0 153 KB

Blambda! is a custom runtime for AWS Lambda that lets you write functions using Babashka

License: Other

Shell 2.18% Clojure 76.81% HCL 21.01%

blambda's People

Contributors

beyelerb avatar borkdude avatar jmglov avatar johanmynhardt avatar lispyclouds avatar vaclavsynacek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

blambda's Issues

Add support for lambdas running on custom endpoints (e.g. localstack)

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 :)

Getting error on running any subcommand

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.