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
熊でもわかるCI/CD/モダンインフラ Vol3 AWS CDK
Search
Shohei Kobayashi
June 12, 2022
Technology
0
350
熊でもわかるCI/CD/モダンインフラ Vol3 AWS CDK
AWS CDKについて勉強会を開きました。
Shohei Kobayashi
June 12, 2022
Tweet
Share
More Decks by Shohei Kobayashi
See All by Shohei Kobayashi
熊でもわかるFIDO2
srockstyle
0
100
CI/CD/インフラ勉強会Vol4 Amazon ECS編 Part1
srockstyle
0
120
熊でもわかるCI/CDモダンインフラ Github Action編
srockstyle
0
320
熊でもわかるCI/CD/モダンインフラVol1:用語を覚えよう編
srockstyle
0
490
Chefとnginxで作るPHPアプリケーションのReliable Blue Green Deployment
srockstyle
6
24k
Other Decks in Technology
See All in Technology
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
160
Platform Engineering for Software Developers and Architects
syntasso
1
520
SREによる隣接領域への越境とその先の信頼性
shonansurvivors
2
520
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
220
ハイパーパラメータチューニングって何をしているの
toridori_dev
0
140
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
いざ、BSC討伐の旅
nikinusu
2
780
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
750
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
1
2.3k
Featured
See All Featured
RailsConf 2023
tenderlove
29
900
A Tale of Four Properties
chriscoyier
156
23k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Happy Clients
brianwarren
98
6.7k
Docker and Python
trallard
40
3.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Transcript
"84$%,ฤ "84Ϧιʔεͷ࡞ͱ&$4ͷσϓϩΠ·Ͱ ۽ͰΘ͔Δ$*$%ϞμϯΠϯϑϥ
զ ΤϯδχΞྺɿ͘Β͍ ۀքɿ8FC͔ͬ ݴޠɿ3VCZͱ3BJMT 1)11ZUIPO1FSM͘Β͍ʢΕ͕ͪʣ Πϯϑϥ͖ͬͯͨྺʹΤϯδχΞྺ %/4αʔόͱ͔ϝʔϧαʔό࡞ͬͯ·ͨ͠ ࠷ۙͬͺΒ3BJMT͍ͷϑϦʔϥϯεɻ ͖ͳ%/4αʔόͷϛυϧΣΞɿEKCEOT ͖ͳϝʔϧαʔόͷϛυϧΣΞɿ2NBJM
͖ͳ.Z42-ͷίϚϯυTIPXTMBWFTUBUVT ͖ͳ"84ϓϩμΫτ&MBTUJD.BQ3FEVDF ͖ͳ($1ϓϩμΫτ$MPVESVO ͖ͳ$*$%πʔϧ(JUIVC"DUJPO &$4ᘳʹཧղͨ͠ কདྷͷເηΩϡϦςΟΤϯδχΞɻ
$JSDMF$*͍͍ͧʂʂʂʂ
લճ·Ͱͷ͓͞Β͍
Πϯϑϥͱιʔείʔυͷద༻ͷྲྀΕ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ϩʔΧϧ͔Βຊ൪·Ͱͷ͓͞Β͍ɻ "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 ։ൃऀͷϩʔΧϧ
୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ σϓϩΠ
ܧଓతYYYʹ͍ͭͯ 1SPEVDUJPOڥ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ σϓϩΠ ܧଓతΠϯςάϨʔγϣϯ ܧଓతσϦόϦʔ
ܧଓతσϓϩΠϝϯτ
%PDLFS*NBHF Πϝʔδ࡞ޙίϯςφΛཧ͢Δ3FQPTJUPSZʹQVTI͠·͢ɻ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ σϓϩΠ EPDLFSCVJME EPDLFSUBH
EPDLFSQVTI 1SPEVDUJPOڥ %PDLFS3FQPTJUPSZ
$*ͰΔϑϩʔجຊ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ։ൃࣗಈɾຊ൪࠷ऴεςοϓͷΈखಈ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ
σϓϩΠ४උ σϓϩΠ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ %FWFMPQNFOU 1SPEVDUJPO ։ൃڥNBJOʹQVTIͱಉ࣌ʹσϓϩΠ·Ͱߦ͏ ຊ൪ڥखಈͰσϓϩΠͷΈߦ͏ σϓϩΠ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ
$*ͰΔϑϩʔجຊͦͷ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ຊ൪ͷσϓϩΠ४උNBJOʹQVTI࣌ʹߦ͏ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ
σϓϩΠ४උ σϓϩΠ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ %FWFMPQNFOU 1SPEVDUJPO σϓϩΠ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ ͜ͷεςοϓͰຊ൪ͷ४උߦ͏
$*ͰΔϑϩʔجຊͦͷ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB σϓϩΠ४උͰߦ͏͜ͱ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ
σϓϩΠ४උ σϓϩΠ %FWFMPQNFOU EPDLFSCVJME EPDLFSUBH EPDLFSQVTI EPDLFSCVJME EPDLFSUBH EPDLFSQVTI "NB[PO&MBTUJD$POUBJOFS3FHJTUPSZ
$*ͰΔϑϩʔجຊͦͷ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS σϓϩΠͰߦ͏͜ͱ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ
σϓϩΠ "NB[PO&MBTUJD$POUBJOFS3FHJTUPSZ &$44FSWJDF5BTLVQEBUF &$45BTL%F fi OJUJPOVQEBUF NJHSBUJPO &$4ͷઃఆΛมߋ͢ΔͷͰ "84$%,5FSSBGPSNͰ ߦ͏͜ͱ͕ଟ͍Ͱ͢
(JUIVC"DUJPO "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ͦΕͧΕͷεςοϓΛZBNMϑΝΠϧͰఆ͍ٛͯ͘͠ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ
σϓϩΠ४උ σϓϩΠ UFTUZBNM MJOUZBNM CSBLFNBOZBNM EFQMPZZBNM CVJMEZBNM YAML YAML YAML YAML YAML
ࠓճͷςʔϚ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS σϓϩΠίϚϯυʮDELEFQMPZʯʹ͍ͭͯͥ͢ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ
σϓϩΠ ʮDELEFQMPZʯ
"84$%,ͱ
"84ϦιʔεΛίʔυͰఆٛ͢Δπʔϧ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ίʔυͰ"84ϦιʔεΛఆٛɺ࣮ߦ͢ΔͱϦιʔε͕࡞͞ΕΔ "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 ։ൃऀͷϩʔΧϧ
cdk deploy WQDTUBDLUT SETTUBDLUT Ϧιʔε࡞ʂ Ϧιʔεఆٛʂ
࣮ࡍͷίʔυ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB &$4ͷΫϥελΛ࡞͢Δίʔυ "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4
࣮ࡍͷίʔυ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB &$4ͷΫϥελΛ࡞͢Δίʔυ "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 Infrastructure
as Code खಈͷϓϩηεͰͳ͘ίʔυΛ༻ͯ͠ ΠϯϑϥετϥΫνϟͷཧͱϓϩϏδϣχϯάΛߦ͏͜ͱ
"84$%,ͷ࣮ߦखॱ ίʔυͰ"84ϦιʔεΛఆٛɺ࣮ߦ͢Δͱ$MPVE'PSNBUJPO͕ు͖ग़͞ΕΔ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 ։ൃऀͷϩʔΧϧ
cdk deploy WQDTUBDLUT SETTUBDLUT 5ZQF4DSJQUΛ $MPVE'PSNBUJPOͷελοΫʹม Ϧιʔεఆٛʂ CloudFormation ֤छϦιʔε࡞ AWS Local
"84$%,ͷελοΫͷهड़ ෳͷݴޠͰهड़Ͱ͖Δʢωοτͷใ5ZQF4DSJQU͕ଟ͍ҹʣ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 ։ൃऀͷϩʔΧϧ
cdk deploy WQDTUBDL SETTUBDL 5ZQF4DSJQUΛ $MPVE'PSNBUJPOͷελοΫʹม CloudFormation ֤छϦιʔε࡞ AWS Local
"84$%,ͷσΟϨΫτϦߏ $%,JOJUΛ࣮ߦ͢Δͱ͜ͷܗ͕࡞ΒΕΔ ։ൃऀͷϩʔΧϧ Local WQDTUBDLUT SETTUBDLUT $ cdk init sample-app
--language typescript
"84$%,ͷσΟϨΫτϦߏͦͷ 5ZQF4DSJQUͳͷͰJNQPSU͢Ε͍͍ͷͰɺ͜Μͳ;͏ʹڞ௨ͷͷॻ͖ग़͍͍ͯ͠ ։ൃऀͷϩʔΧϧ Local WQDTUBDLUT SETTUBDLUT *OUFSGBDFॻ͖ग़͔͢·ͨผͱͯ͜͠Εྫ
"84$%,ͷσΟϨΫτϦߏͦͷ CJOҎԼͷϑΝΠϧͰJNQPSU͢Ε͍͍ͷͰɺຊ൪༻ͱ։ൃ༻ͷύϥϝʔλΛ༻ҙ͢Δͱָ ։ൃऀͷϩʔΧϧ Local WQDTUBDLUT SETTUBDLUT
"NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ิͷਤɻ όοΫΤϯυ ։ൃऀͷϩʔΧϧ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ
%FWFMPQNFOU 1SPEVDUJPO EFWUT QSPEUT "84$%,ͷσΟϨΫτϦߏͦͷิ
%#ͷใͲ͔͜ͷ"1*ͷBQJLFZɺBDDFTTUPLFO"844ZTUFN.BOBHFS͔4FDSFU.BOBHFSΛ͏ ػີใ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 ։ൃऀͷϩʔΧϧ
cdk deploy WQDTUBDLUT SETTUBDLUT CloudFormation ֤छϦιʔε࡞ AWS Local ػີใΛڥมͰ औΓࠐΉ
"NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB 54ϑΝΠϧʹ4ZTUFN.BOBHFS4FDSFU.BOBHFSͷ"3/Λॻ͘ όοΫΤϯυ ։ൃऀͷϩʔΧϧ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ
%FWFMPQNFOU 1SPEVDUJPO EFWUT QSPEUT ػີใ ։ൃ༻ػີใ ຊ൪༻ػີใ
"NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ΞϓϦέʔγϣϯଆڥมͰಡΈࠐΉΑ͏ʹ͓ͯ͘͠ όοΫΤϯυ ։ൃऀͷϩʔΧϧ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ
%FWFMPQNFOU 1SPEVDUJPO EFWUT QSPEUT ػີใ ։ൃ༻ػີใ ຊ൪༻ػີใ
"NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB $%,ͰڥมΛಡΈࠐΉΑ͏ʹॻ͘͜ͱ͕Ͱ͖Δɻ όοΫΤϯυ ։ൃऀͷϩʔΧϧ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ
%FWFMPQNFOU 1SPEVDUJPO EFWUT QSPEUT ػີใ ։ൃ༻ػີใ ຊ൪༻ػີใ
"84$%,ͱσϓϩΠ
σϓϩΠͷจ຺͓͞Β͍ "84ͷυΩϡϝϯτͱࠓ·ͰΒ͕ݴ͍ͬͯΔҙຯ߹͍ඍົʹݴͬͯΔ͜ͱ͕ҧ͏ ։ൃऀͷ͍͏σϓϩΠ "84ͷυΩϡϝϯτͷ͍͏σϓϩΠ खݩͷιʔείʔυΛຊ൪ʹద༻͢Δɻ %PDLFSJNBHFͱͯ͠͞ΕͨͷΛίϯςφͱͯ͠ىಈຊ൪ͷ&$4ʹϦϦʔε͢Δɻ
"NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB 4ZTUFN.BOBHFS4FDSFU.BOBHFS όοΫΤϯυ ։ൃऀͷϩʔΧϧ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ
%FWFMPQNFOU 1SPEVDUJPO EFWUT QSPEUT ४උػີใΛڥ༻ҙ ։ൃ༻ػີใ ຊ൪༻ػີใ
"NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ΞϓϦέʔγϣϯଆڥมͰಡΈࠐΉΑ͏ʹ͓ͯ͘͠ όοΫΤϯυ ։ൃऀͷϩʔΧϧ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ
%FWFMPQNFOU 1SPEVDUJPO EFWUT QSPEUT ४උΞϓϦͷඞཁͳใڥมͰ ։ൃ༻ػີใ ຊ൪༻ػີใ
४උ"84$%,ͰجຊϦιʔεΛ࡞ ίʔυͰ"84ϦιʔεΛఆٛɻඞཁͳϦιʔεΛ࡞͓ͬͯ͘ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 ։ൃऀͷϩʔΧϧ
cdk deploy WQDTUBDLUT SETTUBDLUT 5ZQF4DSJQUΛ $MPVE'PSNBUJPOͷελοΫʹม Ϧιʔεఆٛʂ CloudFormation ֤छϦιʔε࡞ AWS Local
४උ(JUIVC"DUJPOͰσϓϩΠ४උ·ͰΛఆٛ EPDLFSίϚϯυҰࣜ·Ͱߦ͍ɺ"84ͷDPOUBJOFS3FHJTUPSZʹQVTI·ͰΛ͓ͬͯ͘ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ EPDLFSCVJME EPDLFSUBH EPDLFSQVTI
EPDLFSCVJME EPDLFSUBH EPDLFSQVTI "NB[PO&MBTUJD$POUBJOFS3FHJTUPSZ
σϓϩΠ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS DELEFQMPZίϚϯυ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ
σϓϩΠ "NB[PO&MBTUJD$POUBJOFS3FHJTUPSZ &$44FSWJDF5BTLVQEBUF &$45BTL%F fi OJUJPOVQEBUF NJHSBUJPO DELEFQMPZ<ελοΫ໊>
࣮ԋ
·ͱΊ "84$%, "84Ϧιʔε࡞ΛίʔυͰఆٛͰ͖Δπʔϧɻ ΠϯϑϥఆٛΛίʔυͰߦ͏͜ͱΛ*OGSBTUSVDUVSFBTDPEFͱ͍͏ɻ 5ZQF4DSJQUͳͲΒ͕Α͘͏ݴޠͰهड़Ͱ͖Δ ࣮ࡍ$MPVE'PSNBUJPOͷδΣωϨʔλͰ͋Δ
σϓϩΠϑϩʔ ΞϓϦଆػີใڥมͰೖ͢ΔΑ͏ʹ͢Δ "84ଆͷػີใ"844FDSFU.BOBHFS4ZTUFN.BOBHFSΛ͏
࣍ճ༧ࠂ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS &$4ʹ͍ͭͯͬͱਂ۷Γ͍ͯͥ͘͠ όοΫΤϯυ