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
やらかした話 - ログ集約編
Search
uraura
January 21, 2021
Technology
760
0
Share
やらかした話 - ログ集約編
AWS Startup Tech Meetup Online#1
uraura
January 21, 2021
Other Decks in Technology
See All in Technology
世界の中心でApp Runnerを叫ぶ FINAL
tsukuboshi
0
220
Anthropic「Long-running a gents」をGeminiで再現してみた
tkikuchi
0
770
アクセシビリティはすべての人のもの
tomokusaba
0
240
小説執筆のハーネスエンジニアリング
yoshitetsu
0
910
GKE Agent SandboxでAIが生成したコードを 安全に実行してみた
lamaglama39
0
180
小さいVue.jsを30分で作る
hal_spidernight
0
130
Forget technical debt
ufried
0
160
AIと乗り切った1,500ページ超のヘルプサイト基盤刷新とさらにその先の話
mugi_uno
2
300
コミュニティ・勉強会を作るのは目的じゃない
ohmori_yusuke
0
280
「SaaSの次の時代」に重要性を増すステークホルダーマネジメントの要諦 ~解像度を圧倒的に高めPdMの価値を最大化させる方法~
kakehashi
PRO
3
3.6k
(きっとたぶん)人材育成や教育のような何かの話
sejima
0
440
データ定義の混乱と戦う 〜 管理会計と財務会計 〜
wonohe
0
170
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
106
240k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Being A Developer After 40
akosma
91
590k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
340
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Skip the Path - Find Your Career Trail
mkilby
1
110
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
270
Tell your own story through comics
letsgokoyo
1
910
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
160
Transcript
Β͔ͨ͠ - ϩάूฤ Tomohiro Urakawa @ AWS Startup Tech Meetup
Online#1
@corn3rl0ve • ΫϥελʔגࣜձࣾͰαʔόʔαΠυΤϯδχΞΛ͍ͬͯ·͢ • golangͰΞϓϦΛॻ͍ͨΓɼTerraformͰAWSʑͷϦιʔεཧͯͨ͠Γɼ ࠷ۙϞχλϦϯά·ΘΓʹڵຯ͕͋Γ·͢
cluster ͱ • PC/VR/εϚϗ͔ΒࢀՃͰ͖Δόʔνϟϧ SNS • ษڧձϥΠϒͳͲͷΠϕϯτ͕Ͱ͖ͨ Γɼࣗ࡞ήʔϜΛ࡞ͬͯެ։Ͱ͖ͨΓ • https://resources.awscloud.com/aws-
summit-online-japan-2020-on-demand- industry-4-10523/cus-64-aws-summit- online-2020-cluster-inc ͰͥΜͿ͠ΌΓ· ͨ͠
clusterͷαʔόʔαΠυ֓ཁ ग़ల: https://resources.awscloud.com/aws-summit-online-japan-2020-on-demand-industry-3-12034/cus-64-aws-summit-online-2020-cluster-inc
clusterͷαʔόʔαΠυ֓ཁ • ECS • HTTP API Server • ଓதͷϢʔβʔΛཧ͢ΔͨΊͷdaemonతͳαʔϏε •
ఆ࣌ͷόονδϣϒ (scheduled task) • EC2 • ۭؒͷମݧΛఏڙ͢ΔͨΊͷMQTTαʔόʔ • ۭؒͰඞཁͳใΛੜʗૹड৴͢ΔͨΊͷಠࣗαʔϏε • Lambda
clusterͷαʔόʔαΠυ֓ཁ • ECS • HTTP API Server • ଓதͷϢʔβʔΛཧ͢ΔͨΊͷdaemonతͳαʔϏε •
ఆ࣌ͷόονδϣϒ (scheduled task) • EC2 • roomͷମݧΛఏڙ͢ΔͨΊͷMQTTαʔόʔ • roomͰඞཁͳใΛੜʗૹड৴͢ΔͨΊͷಠࣗαʔϏε • Lambda CloudWatch Logs
clusterͷαʔόʔαΠυ֓ཁ • ECS • HTTP API Server • ଓதͷϢʔβʔΛཧ͢ΔͨΊͷdaemonతͳαʔϏε •
ఆ࣌ͷόονδϣϒ (scheduled task) • EC2 • roomͷମݧΛఏڙ͢ΔͨΊͷMQTTαʔόʔ • roomͰඞཁͳใΛੜʗૹड৴͢ΔͨΊͷಠࣗαʔϏε • Lambda CloudWatch Logs ΄΅ಉ͡ߏͰEFWTUHQSE ڥ "84ΞΧϯτ ଘࡏ
αʔόʔͷϩάΛؾܰʹݟΕΔͱௐࠪ ͕ḿͬͯศར͚ͩͲɽɽɽ
CloudWatch Logs͍͠ • ·ͣAWSͷϢʔβʔΞΧϯτ͕ඞཁ • ڥ͝ͱʹΞΧϯτผͳͷͰswitch-role͕ඞཁ • log-group, log-stream ͱɽɽɽ?
• f i lter͕͍͠ (׳Ε͕ඞཁ • Insights͕͍͠ (׳Ε͕ඞཁ
ϩάΛݟ͍͚ͨͩͳͷʹ ߟ͑Δ͜ͱ͕ଟ͗͢Δ
Elasticsearch ServiceʹೖΕͨ • Kibana͕ศར • dev͔Β͡Ίͯstg/prdల։ CloudWatch Logs Elasticsearch Service
Subscription f i lter
҆͗ͨ͢ • ར༻͢Δͷ99%prd༻ɼ͕ى͜Δͷ99%dev༻ • prd༻Ҏ֎ීஈ͋·Γར༻͠ͳ͍͕ɼ͕ى͖ͨΒରԠ͕ඞཁ • ઃఆมߋ͕͋Εશ෦ʹద༻͠ͳ͍ͱ͍͚ͳ͍ • ܽଛͨ͠ͱ͖ͷิ͕͍͠ •
ϩά͕ݟ͔ͭΒͳ͍? ͱࢥͬͨΒผڥͷKibanaΛݟ͍ͯͨ
Elasticsearch ServiceΛ1ͭʹ͠Α͏
1ͭͷElasticsearch Serviceʹूͨ͠ • ్தʹS3ΛڬΉ͜ͱͰηʔϒϙΠϯτ͕Ͱ͖ͨ • Lambdaࣦഊ࣌ʹϦτϥΠͯ͘͠ΕΔͷͰ΄΅ख์͠ʹͳͬͨ dev Elasticsearch Service Kinesis
Streams Kinesis Firehose S3 Output Lambda Event Noti f i cation Bulk API stg prd Subscription f i lter
ΊͰͨ͠
ͱ͍͔ͳ͔ͬͨ
͠Βͨͬͨ͋͘Δɽɽɽ • Domain status͕ Upgrade processing ͷ··ԿͰ͖ͳ͍ঢ়ଶʹ • • clusterͷstatusਅͬ
(※ը૾ࡱΓΕ) • Lambdaશ෦ࣦഊͯ͠ϦτϥΠ͍ͯͨ͠ͷͰɼݺग़ճʗॲཧ࣌ؒʗ ϩάग़ྗྔ͕͍͢͜͝ͱʹ • →݁ہ͜ͷDomainআ͢Δ͜ͱʹͳͬͯ͠·͍·ͨ͠
ഊҼ • Elasticsearch ServiceͷෛՙΛແବʹ૿େ͍ͤͯͨ͞ • ରͷlog-groupʹsubscription f i lterΛઃఆ͢Δ͚ͩɼͱ͍͏ঢ়ଶͩͬͨͷ Ͱɼ͋ΒΏΔlog-groupʹઃఆΛ͍Εͯ͠·ͬͨ
• ͋·ΓॏཁͰͳ͍ (ௐࠪʹར༻͠ʹ͍͘) ϩάେྔʹElasticsearch Serviceʹอଘ͞ΕΔ͜ͱʹͳͬͯ͠·ͬͨ • ϦτϥΠͷཞ༻ • ޭ͢ΔݟࠐΈ͕ͳ͍ͷʹϦτϥΠ͠ଓ͚Δঢ়ଶͩͬͨ
·ͱΊ • αʔϏεͷಛੑʗѻ͏σʔλʹ͍͋ͬͯΔ͔ • CloudWatch LogsΑΓElasticsearch Service͕ྑ͍ɼͱ͍͏Ͱͳ ͍ • উखʹϦτϥΠͯ͘͠ΕͯศརʙɼͰ͍͚ͳ͍
• త͕ζϨͯ͠·ͬͯͳ͍͔ • ʮௐࠪΛΓ͍ͨ͘͢͠ʯˠʮू͍ͨ͠ʯʹมΘͬͯ͠·ͬͯ ͍ͨ
͓ΘΓ
https://www.wantedly.com/projects/562252