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.5k
SREのキャリア、 あるいは生態 / #ya8
cohalz
11
1.5k
カンファレンスのボランティアスタッフって何やるの? / DAIMYO Meetup #4
cohalz
0
110
小さなものでも Step Functions / Serverless Meetup Fukuoka Re:boot
cohalz
0
140
ECSのCI/CD改善と標準化の取り組み / JAWS FESTA 2023 in Kyushu
cohalz
8
6.3k
ecspressoへの貢献を振り返る / JAWS-UG コンテナ支部 #24 ecspresso MeetUp
cohalz
1
6k
はてなフォトライフをECSに移行した話 / Hatena Engineer Seminar #20
cohalz
1
18k
SREの異動と働き方 〜はてなブログ編〜 / Hatena Engineer Seminar #13
cohalz
0
2.3k
Envoy.なんか / Kyoto.なんか #5
cohalz
1
160
Other Decks in Programming
See All in Programming
cmp.Or に感動した
otakakot
3
260
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
350
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
260
Macとオーディオ再生 2024/11/02
yusukeito
0
390
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
130
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
1.1k
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
210
Click-free releases & the making of a CLI app
oheyadam
2
120
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
Jakarta EE meets AI
ivargrimstad
0
740
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.3k
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
How to Ace a Technical Interview
jacobian
276
23k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Six Lessons from altMBA
skipperchong
27
3.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
110
49k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Designing Experiences People Love
moore
138
23k
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͔ͩΒͦ͜ߟ͑ͳ͍ͱ͍͚ͳ͍෦͋Δ