$30 off During Our Annual Pro Sale. View Details »
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
330
熊でもわかるCI/CD/モダンインフラVol1:用語を覚えよう編
srockstyle
0
490
Chefとnginxで作るPHPアプリケーションのReliable Blue Green Deployment
srockstyle
6
24k
Other Decks in Technology
See All in Technology
How is Cilium Tested?
yutarohayakawa
5
230
Remix SPAモードのファイルベースルーティングで進めるフロントエンド構築
ryochike
0
140
PostgreSQL Conference Japan 2024 A4 Comparison of column-oriented access methods
nori_shinoda
0
110
プルリクが全てじゃない!実は喜ばれるOSS貢献の方法8選
tkikuc
17
2.2k
乗っ取れKubernetes!!~リスクから学ぶKubernetesセキュリティの考え方~/k8s-risk-and-security
mochizuki875
3
450
Autonomous Database サービス・アップデート (FY25)
oracle4engineer
PRO
0
230
Nihonbashi Test Talk #3_WebDriver BiDiと最新の実装状況 / WebDriver BiDi latest status
takeyaqa
1
130
ARRが3年で10倍になったプロダクト開発とAI活用の軌跡
akiroom
0
220
Kubernetesを知る
logica0419
17
4.7k
Amazon ECSとCloud Runの相互理解で広げるクラウドネイティブの景色 / Mutually understanding Amazon ECS and Cloud Run
iselegant
19
2.4k
ゆるSRE勉強会 #8 組織的にSREが始まる中で意識したこと
abnoumaru
2
990
LY Accessibility Guidelines @fukuoka_a11yconf_前夜祭
lycorptech_jp
PRO
1
140
Featured
See All Featured
RailsConf 2023
tenderlove
29
920
Code Reviewing Like a Champion
maltzj
520
39k
A Modern Web Designer's Workflow
chriscoyier
693
190k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
24k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
What's in a price? How to price your products and services
michaelherold
243
12k
KATA
mclloyd
29
14k
Optimizing for Happiness
mojombo
376
70k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Music & Morning Musume
bryan
46
6.2k
Bash Introduction
62gerente
608
210k
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ʹ͍ͭͯͬͱਂ۷Γ͍ͯͥ͘͠ όοΫΤϯυ