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
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
DynamoDB でスロットリングが発生したとき/when_throttling_occurs_in_dynamodb_short
emiki
0
260
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
13k
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
Lexical Analysis
shigashiyama
1
150
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
320
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
110
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
160
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
420
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
What's new in Ruby 2.0
geeforr
343
31k
Into the Great Unknown - MozCon
thekraken
32
1.5k
KATA
mclloyd
29
14k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Six Lessons from altMBA
skipperchong
27
3.5k
Building Applications with DynamoDB
mza
90
6.1k
Bash Introduction
62gerente
608
210k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
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ʹ͍ͭͯͬͱਂ۷Γ͍ͯͥ͘͠ όοΫΤϯυ