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
EC2 using Lumen and DynamoDB and SNS
Search
yoppie
June 18, 2019
Technology
1
260
EC2 using Lumen and DynamoDB and SNS
yoppie
June 18, 2019
Tweet
Share
More Decks by yoppie
See All by yoppie
AmperとFleetを使ったAndroidアプリ
yoppie
0
850
Androidエンジニアが Flutterでアプリを リリースするまでの苦悩
yoppie
0
530
Navigation Component 実践編
yoppie
1
260
FragmentContainerViewとは
yoppie
0
730
Recent tips collection
yoppie
0
980
Distribute Android app updates with bitrise
yoppie
0
1.4k
sabotage
yoppie
1
940
Play with Kotlin
yoppie
1
600
Other Decks in Technology
See All in Technology
Postman MCP 関連機能アップデート / Postman MCP feature updates
yokawasa
0
150
Evolution on AI Agent and Beyond - AGI への道のりと、シンギュラリティの3つのシナリオ
masayamoriofficial
0
170
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
2
20k
新卒(ほぼ)専業Kagglerという選択肢
nocchi1
1
2.2k
見てわかるテスト駆動開発
recruitengineers
PRO
4
280
AIとTDDによるNext.js「隙間ツール」開発の実践
makotot
5
660
広島発!スタートアップ開発の裏側
tsankyo
0
240
知られざるprops命名の慣習 アクション編
uhyo
10
2.4k
LLM時代の検索とコンテキストエンジニアリング
shibuiwilliam
2
1.1k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.6k
認知戦の理解と、市民としての対抗策
hogehuga
0
320
JOAI発表資料 @ 関東kaggler会
joai_committee
1
260
Featured
See All Featured
Optimizing for Happiness
mojombo
379
70k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
183
54k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
283
13k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
GitHub's CSS Performance
jonrohan
1031
460k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Why Our Code Smells
bkeepers
PRO
338
57k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Transcript
LumenΛಋೖͨ͠EC2ͱ DynamoDBͱSNS
֓ཁ • খنͷWebΞϓϦέʔγϣϯ • খنͷDB • ϝʔϧૹ৴ • ར༻ݴޠ PHPͱ͍͏റΓ
ٕज़બఆ • AWS EC2, DynamoDB, SNS • ϑϨʔϜϫʔΫ Lumen
Lumen
Lumen • Laravel͕ϕʔεͱͳ͍ͬͯΔ ϚΠΫϩϑϨʔϜϫʔΫ • খ͞ͳwebαʔϏε, RESTful API
Laravelͱͷҧ͍ • σΟϨΫτϦߏ • artisanίϚϯυ • Ϩεϙϯεͷ͞ • Etc…
Lumen ಋೖ
LumenͱDynamoDB
खॱ 1. laravel-dynamodbΛcomposerͰΠϯετʔϧ (aws-sdk͕ಋೖ͞ΕΔ) 2. bootstrap/app.phpͷमਖ਼ 3. config/dynamodb.phpͷ࡞
ιʔείʔυ
envϑΝΠϧ࡞ .env.local .env.dev .env.test .env.prod LocalStackΛͬͯϩʔΧϧͰDynamoDBΛΤϛϡϨʔτ͢Δ͜ͱΛ લఏͱ͍ͯ͠·͢ɻར༻͢Δϙʔτ4569Ͱ͢ɻ(ެࣜΑΓ) dev,test,prodڥશͯͰIAMΛͬͯೝূ͍ͤͯ͞·͢ɻ IAMΛ͏ͱೝূใΛιʔείʔυʹهड़͢Δඞཁ͕ͳ͍ͷͰྑ͍Ͱ͢ɻ
࣮ྫ ࠓճsave()ͱall()Λ͍·ͨ͠ɻ ͨͩɺRDBͰͳ͍DBʹରͯ͠ Eloquent ORMΛར༻͢Δͷ Ͳ͏ͳͷͩΖ͏ͱࢥͬͯ͠·͍·͢ɻ
LumenͱSNS
AWS SNS • ௨ΛૹΔ͜ͱ͕Ͱ͖ΔαʔϏε push௨ • ϝʔϧૹ৴SESͷํ͕͍͍ͯΔ • SESʹ౦ژϦʔδϣϯ͕ͳ͘ SNSʹ͋Δ
खॱ 1. AWS SDKͷಋೖ(্هͰಋೖࡁΈ) 2. bootstrap/app.phpͷमਖ਼ 3. config/sns.phpΛ࡞ 4. envϑΝΠϧΛ࡞
bootstrap/app.phpͷमਖ਼
config/sns.phpΛ ࡞
envϑΝΠϧ࡞ .env.local LocalStackΛͬͯϩʔΧϧͰSNSΛΤϛϡϨʔτ͢Δ͜ͱΛલఏͱ͍ͯ͠·͢ɻ ϩʔΧϧͰ࡞ࡁΈͷτϐοΫͷARNΛSNS_TOPIC_ARNʹهࡌ͠·͢ɻ ར༻͢Δϙʔτ4575Ͱ͢ɻ(ެࣜΑΓ)
envϑΝΠϧ࡞ .env.dev .env.test .env.prod dev,test,prodڥશͯͰIAMΛͬͯೝূ͍ͤͯ͞·͢ɻ IAMΛ͏ͱೝূใΛιʔείʔυʹهड़͢Δඞཁ͕ͳ͍ͷͰྑ͍Ͱ͢ɻ (SNS_CONNECTION֤ڥͰมߋ)
࣮ྫ
https://qiita.com/yoppie_x/items/ 9b4c6a578227d4ba5cda