Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
210
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
600
Androidエンジニアが Flutterでアプリを リリースするまでの苦悩
yoppie
0
480
Navigation Component 実践編
yoppie
1
220
FragmentContainerViewとは
yoppie
0
640
Recent tips collection
yoppie
0
870
Distribute Android app updates with bitrise
yoppie
0
1.3k
sabotage
yoppie
1
880
Play with Kotlin
yoppie
1
550
Other Decks in Technology
See All in Technology
イベントをどう管理するか
mikanichinose
1
110
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
0
15k
GDGoC開発体験談 - Gemini生成AI活用ハッカソン / GASとFirebaseで挑むパン屋のフードロス解決 -
hotekagi
1
730
40歲的我會給20歲的自己,關於軟體開發的7個建議
line_developers_tw
PRO
0
2.2k
WED Company Deck for Engineer
wed
2
3.7k
知らない景色を見に行こう チャンスを掴んだら道が開けたマネジメントの旅 / Into the unknown~My management journey~
kakehashi
10
1.1k
ファインディの4年にわたる技術的負債の返済 / Repaying 4 Years of Technical Debt at Findy
ma3tk
7
3.7k
ONNX推論クレートの比較と実装奮闘記
emergent
0
290
PostgreSQL Conference Japan 2024 A4 Comparison of column-oriented access methods
nori_shinoda
0
140
開志専門職大学特別講義 2024 デモパート
1ftseabass
PRO
0
210
開志専門職大学特別講義 2024 オープニング
1ftseabass
PRO
0
230
12/4(水)のBedrockアプデ速報(re:Invent 2024 Daily re:Cap #3 with AWS Heroes)
minorun365
PRO
2
410
Featured
See All Featured
Music & Morning Musume
bryan
46
6.2k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Building Applications with DynamoDB
mza
91
6.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Making the Leap to Tech Lead
cromwellryan
133
9k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Why Our Code Smells
bkeepers
PRO
334
57k
Writing Fast Ruby
sferik
627
61k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
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