Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
demo-build-curd-app-with-serverless-elixir
Search
ohr486
June 02, 2019
Technology
230
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
demo-build-curd-app-with-serverless-elixir
ohr486
June 02, 2019
More Decks by ohr486
See All by ohr486
負荷試験Night#1 負荷試験2023年トレンド
ohr486
17
4.9k
Elixir/PhoenixによるWeb開発の現場から
ohr486
1
660
Hacking Phoenix Performance
ohr486
1
420
Plug & WAF
ohr486
2
560
elixirをプロダクションに導入する
ohr486
1
750
IEx maniacs
ohr486
4
690
Hack and Read Elixir
ohr486
2
820
Running App on AppRunner
ohr486
0
880
sponsor-talk-drecom-heisei-ruby-kaigi
ohr486
0
920
Other Decks in Technology
See All in Technology
平文パスワードはログに“残り” ── 肝心の侵入は“痕跡すら残らない”
kuroneko13
0
110
会社紹介資料 / Sansan Company Profile
sansan33
PRO
24
430k
Model Studio CLI × Token Plan
maigo999
0
200
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
19k
8bit CPU 2026
koba789
1
360
MulticaとPi Coding Agentで、小規模OSSを30本同時運用した流れ
eiei114
0
130
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
その“隠したつもり”が命取り ── 自前と平文をやめて「正解」に委ねる
kuroneko13
0
130
What's new in Go 1.27?
ciarana
0
280
Oracle MCP Servers Explained
thatjeffsmith
0
300
【GCC2026】TrueHDRIを用いたルックデブ環境とライティングテクニック
bandainamcostudios
PRO
0
130
SmartHR Engineering Team Deck
smarthr
1
3.1k
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
390
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
950
sira's awesome portfolio website redesign presentation
elsirapls
0
330
Building a Scalable Design System with Sketch
lauravandoore
463
34k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Optimizing for Happiness
mojombo
378
71k
30 Presentation Tips
portentint
PRO
1
370
Faster Mobile Websites
deanohume
310
32k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.9k
Practical Orchestrator
shlominoach
191
12k
Transcript
DEMO build crud app with serverless elixir おーはら@tokyo.ex
agenda • about me • how to run • demo
• まとめ
about me • Tsunenori Ohara/おーはら ◦ Twitter: @ohrdev ◦ Github:
ohr486
how to run repo: https://github.com/ohr486/serverless_elixir_demo 利用ライブラリ: - erllambda - mix_erllambda
以下のようなアプリを作成します - CR(U)D操作のできるAPI - 環境はAWS、Lambda、ApiGatewayを利用 - DBはDynamoDBを利用
step0 • release buildの為のdocker imageのbuild ◦ https://github.com/alertlogic/erllambda_docker • build ◦
mix deps.get ◦ docker run -it --rm -v `pwd`:/buildroot -w /buildroot -e MIX_ENV=prod erllambda:21-elixir mix erllambda.rellease
step1 • cloudformationの為のS3 bucketを作成
step2 • パッケージング ◦ aws cloudformation package --template-file etc/template.yaml --output-template-file
packaged.yaml --s3-bucket japanex-demo
step3 • deploy ◦ aws cloudformation deploy --capabilities CAPABILITY_IAM --template-file
packaged.yaml --stack-name japanex-demo
step4 • deployスタックを確認 ◦ aws cloudformation describe-stacks --stack-name japanex-demo --query
'Stacks[].Outputs' ◦ 作成したendpointを確認 • API ENDPOINTの設定 ◦ export APIENDP=xxxxxxx
step5 • アイテムの作成 (CRUD) ◦ curl -X POST "$APIENDP?id=foo2&bar=quz2"
step6 • アイテムリスト取得 ◦ curl $APIENDP
step7 • アイテム削除 ◦ curl -X DELETE "$APIENDP?id=foo2"
step8 • アプリ削除 ◦ aws cloudformation delete-stack --stack-name japanex-demo
まとめ • 簡単なCR(U)Dアプリをserverlessで作成するデモを行いました • デモの通り、まだまだオペレーションが煩雑です ◦ このあたりをいい具合にラップしてくれるツール /FW等は現状まだありません ◦ oss貢献のチャンス!