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
200
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.6k
Elixir/PhoenixによるWeb開発の現場から
ohr486
1
420
Hacking Phoenix Performance
ohr486
1
300
Plug & WAF
ohr486
2
460
elixirをプロダクションに導入する
ohr486
1
600
IEx maniacs
ohr486
4
560
Hack and Read Elixir
ohr486
2
680
Running App on AppRunner
ohr486
0
720
sponsor-talk-drecom-heisei-ruby-kaigi
ohr486
0
800
Other Decks in Technology
See All in Technology
速くて安いWebサイトを作る
nishiharatsubasa
10
13k
クラウドサービス事業者におけるOSS
tagomoris
1
830
アジャイル開発とスクラム
araihara
0
170
ホワイトボードチャレンジ 説明&実行資料
ichimichi
0
130
室長と気ままに学ぶマイクロソフトのビジネスアプリケーションとビジネスプロセス
ryoheig0405
0
370
データマネジメントのトレードオフに立ち向かう
ikkimiyazaki
6
980
Swiftの “private” を テストする / Testing Swift "private"
yutailang0119
0
130
人はなぜISUCONに夢中になるのか
kakehashi
PRO
6
1.7k
急成長する企業で作った、エンジニアが輝ける制度/ 20250214 Rinto Ikenoue
shift_evolve
3
1.3k
「海外登壇」という 選択肢を与えるために 〜Gophers EX
logica0419
0
710
滅・サービスクラス🔥 / Destruction Service Class
sinsoku
6
1.6k
開発スピードは上がっている…品質はどうする? スピードと品質を両立させるためのプロダクト開発の進め方とは #DevSumi #DevSumiB / Agile And Quality
nihonbuson
2
3k
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
4 Signs Your Business is Dying
shpigford
182
22k
Testing 201, or: Great Expectations
jmmastey
42
7.2k
How STYLIGHT went responsive
nonsquared
98
5.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.3k
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貢献のチャンス!