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
320
Hacking Phoenix Performance
ohr486
1
260
Plug & WAF
ohr486
2
410
elixirをプロダクションに導入する
ohr486
1
540
IEx maniacs
ohr486
4
510
Hack and Read Elixir
ohr486
2
630
Running App on AppRunner
ohr486
0
650
sponsor-talk-drecom-heisei-ruby-kaigi
ohr486
0
730
Other Decks in Technology
See All in Technology
不動産tech Product Night#2_AIことはじめ_GA橋本
takehikohashimoto
0
190
『GRANBLUE FANTASY: Relink』最高の「没入感」を実現するカットシーン制作手法とそれを支える技術
cygames
1
140
フルカイテン株式会社 採用資料
fullkaiten
0
32k
Envoy External AuthZとgRPC Extensionを利用した「頑張らない」Microservices認証認可基盤
andoshin11
0
250
watsonx.ai Dojo 環境準備について
oniak3ibm
PRO
0
300
Developer Experienceを向上させる基盤づくりの取り組み事例集
coconala_engineer
0
150
2024年のナビゲーション・フォーカス対応:Composeでキーボード・ナビゲーションをサポートしよう
tahia910
0
110
The XZ Backdoor Story
fr0gger
0
3.6k
やってやろうじゃないかメカアジャイル! / Let's do it, mechanical agile!
psj59129
1
670
OCI で始める!! Red Hat OpenShift / Get Started OpenShift on OCI
oracle4engineer
PRO
1
180
持続可能なソフトウェア開発を支える『GitHub CI/CD実践ガイド』
tmknom
7
1.4k
Jetpack Compose Modifier 徹底解説 / Jetpack Compose Modifier
wiroha
0
200
Featured
See All Featured
BBQ
matthewcrist
83
9.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
Embracing the Ebb and Flow
colly
83
4.4k
GitHub's CSS Performance
jonrohan
1030
450k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
38
9.2k
Web Components: a chance to create the future
zenorocha
309
42k
Making Projects Easy
brettharned
113
5.8k
Typedesign – Prime Four
hannesfritz
39
2.3k
Optimizing for Happiness
mojombo
375
69k
Mobile First: as difficult as doing things right
swwweet
221
8.8k
Building Flexible Design Systems
yeseniaperezcruz
325
38k
[RailsConf 2023] Rails as a piece of cake
palkan
48
4.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貢献のチャンス!