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
先人の教えに背いてCDKのスタックを分割した男の末路 / The fate of the ma...
Search
yayoi_dd
March 28, 2024
Technology
1
4.1k
先人の教えに背いてCDKのスタックを分割した男の末路 / The fate of the man who split the CDK stack
弥生株式会社 もくテク
インフラ構築、どうしてる? ~IaCの知見共有会~(2024/03/28)
https://mokuteku.connpass.com/event/311038/
yayoi_dd
March 28, 2024
Tweet
Share
More Decks by yayoi_dd
See All by yayoi_dd
“お客さま視点”を手に入れろ!! / Get the Customer’s Perspective!!
yayoi_dd
0
100
プロジェクト改善、まずは“ネタ出しの文化”から / Improving Projects Starts with a Culture of Idea Generation
yayoi_dd
0
100
使いにくい仕様を改善した件 / How We Improved a Difficult-to-Use Feature
yayoi_dd
0
110
弥生のQAエンジニア 品質保証活動と今後の課題 / Yayoi QA engineers, Quality assurance activities and future challenges
yayoi_dd
0
150
【弥生】20250130_AWSマルチアカウント運用セミナー登壇資料
yayoi_dd
2
4.8k
Amazon OpenSearchのコスト最適化とZeroETLへの期待 / Amazon OpenSearch Cost Optimization and ZeroETL Expectations
yayoi_dd
1
150
フロントエンドとバックエンド非同期連携パターンのセッションを見てきた話 / Talk about seeing a session on front-end and back-end asynchronous coordination patterns
yayoi_dd
0
98
reInventで学んだWebシステム運用のBadDayへの備え方 / How to Prepare for BadDay in Web System Operations Learned at reInvent
yayoi_dd
0
76
AWS reInventで感じた世界に見る生成AIの競争 / Competition in Generative AI as Seen Around the World at AWS reInvent
yayoi_dd
0
81
Other Decks in Technology
See All in Technology
AWS Top Engineer、浮いてませんか? / As an AWS Top Engineer, Are You Out of Place?
yuj1osm
2
210
Developer Advocate / Community Managerなるには?
tsho
0
120
Simplifying Cloud Native app testing across environments with Dapr and Microcks
salaboy
0
130
生成AIとM5Stack / M5 Japan Tour 2025 Autumn 東京
you
PRO
0
240
神回のメカニズムと再現方法/Mechanisms and Playbook for Kamikai scrumat2025
moriyuya
4
700
Performance Insights 廃止から Database Insights 利用へ/transition-from-performance-insights-to-database-insights
emiki
0
150
「AI駆動PO」を考えてみる - 作る速さから価値のスループットへ:検査・適応で未来を開発 / AI-driven product owner. scrummat2025
yosuke_nagai
3
810
防災デジタル分野での官民共創の取り組み (2)DIT/CCとD-CERTについて
ditccsugii
0
150
Escaping_the_Kraken_-_October_2025.pdf
mdalmijn
0
160
社内お問い合わせBotの仕組みと学び
nish01
1
550
SwiftUIのGeometryReaderとScrollViewを基礎から応用まで学び直す:設計と活用事例
fumiyasac0921
0
150
Geospatialの世界最前線を探る [2025年版]
dayjournal
1
200
Featured
See All Featured
A better future with KSS
kneath
239
18k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Making Projects Easy
brettharned
119
6.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Building an army of robots
kneath
306
46k
Code Reviewing Like a Champion
maltzj
525
40k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.7k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
Typedesign – Prime Four
hannesfritz
42
2.8k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Transcript
田邊慎史 © 2024 Yayoi Co., Ltd. All rights reserved. 先人の教えに背いてstackを分割した男の
末路
© 2024 Yayoi Co., Ltd. All rights reserved. ◼ 新サービスはCDKでインフラ構築をすることに
◼ 「CDKは触ったことないから色々不安だな……」 ◼ 「早速導入のために調べてみよう!」 ◼ 「CDKにはstackという概念があるらしい……」 新サービス開発中のある日
© 2024 Yayoi Co., Ltd. All rights reserved. ◼ CloudFormationのテンプレートの塊
◆ 参照も可能 stackって? Stack A Stack B Stack C
© 2024 Yayoi Co., Ltd. All rights reserved. ◼ CDK
開発者ガイド ベストプラクティスより o 「通常、できるだけ多くのリソースを同じスタックに保持する方が簡単なの で、分離したいことがわかっている場合を除き、リソースをまとめておいて ください。」 ◼ CDK実践勉強会のQ&Aより o 「必要のない限りはスタックを分割しないことをおすすめします」 o 「最初は1つのスタックからはじめて、CloudFormation のリソース数制限な どで問題が発生しそうであれば分割を検討するくらいでも十分な場合も多い かと思います」 stackは分けない方が良いらしい……
© 2024 Yayoi Co., Ltd. All rights reserved. 本当かなあ? デプロイ
したい デプロイ したくない スタックを分けることで柔軟にデプロイ可能! Stack A Stack B Stack C
© 2024 Yayoi Co., Ltd. All rights reserved. あれ?デプロイできない VPCエンドポイント
用のSGを作成 VPCエンドポイン ト用のSGのイン バウンドルール でECSのアクセス を許可 スタック間参照のリソースは編集不可! Stack A Stack B Stack C
© 2024 Yayoi Co., Ltd. All rights reserved. あれ?更新できない Stack
A Stack B Stack C ECSの環境変数で参照し ていたSecrets Manager のSecretを削除 環境変数での Secretの参照を 削除 他スタックで参照しているものは削除できない!
© 2024 Yayoi Co., Ltd. All rights reserved. ◼ スタックは分けない方が良い
◆ 分けるメリットがあるのは間違いない ◆ 分けることによるデメリットが大きすぎる ◼ 先人の言うことには従った方が良い ◆ 知見のある人に頼るなど ◆ 自分たちで判断した方が良いケースもあるので難しいが…… 結論