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
650
Hacking Phoenix Performance
ohr486
1
410
Plug & WAF
ohr486
2
560
elixirをプロダクションに導入する
ohr486
1
740
IEx maniacs
ohr486
4
670
Hack and Read Elixir
ohr486
2
820
Running App on AppRunner
ohr486
0
870
sponsor-talk-drecom-heisei-ruby-kaigi
ohr486
0
910
Other Decks in Technology
See All in Technology
背中から、背中へ /paying forward to community
naitosatoshi
0
210
飲食店もAIで。レジ締めやハンディシステムをつくってる話 / Using AI for restaurant management
vtryo
0
230
Baseline対応のDOMの型定義を作った
uhyo
2
650
依頼文化をやめる日 EM視点で語るPlatform EngineeringとInclusive SRE / Discussing Platform Engineering and Inclusive SRE from an EM's Perspective
shin1988
0
150
なぜ人は自分のプロジェクトを 「なんちゃってアジャイル」と 自嘲するのか
kozotaira
0
240
CVE-2026-20833_脆弱性対応とAES 化について
jukishiya
0
350
cccccc
moznion
0
1.7k
勉強会企画をアプリで構造化してみた 〜そこで見えた、AIとの付き合い方〜 / I've structured a study group plan using an app.
pauli
0
300
「ちゃんとやっている」は独りよがりだった ― 不安に寄り添うインシデント対応へ / Towards incident response that addresses anxieties
chmikata
1
330
記録をかんたんに、提案をパーソナルに ── AIであすけんが目指すもの
oprstchn
0
130
しぶいSRE: サーバから見えない障害にどう向き合うか。ラストワンマイルのデバッグ実践 / Shibui SRE
kanny
0
240
攻撃者がいなくてもAIエージェントはインシデントを起こす
nomizone
0
190
Featured
See All Featured
A better future with KSS
kneath
240
18k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
410
Large-scale JavaScript Application Architecture
addyosmani
515
110k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
460
New Earth Scene 8
popppiees
3
2.4k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
270
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
180
Designing for Timeless Needs
cassininazir
1
270
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
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貢献のチャンス!