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
360
熊でもわかる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
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
3
320
事業貢献を考えるための技術改善の目標設計と改善実績 / Targeted design of technical improvements to consider business contribution and improvement performance
oomatomo
0
100
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
210
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
210
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
終了の危機にあった15年続くWebサービスを全力で存続させる - phpcon2024
yositosi
19
18k
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
200
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
210
KnowledgeBaseDocuments APIでベクトルインデックス管理を自動化する
iidaxs
1
270
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
270
非機能品質を作り込むための実践アーキテクチャ
knih
5
1.5k
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Rails Girls Zürich Keynote
gr2m
94
13k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Being A Developer After 40
akosma
87
590k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Site-Speed That Sticks
csswizardry
2
190
Large-scale JavaScript Application Architecture
addyosmani
510
110k
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ʹ͍ͭͯͬͱਂ۷Γ͍ͯͥ͘͠ όοΫΤϯυ