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
180
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.5k
Elixir/PhoenixによるWeb開発の現場から
ohr486
1
330
Hacking Phoenix Performance
ohr486
1
270
Plug & WAF
ohr486
2
420
elixirをプロダクションに導入する
ohr486
1
560
IEx maniacs
ohr486
4
530
Hack and Read Elixir
ohr486
2
650
Running App on AppRunner
ohr486
0
670
sponsor-talk-drecom-heisei-ruby-kaigi
ohr486
0
750
Other Decks in Technology
See All in Technology
Unlearn Modularity
lemiorhan
6
220
不要なリソースを自動で定期的に整理する方法 ~Sandboxアカウントのコストを削減しよう!~
amixedcolor
4
180
Perlで始めるeBPF: 自作Loaderの作り方 / Getting started with eBPF in Perl_How to create your own Loader
takehaya
1
1.1k
電子辞書にステータスバーを実装する
puhitaku
0
120
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
48k
いまいまMySQL2024 @ OSC Nagaoka
sakaik
2
170
テストを楽に書きたい
tomorrowkey
2
240
令和最新版 Perlコーディングガイド
anatofuz
5
4.2k
【㈱アイモバイル】エンジニア向け会社説明資料
imobile
0
480
Cosmos DB で持続可能な RAG を実現しよう!~ AOAI Dev Day ふりかえりを添えて / Sustainable RAG with Cosmos DB with recap AOAI Dev Day
miyake
0
150
新入社員 オンボーディング改善プロジェクト - シンプルな仕組みで変革のきっかけを
enpipi
0
210
Amplify Gen 2ではじめる 生成AIアプリ開発入門
tsukuboshi
0
340
Featured
See All Featured
A designer walks into a library…
pauljervisheath
202
24k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Statistics for Hackers
jakevdp
796
220k
From Idea to $5000 a Month in 5 Months
shpigford
381
46k
BBQ
matthewcrist
85
9.2k
Testing 201, or: Great Expectations
jmmastey
38
7k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Clear Off the Table
cherdarchuk
91
320k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
40
2.1k
Making the Leap to Tech Lead
cromwellryan
131
8.9k
Building Adaptive Systems
keathley
38
2.2k
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貢献のチャンス!