TODO
Be sure to have installed and setup:
- Clojure and Clojure CLI >= 1.10.3.1040
- Babashka >= 0.6.8
- AWS CLI v2
- AWS credentials. Recommend using
aws-vault. Most commands below
would then be prefixed with
aws-vault exec my-profile -- ...
To uberjar and create a lambda fn: bb lambda-create
. This is a basic lambda
with permissions to write to CloudWatch. To do more interesting things with
lambda consider using terraform.
If lambda was created with bb lambda-create
, update fn with local code using
bb lambda-update-code
.
Invoke lambda with the payload as an EDN string e.g. bb lambda-invoke '{:foo :bar}'
.
To build the uberjar: bb uber
.
These are common commands to run during development. They are also required to pass on CI.
# Run tests
clojure -X:test
# Run style linter
clojure -M:cljfmt check
# Run code linter
clojure -M:clj-kondo
# Check dependencies are up to date
clojure -M:outdated