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.2k
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.3k
Envoy.なんか / Kyoto.なんか #5
cohalz
0
160
Other Decks in Programming
See All in Programming
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
CSC509 Lecture 11
javiergs
PRO
0
180
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
280
C++でシェーダを書く
fadis
6
4.1k
Remix on Hono on Cloudflare Workers
yusukebe
1
280
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
1.9k
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
イベント駆動で成長して委員会
happymana
1
320
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Side Projects
sachag
452
42k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
How STYLIGHT went responsive
nonsquared
95
5.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
We Have a Design System, Now What?
morganepeng
50
7.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Building an army of robots
kneath
302
43k
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͔ͩΒͦ͜ߟ͑ͳ͍ͱ͍͚ͳ͍෦͋Δ