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
3
220
demo-build-curd-app-with-serverless-elixir
ohr486
June 02, 2019
Tweet
Share
More Decks by ohr486
See All by ohr486
負荷試験Night#1 負荷試験2023年トレンド
ohr486
17
4.8k
Elixir/PhoenixによるWeb開発の現場から
ohr486
1
610
Hacking Phoenix Performance
ohr486
1
380
Plug & WAF
ohr486
2
540
elixirをプロダクションに導入する
ohr486
1
710
IEx maniacs
ohr486
4
640
Hack and Read Elixir
ohr486
2
790
Running App on AppRunner
ohr486
0
840
sponsor-talk-drecom-heisei-ruby-kaigi
ohr486
0
880
Other Decks in Technology
See All in Technology
OSSで構築するIT基盤管理実践事例: NetBox・Snipe-IT・FreeRADIUS+PrivacyIDEA / Practical Case Studies of IT Infrastructure Management Using OSS
nttcom
0
180
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
44k
生成AI活用によるPRレビュー改善の歩み
lycorptech_jp
PRO
4
2k
WBCの解説は生成AIにやらせよう - 生成AIで野球解説者AI Agentを実現する / Baseball Commentator AI Agent for Gemini
shinyorke
PRO
0
320
マルチロールEMが実践する「組織のレジリエンス」を高めるための組織構造と人材配置戦略
coconala_engineer
2
260
男(監査)はつらいよ - Policy as CodeからAIエージェントへ
ken5scal
5
710
AIに視覚を与えモバイルアプリケーション開発をより円滑に行う
lycorptech_jp
PRO
1
770
トラブルの大半は「言ってない」x「言ってない」じゃねーか!!
ichimichi
0
300
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
22k
マイグレーションガイドに書いてないRiverpod 3移行話
taiju59
0
340
類似画像検索モデルの開発ノウハウ
lycorptech_jp
PRO
0
380
EMからVPoEを経てCTOへ:マネジメントキャリアパスにおける葛藤と成長
kakehashi
PRO
5
550
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
220
Darren the Foodie - Storyboard
khoart
PRO
3
2.7k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
140
The Spectacular Lies of Maps
axbom
PRO
1
580
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
63
53k
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
59
50k
Rails Girls Zürich Keynote
gr2m
96
14k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Speed Design
sergeychernyshev
33
1.6k
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貢献のチャンス!