$30 off During Our Annual Pro Sale. View Details »
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
210
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
550
Hacking Phoenix Performance
ohr486
1
360
Plug & WAF
ohr486
2
510
elixirをプロダクションに導入する
ohr486
1
680
IEx maniacs
ohr486
4
620
Hack and Read Elixir
ohr486
2
750
Running App on AppRunner
ohr486
0
810
sponsor-talk-drecom-heisei-ruby-kaigi
ohr486
0
860
Other Decks in Technology
See All in Technology
MCP・A2A概要 〜Google Cloudで構築するなら〜
shukob
0
160
ページの可視領域を算出する方法について整理する
yamatai1212
0
160
Data Hubグループ 紹介資料
sansan33
PRO
0
2.3k
プラットフォームエンジニアリングとは何であり、なぜプラットフォームエンジニアリングなのか
doublemarket
1
550
日本Rubyの会の構造と実行とあと何か / hokurikurk01
takahashim
2
400
ブロックテーマとこれからの WordPress サイト制作 / Toyama WordPress Meetup Vol.81
torounit
0
240
Microsoft Agent 365 を 30 分でなんとなく理解する
skmkzyk
1
290
A Compass of Thought: Guiding the Future of Test Automation ( #jassttokai25 , #jassttokai )
teyamagu
PRO
1
190
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.9k
AI 時代のデータ戦略
na0
8
3.2k
なぜ使われないのか?──定量×定性で見極める本当のボトルネック
kakehashi
PRO
1
760
原理から解き明かす AIと人間の成長 - Progate BAR
teba_eleven
2
300
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
95
14k
Faster Mobile Websites
deanohume
310
31k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Context Engineering - Making Every Token Count
addyosmani
9
460
How to Think Like a Performance Engineer
csswizardry
28
2.3k
A Modern Web Designer's Workflow
chriscoyier
697
190k
The Invisible Side of Design
smashingmag
302
51k
Automating Front-end Workflow
addyosmani
1371
200k
Why Our Code Smells
bkeepers
PRO
340
57k
Producing Creativity
orderedlist
PRO
348
40k
BBQ
matthewcrist
89
9.9k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
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貢献のチャンス!