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 CDKについて / about AWS CDK
Search
cohalz
January 25, 2019
Programming
1
2.1k
AWS CDKについて / about AWS CDK
YAPC::Tokyo 2019 前夜祭 LTソン
cohalz
January 25, 2019
Tweet
Share
More Decks by cohalz
See All by cohalz
はてなにおけるfujiwara-wareの活用やecspressoのCI/CD構成 / Fujiwara Tech Conference 2025
cohalz
3
2.9k
はてなのSRE組織2024 / Road to SRE NEXT@福岡
cohalz
2
1.6k
SREのキャリア、 あるいは生態 / #ya8
cohalz
11
1.6k
カンファレンスのボランティアスタッフって何やるの? / DAIMYO Meetup #4
cohalz
0
140
小さなものでも Step Functions / Serverless Meetup Fukuoka Re:boot
cohalz
0
180
ECSのCI/CD改善と標準化の取り組み / JAWS FESTA 2023 in Kyushu
cohalz
8
6.8k
ecspressoへの貢献を振り返る / JAWS-UG コンテナ支部 #24 ecspresso MeetUp
cohalz
1
6.5k
はてなフォトライフをECSに移行した話 / Hatena Engineer Seminar #20
cohalz
1
19k
SREの異動と働き方 〜はてなブログ編〜 / Hatena Engineer Seminar #13
cohalz
0
2.3k
Other Decks in Programming
See All in Programming
watsonx.ai Dojo #6 継続的なAIアプリ開発と展開
oniak3ibm
PRO
0
190
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
0
120
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
0
110
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
240
Azure AI Foundryのご紹介
qt_luigi
1
220
AHC041解説
terryu16
0
460
functionalなアプローチで動的要素を排除する
ryopeko
1
520
선언형 UI에서의 상태관리
l2hyunwoo
0
270
Запуск 1С:УХ в крупном энтерпрайзе: мечта и реальность ПМа
lamodatech
0
960
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
290
Fixstars高速化コンテスト2024準優勝解法
eijirou
0
190
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
220
Featured
See All Featured
How GitHub (no longer) Works
holman
312
140k
Thoughts on Productivity
jonyablonski
68
4.4k
Optimising Largest Contentful Paint
csswizardry
33
3k
GitHub's CSS Performance
jonrohan
1030
460k
Why Our Code Smells
bkeepers
PRO
335
57k
Building Applications with DynamoDB
mza
93
6.2k
Adopting Sorbet at Scale
ufuk
74
9.2k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Building an army of robots
kneath
302
45k
Typedesign – Prime Four
hannesfritz
40
2.5k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Transcript
AWS CDKʹ͍ͭͯ YAPC::Tokyo 2019 લࡇ LTιϯ id:cohalz
ࣗݾհ • id:cohalz / @cohalz • גࣜձࣾͯͳ SRE(ژ) • Perlະܦݧ
AWS CDKฉ͍ͨ͜ͱ͋Δਓ
AWS CDKͬͯΔਓ
AWS CDKͱ • https://awslabs.github.io/aws-cdk/ • AWSެࣜͷϑϨʔϜϫʔΫ • TypeScriptͰCloudFormationϦιʔεΛॻ͍ͯσϓϩΠ • ։ൃऀϓϨϏϡʔ
ͷஈ֊
Ϟνϕʔγϣϯ • ڊେͳYAMLಡΈॻ͖͍ͨ͠Ͱ͔͢ʁ • CFnͰෳࡶͳذͯ͠ͳ͍Ͱ͔͢ʁ
TypeScript • ܕʹΑΔิ • ߴͳϩδοΫͷ࣮ݱ • ϥΠϒϥϦͷΈ߹Θͤ
རͦΕ͚ͩʁ
CDK Construct Library • ҰൠతͳύλʔϯΛϥΠϒϥϦͱͯ͠ఏڙ • ར༻ऀͷهड़ྔΛେ෯ʹݮ • ެࣜϥΠϒϥϦͷଞʹࣗ࡞વՄೳ
࣮ࡍͷίʔυ const vpc = new ec2.VpcNetwork(this, 'MyVpc', { maxAZs: 2
}); const cluster = new ecs.Cluster(this, 'Cluster', { vpc }); const fargateService = new ecs.LoadBalancedFargateService(this, "FargateService", { cluster, image: ecs.ContainerImage.fromDockerHub("amazon/amazon-ecs-sample"), });
σϓϩΠπʔϧ • cdk deploy • TypeScriptΛॻ͍ͯͦͷ··σϓϩΠͰ͖Δ • cdk diff •
ਓ͕ؒಡΊΔมߋΛग़͢
ηΩϡϦςΟ • IAMͱSecurity GroupͷมߋΛܯࠂ
CDKͷϝϦοτ • SRE͔Β • ϦιʔεΛςϯϓϨʔτͱͯ͠ఏڙ͍͢͠ • ΞϓϦέʔγϣϯΤϯδχΞ͔Β • TypeScriptͩͱ৮Γ͍͢ •
ηΩϡϦςΟͷܯࠂخ͍͠
େมͳ͜ͱ͋Δ • Construct Libraryͱ͍ͬͯ͘ • தͰԿΛͬͯΔͷ͔֬ೝ͢Δͷ͍͠ • ར༻ऀগͳ͍ͷͰใ͕ͳ͍ • ؾ͕͍ͭͨΒຊਓτοϓͷίϯτϦϏϡʔλʹͳͬͯͨ
·ͱΊ • YAMLͰͳ͘TypeScriptͷ࣌ • CDKͷπʔϧ܈ຊʹศར • ։ൃऀϓϨϏϡʔதͳͷͰར༻ҙ