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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ohr486
June 02, 2019
Technology
220
3
Share
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.8k
Elixir/PhoenixによるWeb開発の現場から
ohr486
1
640
Hacking Phoenix Performance
ohr486
1
390
Plug & WAF
ohr486
2
540
elixirをプロダクションに導入する
ohr486
1
720
IEx maniacs
ohr486
4
650
Hack and Read Elixir
ohr486
2
800
Running App on AppRunner
ohr486
0
850
sponsor-talk-drecom-heisei-ruby-kaigi
ohr486
0
890
Other Decks in Technology
See All in Technology
20260423_執筆の工夫と裏側 技術書の企画から刊行まで / From the planning to the publication of technical book
nash_efp
3
400
ぼくがかんがえたさいきょうのあうとぷっと
yama3133
0
190
自分のハンドルは自分で握れ! ― 自分のケイパビリティを増やし、メンバーのケイパビリティ獲得を支援する ― / Take the wheel yourself
takaking22
1
900
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.1k
Practical TypeProf: Lessons from Analyzing Optcarrot
mame
0
330
AIはハッカーを減らすのか、増やすのか?──現役ホワイトハッカーから見るAI時代のリアル【MEGU-Meet】
cscengineer
0
140
AI駆動1on1〜AIに自分を育ててもらう〜
yoshiakiyasuda
0
120
[最強DB講義]推薦システム | 基礎編
recsyslab
PRO
1
170
AIを共同作業者にして書籍を執筆する方法 / How to Write a Book with AI as a Co-Creator
ama_ch
2
130
弁護士ドットコム株式会社 エンジニア職向け 会社紹介資料
bengo4com
1
150
Microsoft 365 / Microsoft 365 Copilot : 自分の状態を確認する「ラベル」について
taichinakamura
0
210
Pure Intonation on Browser: Building a Sequencer with Ruby
nagachika
0
110
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
730
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
HDC tutorial
michielstock
2
630
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
520
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.8k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
310
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.1k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
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貢献のチャンス!