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
システム基盤としてのAWS活用 / System foundation by AWS
Search
cohalz
January 30, 2019
Programming
4
4.3k
システム基盤としてのAWS活用 / System foundation by AWS
Hatena Engineer Seminar #11
cohalz
January 30, 2019
Tweet
Share
More Decks by cohalz
See All by cohalz
はてなのSRE組織2024 / Road to SRE NEXT@福岡
cohalz
2
1.4k
SREのキャリア、 あるいは生態 / #ya8
cohalz
11
1.5k
カンファレンスのボランティアスタッフって何やるの? / DAIMYO Meetup #4
cohalz
0
98
小さなものでも Step Functions / Serverless Meetup Fukuoka Re:boot
cohalz
0
130
ECSのCI/CD改善と標準化の取り組み / JAWS FESTA 2023 in Kyushu
cohalz
8
6k
ecspressoへの貢献を振り返る / JAWS-UG コンテナ支部 #24 ecspresso MeetUp
cohalz
1
5.9k
はてなフォトライフをECSに移行した話 / Hatena Engineer Seminar #20
cohalz
1
18k
SREの異動と働き方 〜はてなブログ編〜 / Hatena Engineer Seminar #13
cohalz
0
2.2k
Envoy.なんか / Kyoto.なんか #5
cohalz
0
150
Other Decks in Programming
See All in Programming
文化が生産性を作る
jimpei
3
610
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
0
220
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
230
Hi, have you met Kotlin Multiplatform? | DevFest Vienna 2024
prof18
0
220
Golang と Erlang
taiyow
7
1.7k
CSC509 Lecture 06
javiergs
PRO
0
130
GPU Hash Table | レイトレ合宿10
yknishidate
0
120
画像でわかる北島直樹
naoki0917
0
100
空間の中でアイドルとレッスンする技術 - 1st "Vision" / Spatial Lesson technologies with my idol - 1st "Vision"
banjun
PRO
0
240
Successful with Signals: 3 Rules for Your Architecture
manfredsteyer
PRO
0
130
Quarto Clean Theme
nicetak
0
220
4年間変わらなかった YOUTRUSTのアーキテクチャ
daiki1003
2
670
Featured
See All Featured
Six Lessons from altMBA
skipperchong
26
3.4k
Visualization
eitanlees
143
15k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
250
How GitHub (no longer) Works
holman
311
140k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
A Philosophy of Restraint
colly
203
16k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
Unsuck your backbone
ammeep
668
57k
The Invisible Side of Design
smashingmag
297
50k
Agile that works and the tools we love
rasmusluckow
327
21k
Transcript
γεςϜج൫ͱͯ͠ͷ AWS׆༻ Hatena Engineer Seminar #11 id:cohalz
ࣗݾհ • id:cohalz / @cohalz • 2018৽ଔೖࣾ • γεςϜϓϥοτϑΥʔϜ෦ॴଐSRE
γεςϜج൫ͱ
γεςϜج൫ͱ • αʔϏε։ൃͷΛ্ͤ͞ΔΑ͏ͳɼ ଞͷSREΞϓϦέʔγϣϯΤϯδχΞ͏πʔϧ • αʔϏεͷʹεέʔϧ͢ΔΑ͏ͳͷ • σϓϩΠπʔϧӡ༻ΦϖϨʔγϣϯπʔϧͳͲछྨ༷ʑ
طଘͷγεςϜج൫ͷ՝ • खݩͰ࣮ߦ • ڥͷඋ͔Βඞཁ • ΦϖϨʔγϣϯ༻αʔόͰ࣮ߦ • ΦϖϨʔγϣϯαʔόͷอक͕ඞཁ •
ͦͦख࡞ۀͩͱ͍͏
γεςϜج൫ʹ͏AWSαʔϏε
AWS Lambda • AWSͷαʔόϨείϯϐϡʔςΟϯάڥ • ଞAWSαʔϏεͷ࿈ܞ
AWS LambdaͷϝϦοτ • AWSαʔϏεͱͷ࿈ܞ • APIܦ༝ͰෳαʔϏεͷΞΫγϣϯΛࣗಈԽ • ݖݶཧLambdaʹدͤΒΕΔ
αʔόϨεͷϝϦοτ αʔό͕ͳ͍͜ͱʹΑΔϝϦοτେ͖͍ • Մ༻ੑ • SLA99.95% • อकੑ • ΦϖϨʔγϣϯ༻αʔόɾόοναʔό͔Βͷղ์
AWS CloudFormation • YAMLϑΝΠϧͰهड़ͯ͠ɼAWSϦιʔεΛσϓϩΠͰ͖Δ • ݕূڥΛ͙͢࡞ΕΔ • มߋͷࣄલϨϏϡʔ • υΩϡϝϯτԽ
• ෆ۩߹࣌ͷΓ͠ • Infrastructure as Codeͷ࣮ફ
Lambda + CloudFormation ͷ։ൃεϐʔυΛ্͛ΔͨΊʹ
Serverless Application Model • ௨শSAM • AWSެࣜʹΑΔαʔόϨεڥϑϨʔϜϫʔΫ • CloudFormationͷ֦ு •
هड़ྔͷݮ • ։ൃʹศརͳCLIπʔϧ܈ • ϩʔΧϧ࣮ߦɾσϓϩΠ
AWSΛ׆༻͍ͯ͠Δج൫ͷྫ
ʮεέδϡʔϧ͞ΕͨΠϕϯτʯ ͷରԠ
Ϟνϕʔγϣϯ • EC2ͷΠϯελϯε࠶ىಈϦλΠΞ༧ࠂ͕དྷΔ • ࣄલʹରԠ͠ͳ͍ͱোʹͳΔ͜ͱ • Πϕϯτ͕͋ͬͨΒSlackʹ௨͢Δόον͕ಈ͍͍ͯͨ • Slack௨ΛݟͯissueʹखಈͰՃ͍ͯͨ͠ •
όοναʔόͷ໘ݟ͍ͯͨ
ొͷࣗಈԽ • ʮεέδϡʔϧ͞ΕͨΠϕϯτʯCloudWatch EventsͰΠ ϕϯτΛड͚औΔࣄ͕Ͱ͖Δ • LambdaΛ࣮ߦ͠ɼAPIܦ༝ͰGitHubͱGoogleΧϨϯμʔʹ ࣗಈͰՃ͢Δ
issue͕ࣗಈͰొ͞ΕΔ
خ͔ͬͨ͜͠ͱ • ຊདྷͷΠϕϯτରԠҎ֎ʹඞཁͳख࡞ۀͳ͘ͳͬͨ • ຊདྷΔ͖ରԠ͚ͩʹूதͰ͖ͨ • όοναʔόΛࢭΊΔ͜ͱ͕Ͱ͖ͨ
Let's Encryptূ໌ॻͷ ߋ৽ɾཧͷࣗಈԽ
Ϟνϕʔγϣϯ • ख࡞ۀͳ্ʹෳࡶ • ΦϖϨʔγϣϯαʔόͰ࣮ߦ • ূ໌ॻͷసૹͳͲؾΛ͚ͭͳ͍ͱ͍͚ͳ͍෦͋Δ • ఆظతʹൃੜ͢ΔׂΓࠐΈ •
ূ໌ॻͷ༗ޮظݶࡾϲ݄
ΞʔΩςΫνϟ 1. ར༻ऀऔಘ͍ͨ͠ূ໌ॻ༻ͷ CloudWatch EventsΛՃ 2. ఆظ࣮ߦ͞ΕɼLambda͕ূ໌ॻΛ औಘɾS3อଘ 3. S3όέοτ͔Βূ໌ॻΛऔಘͯ͠
Ϧϩʔυ
࣮ࡍͷಈ࡞ ϒϩά: http://developer.hatenastaff.com/entry/2018/12/11/133000
خ͔ͬͨ͜͠ͱ • ख࡞ۀ࠷ॳ͚ͩ • CloudWatch EventsʹΑΔఆظ࣮ߦ • ৴པੑ্ • Lambdaࣗମͷ৴པੑʹدͤΒΕΔ
• ূ໌ॻΛ҆શʹѻ͑ΔΑ͏ʹ • S3 + KMSʹΑΔՄ༻ੑͱػີੑ
OSSԽ • ࣾϦιʔεʹґଘͯ͠ͳ͍ͷͰOSSԽ • https://github.com/cohalz/CertUpdater
AWSͷγεςϜج൫Ͱେࣄͳ͜ͱ
ଞͷਓ͕ϝϯςͰ͖ΔΑ͏ʹ͢Δ • ࠓ·Ͱͷج൫ʹൺͯن͕େ͖͘ͳΓ͕ͪ • υΩϡϝϯτΛ͔ͬ͠Γ༻ҙ͢Δ • ͳΔ͘ެࣜͷπʔϧΛ͏ • Θ͔Βͳ͔ͬͨΒαϙʔτʹฉ͘
είʔϓɾڥք • ج൫͕Ͳ͜·ͰΔͷ͔͖ͬΓͤ͞Δ • ࿈ܞ͕͍͔͢͠Βܾͦ͜ΊΔ • ར༻ऀͷ͜ͱΛߟ͑Δ • Βͳ͍͍ͯ͘͜ͱΛҙࣝ
͜Ε͔ΒͷγεςϜج൫ • ΨΠυϥΠϯΛ࡞Δ • AWS୭Ͱ؆୯ʹѻ͑ͯ͠·͏ • ϚϧνΞΧϯτରԠ • ڞ௨ج൫ΛͲ͏ల։͍͔ͯ͘͠ʁ
·ͱΊ • ৴པੑͷͨΊʹLambdaΛج൫ͱͯ͠ར༻͍ͯ͠Δ • CloudFormationڞ௨ݴޠͱͯ͠ར༻ • SAMͷొʹΑΓɼαʔόϨεج൫ͷ։ൃ্ͨ͠ • AWS͔ͩΒͦ͜ߟ͑ͳ͍ͱ͍͚ͳ͍෦͋Δ