Submit Search
Serverless adventures with AWS Lambda and Clojure
1 like
1,312 views
Lars Trieloff
My slides from #serverless Conference in New York, May 26th, 2016
Software
Related topics:
Amazon Web Services
Read more
1 of 51
Download now
Download to read offline
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
More Related Content
PDF
Genesis200902 sugyan
Yoshihiro Sugi
PDF
Introduction to Japanese Morphological Analysis
Takeshi Arabiki
PDF
Automated decision making with predictive applications – Big Data Brussels
Lars Trieloff
PDF
Big Data Munich – Decision Automation and Big Data
Lars Trieloff
PDF
Big Data Berlin – Automating Decisions is the Next Frontier for Big Data
Lars Trieloff
PDF
Data Natives 2015: Predictive Applications are Going to Steal Your Job: this ...
Lars Trieloff
PDF
Web Forms 2.0
Lars Trieloff
PDF
Smartcon 2015 – Automated Decisions in the Supply Chain
Lars Trieloff
Genesis200902 sugyan
Yoshihiro Sugi
Introduction to Japanese Morphological Analysis
Takeshi Arabiki
Automated decision making with predictive applications – Big Data Brussels
Lars Trieloff
Big Data Munich – Decision Automation and Big Data
Lars Trieloff
Big Data Berlin – Automating Decisions is the Next Frontier for Big Data
Lars Trieloff
Data Natives 2015: Predictive Applications are Going to Steal Your Job: this ...
Lars Trieloff
Web Forms 2.0
Lars Trieloff
Smartcon 2015 – Automated Decisions in the Supply Chain
Lars Trieloff
Viewers also liked
(20)
PDF
How to get value out of data
Lars Trieloff
PDF
Business Reasons for Predictive Applications
Lars Trieloff
PDF
Automated Decision Making with Predictive Applications – Big Data Düsseldorf
Lars Trieloff
PDF
Automated Decision making with Predictive Applications – Big Data Hamburg
Lars Trieloff
PDF
AMEX Meetings&Events 2015 Global Meetings & Events Forecast
Lausanne Montreux Congress
PDF
Blue Yonder - NOAH16 London
NOAH Advisors
PDF
Forecasting - MENA 2012 Conference
Mohammed Hadi
PDF
Automated decision making with predictive applications – Big Data Amsterdam
Lars Trieloff
PPTX
How to market and sell unbundled travel
Kevin May
PDF
ADDD (Automated Data Driven Decisions) – How To Make it Work
Lars Trieloff
PDF
Automated decision making with predictive applications – Big Data Frankfurt
Lars Trieloff
PPTX
Forecasting and Managing Passenger Growth
Lockheed-Martin
PDF
Airport forecasting
Mohammed Hadi
PPTX
Presentation on forecasting
Muhammad Sharjeel
PDF
Airline and Airport Big Data: Impact and Efficiencies
Joshua Marks
PPT
Marketing Airline
zeeshanvali
PPTX
A4A Industry Review and Outlook
Airlines for America (A4A)
PDF
Big Data For Flight Delay Report
JSPM's JSCOE , Pune Maharashtra.
PDF
Big data analysis concepts and references
Information Security Awareness Group
PPTX
A Brief History of Big Data
Bernard Marr
How to get value out of data
Lars Trieloff
Business Reasons for Predictive Applications
Lars Trieloff
Automated Decision Making with Predictive Applications – Big Data Düsseldorf
Lars Trieloff
Automated Decision making with Predictive Applications – Big Data Hamburg
Lars Trieloff
AMEX Meetings&Events 2015 Global Meetings & Events Forecast
Lausanne Montreux Congress
Blue Yonder - NOAH16 London
NOAH Advisors
Forecasting - MENA 2012 Conference
Mohammed Hadi
Automated decision making with predictive applications – Big Data Amsterdam
Lars Trieloff
How to market and sell unbundled travel
Kevin May
ADDD (Automated Data Driven Decisions) – How To Make it Work
Lars Trieloff
Automated decision making with predictive applications – Big Data Frankfurt
Lars Trieloff
Forecasting and Managing Passenger Growth
Lockheed-Martin
Airport forecasting
Mohammed Hadi
Presentation on forecasting
Muhammad Sharjeel
Airline and Airport Big Data: Impact and Efficiencies
Joshua Marks
Marketing Airline
zeeshanvali
A4A Industry Review and Outlook
Airlines for America (A4A)
Big Data For Flight Delay Report
JSPM's JSCOE , Pune Maharashtra.
Big data analysis concepts and references
Information Security Awareness Group
A Brief History of Big Data
Bernard Marr
Ad
More from Lars Trieloff
(17)
PDF
Putting the F in FaaS: Functional Compositional Patterns in a Serverless World
Lars Trieloff
PDF
Automated decision making using Predictive Applications – Big Data Paris
Lars Trieloff
PDF
Automated decision making with big data – Big Data Vienna
Lars Trieloff
PDF
10 Things I Learned About Pricing – Product Camp Berlin 2014
Lars Trieloff
PDF
The DNA of Marketing
Lars Trieloff
PDF
Cross community campaigns with CQ5
Lars Trieloff
PDF
Mastering the customer engagement ecosystem with CQ5
Lars Trieloff
PDF
Advanced Collaboration And Beyond
Lars Trieloff
PDF
Getting Into The Flow With CQ DAM
Lars Trieloff
PDF
The Zero Bullshit Architecture
Lars Trieloff
PDF
Creating Value In Social Networking
Lars Trieloff
PDF
5 Ways To Build Asset Centric Applications
Lars Trieloff
PDF
REST and AJAX Reconciled
Lars Trieloff
PDF
µjax in 30 minutes (for Stockholm)
Lars Trieloff
PDF
µjax in 30 minutes
Lars Trieloff
PDF
Living in a multiligual world: Internationalization for Web 2.0 Applications
Lars Trieloff
PDF
Mindquarry For Cocoon Users
Lars Trieloff
Putting the F in FaaS: Functional Compositional Patterns in a Serverless World
Lars Trieloff
Automated decision making using Predictive Applications – Big Data Paris
Lars Trieloff
Automated decision making with big data – Big Data Vienna
Lars Trieloff
10 Things I Learned About Pricing – Product Camp Berlin 2014
Lars Trieloff
The DNA of Marketing
Lars Trieloff
Cross community campaigns with CQ5
Lars Trieloff
Mastering the customer engagement ecosystem with CQ5
Lars Trieloff
Advanced Collaboration And Beyond
Lars Trieloff
Getting Into The Flow With CQ DAM
Lars Trieloff
The Zero Bullshit Architecture
Lars Trieloff
Creating Value In Social Networking
Lars Trieloff
5 Ways To Build Asset Centric Applications
Lars Trieloff
REST and AJAX Reconciled
Lars Trieloff
µjax in 30 minutes (for Stockholm)
Lars Trieloff
µjax in 30 minutes
Lars Trieloff
Living in a multiligual world: Internationalization for Web 2.0 Applications
Lars Trieloff
Mindquarry For Cocoon Users
Lars Trieloff
Ad
Serverless adventures with AWS Lambda and Clojure
1.
Serverless Adventures with AWS
Lambda and Clojure
2.
________ ______ __ ___/______________
________________ /___________________ _____ _ _ _ ___/_ | / / _ _ ___/_ /_ _ _ ___/_ ___/ ____/ // __/ / __ |/ // __/ / _ / / __/(__ )_(__ ) /____/ ___//_/ _____/ ___//_/ /_/ ___//____/ /____/ .d8b. d8888b. db db d88888b d8b db d888888b db db d8888b. d88888b .d8888. db d8b db d888888b d888888b db db d8' `8b 88 `8D 88 88 88' 888o 88 `~~88~~' 88 88 88 `8D 88' 88' YP 88 I8I 88 `88' `~~88~~' 88 88 88ooo88 88 88 Y8 8P 88ooooo 88V8o 88 88 88 88 88oobY' 88ooooo `8bo. 88 I8I 88 88 88 88ooo88 88~~~88 88 88 `8b d8' 88~~~~~ 88 V8o88 88 88 88 88`8b 88~~~~~ `Y8b. Y8 I8I 88 88 88 88~~~88 88 88 88 .8D `8bd8' 88. 88 V888 88 88b d88 88 `88. 88. db 8D `8b d8'8b d8' .88. 88 88 88 YP YP Y8888D' YP Y88888P VP V8P YP ~Y8888P' 88 YD Y88888P `8888Y' `8b8' `8d8' Y888888P YP YP YP ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ │ │ ___ ____ __ ____ _______. __ ___ .___ ___. .______ _______ ___ │ │ / / / / / | | | / | / | | _ | / │ │ / ^ / / / | (----` | | / ^ | / | | |_) | | .--. | / ^ │ │ / /_ / | | / /_ | |/| | | _ < | | | | / /_ │ │ / _____ / / .----) | | `----./ _____ | | | | | |_) | | '--' | / _____ │ │ /__/ __ &&&&&&&&&&/ |_______/ |_______/__/ __ |__| |__| |______/ |_______/ /__/ __ │ │ &::::::::::& │ │ &::::&&&:::::& ╔════════════════════════════════════════════════════════════════════════════════╗ │ └────────────────&::::&───&::::&────╣ ╠──┘ &::::& &::::& ║ ║ &::::&&&::::& ║ ______ __ ______ __ __ __ .______ _______ ║ &::::::::::& ║ / || | / __ | | | | | | | _ | ____| ║ &:::::::&& ║ | ,----'| | | | | | | | | | | | | |_) | | |__ ║ &::::::::& &&&& ║ | | | | | | | | .--. | | | | | | | / | __| ║ &:::::&&::& &:::& ║ | `----.| `----.| `--' | | `--' | | `--' | | | ----.| |____ ║ &:::::& &::&&:::&& ║ ______||_______| ______/ ______/ ______/ | _| `._____||_______| ║ &:::::& &:::::& ║ ║ &:::::& &::::& ║ ║ &::::::&&&&::::::&& ╚════════════════════════════════════════════════════════════════════════════════╝ &&::::::::&&&::::& &&&&&&&& &&&&&
3.
Lars Trieloff !❤ ! @trieloff !"
@trieloff
4.
!" !"#$%&'
5.
!
6.
What?
7.
Excel + HTTP
= Excelsior
8.
!" github.com/trieloff/excelsior
9.
!
10.
Why?
11.
! Clojure
12.
λ !
13.
! 12 ✕ 12factor.net
14.
! Swagger swagger.io
15.
!"?
16.
AWS Lambda!
17.
!" = #
18.
!" = #
19.
!"
20.
AWS λ +
Clojure λ = ♥
21.
!
22.
Sounds good.
23.
Sounds too good.
24.
Sounds too good
to be true.
25.
If something sounds
too good to be true, it probably is.
26.
┌─────────────┐ │ │ │ │ │
Clojure │ │ ┌─────┼───────┐ │ │ ! │ │ └───────┼─────┘ │ │ AWS Lambda │ │ │ │ │ └─────────────┘
27.
!
28.
How?
29.
→ ! github.com/metosin/compojure-api →
" github.com/jpb/ring-aws-lambda-adapter → # github.com/mjul/docjure → ⭕ circleci.com → % github.com/mhjort/lein-clj-lambda
30.
┌────────────────────────┐ ┌────────────────────────┐ │ ┌────────────────────┐
│ │ │ │ │ ┌────────────────┐ │ │ │ │ │ │ │ ┌────────────┐ │ │ │ │ │ │ │ │ │ Docjure !│ │ │ │ │ │ │ │ │ └────────────┘ │ │ │ ┌────────────┐ │ AWS API Gateway │ │ │ │ My code " │ │ │ ┌────────▶│swagger.json│─────Import─────▶│ │ │ │ └────────────────┘ │ │ Export └────────────┘ │ │ │ │ Compojure API # ├─┼─────┘ │ │ │ └────────────────────┘ │ │ │ │ Ring Lambda Adapter $ │ │ │ └────────────────────────┘ └────────────────────────┘ │ │ │ Proxy │ │ │ ▼ │ ┌────────────────────────┐ │ │ │ │ │ │ │ │ │ │ │ │ │ ┌────────────┐ │ AWS Lambda │ └───────────Build % ─────▶│ server.jar │────Deploy──────▶│ │ └────────────┘ │ │ │ │ │ │ │ │ └────────────────────────┘
31.
!
32.
Problems?
33.
┌─────────────┐ │ │ │ │ │
Clojure │ │ ┌─────┼───────┐ │ │!"#│ │ └───────┼─────┘ │ │ AWS Lambda │ │ │ │ │ └─────────────┘
34.
!" github.com/trieloff/lein-aws-apigateway
35.
!" AWS API Gateway
36.
!" AWS IAM Permissions
37.
Execution failed due
to configuration error: Invalid permissions on Lambda function aws lambda add-permission --function-name <name> --statement-id <someid> --action "lambda:*" --principal "apigateway.amazonaws.com" ! docs.aws.amazon.com/cli/latest/reference/ lambda/add-permission.html
38.
!
39.
Tips?
40.
Think small 100 LOC
should be enough for a Lambda function. !
41.
Think modular Two tiny functions
are better than one large function. !
42.
!" github.com/trieloff/salvador
43.
Think Stateless simplicity, performance, composablity ☠
44.
Be lazy Sit, don’t
stand on the shoulders of giants. Re- use, don’t re-invent. ♻
45.
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ │
│ │ │ │ │ │ Typeform │───Redirect──▶│ Excelsior │───Redirect──▶│ Salvador │ │ │ │ │ │ │ └──────────────────┘ └──────────────────┘ └──────────────────┘ ▲ ▲ │ │ Spreadsheet Template │ │ │ │ ┌──────────────────┐ ┌──────────────────┐ │ │ │ │ │ S3 │ │ S3 │ │ │ │ │ └──────────────────┘ └──────────────────┘
46.
Smile & Share Community
eats code for breakfast. ☕
47.
!
48.
⏰
49.
AWS λ +
Clojure λ = ♥
50.
! Rainbow Parentheses
make " #
51.
))))))))))))*
Download