https://github.com/vane-tech/clojure-meetup-ring-lambda
A silly ring/lambda example for a Clojure Meetup presentation
https://github.com/vane-tech/clojure-meetup-ring-lambda
Last synced: about 2 months ago
JSON representation
A silly ring/lambda example for a Clojure Meetup presentation
- Host: GitHub
- URL: https://github.com/vane-tech/clojure-meetup-ring-lambda
- Owner: vane-tech
- License: epl-1.0
- Created: 2016-11-08T13:52:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-08T16:23:35.000Z (over 8 years ago)
- Last Synced: 2025-01-27T10:45:00.034Z (4 months ago)
- Language: Clojure
- Size: 9.77 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# The coolest animal from ring to AWS Lambda
It's a simple example demonstrating (check the commit history) how a ring app
can be easily transformed into an AWS Lambda function.To run it on AWS Lambda, generate an uberjar first:
`lein uberjar`
Then you need to create the function:
```
aws lambda create-function \
--region eu-west-1 \
--function-name clojure-meetup-coolest-animal \
--zip-file fileb://$(pwd)/target/uberjar/coolest-animal-ring-lambda-0.1.0-SNAPSHOT-standalone.jar \
--role arn:aws:iam::YOUR_ACCOUNT_ID:role/lambda_basic_execution \
--handler coolest-animal-ring-lambda.core.HandlerFn \
--runtime java8
```...and finally, call it:
```
aws lambda invoke \
--invocation-type RequestResponse \
--function-name clojure-meetup-coolest-animal \
--region eu-west-1 \
--payload '"elephant,turtle,camel,crocodile,poodle"' \
out.txt
```