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
AWS初心者が苦労してCDKカスタムリソースを作った話 / AWS beginners str...
Search
yayoi_dd
March 28, 2024
Technology
1
2.5k
AWS初心者が苦労してCDKカスタムリソースを作った話 / AWS beginners struggled to create CDK custom resources
弥生株式会社 もくテク
インフラ構築、どうしてる? ~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
データの意味を適切に伝えましょう データ可視化のお手本/Conveying the Meaning of Data Appropriately: Exemplary Data Visualization
yayoi_dd
0
35
「失敗」から学ぶこと ~ソフトウェア開発と失敗の歴史~/Learning from 'Failures': The History of Software Development and Failures
yayoi_dd
0
40
ソフトウェアアーキテクチャーの基礎 エンジニアリングに基づく体系的アプローチ/Fundamentals of Software Architecture: A Systematic Approach Based on Engineering
yayoi_dd
0
42
ソフトウェア開発における「パーフェクトな意思決定」/Perfect Decision-Making in Software Development
yayoi_dd
2
2.8k
Lambdaの特徴を理解して活用する/Understanding and utilizing the features of Lambda
yayoi_dd
2
42
SIEM on Amazon OpenSearchで得たOSSを利用する上での教訓/Lessons learned when using OSS
yayoi_dd
1
41
RDS Aurora MySQLを用いたデータ連携でやらかした話/Story about when linking data using RDS Aurora MySQL
yayoi_dd
1
51
ライフサイクル考えられていますか/Do you think about lifecycle
yayoi_dd
1
46
プロンプトエンジニアリングに触れてみよう / Let's try prompt engineering!
yayoi_dd
1
2.6k
Other Decks in Technology
See All in Technology
信頼されるためにやったこと、 やらなかったこと。/What we did to be trusted, What we did not do.
bitkey
PRO
0
2.1k
Godot Engineについて調べてみた
unsoluble_sugar
0
330
OPENLOGI Company Profile for engineer
hr01
1
18k
The future we create with our own MVV
matsukurou
0
1.9k
AWS re:Invent 2024 re:Cap Taipei (for Developer): New Launches that facilitate Developer Workflow and Continuous Innovation
dwchiang
0
130
技術に触れたり、顔を出そう
maruto
1
130
今年一年で頑張ること / What I will do my best this year
pauli
1
210
チームが毎日小さな変化と適応を続けたら1年間でスケール可能なアジャイルチームができた話 / Building a Scalable Agile Team
kakehashi
1
210
2025年に挑戦したいこと
molmolken
0
130
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
1
340
Goで実践するBFP
hiroyaterui
1
110
I could be Wrong!! - Learning from Agile Experts
kawaguti
PRO
8
3.2k
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
94
13k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Visualization
eitanlees
146
15k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
A Tale of Four Properties
chriscoyier
157
23k
Done Done
chrislema
182
16k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
How GitHub (no longer) Works
holman
312
140k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
The Language of Interfaces
destraynor
155
24k
Transcript
AWS初心者が苦労して CDKカスタムリソース を作った話 弥生株式会社 岩佐
自己紹介 ▪ 岩佐 祐樹 ▪ 2021年1月1日中途入社 ▪ 会計Nextサブシステム開発チーム所属 ▪ 2023年6月頃からAWS、CDKを使い始める
カスタムリソースとは ▪ CloudFormationで非対応のリソースを作ることができる仕組み – CloudFormationでもできるしCDKでもできる ▪ 作られる実体はLambda Function – LambdaがAWS
SDKを実行して、リソースが作成される ▪ CDKが補完してくれている部分も自力で書く必要がある
作ったもの(一部) ▪ ECS(Fargate)の AutoScaling設定を作った ▪ MetricMathを使用して、 SQSキューに溜まった メッセージ数÷タスク数 =1タスク当たりの処理 可能件数になるように
ターゲット追跡でスケー リングする設定 ▪ 2023/12の時点でCLIでの 設定しか対応していな かった
良かったこと ▪ 環境差異やミスを無くせた – 手作業(しかもCLI)で設定しなければいけないものがコードで管理できる ようになった – 他のリソースと同じタイミングで作成できるようになった ▪ CDKのありがたみがわかった
– CDKが補完してくれている部分も気にする必要がある ▪ AWS SDKに少しだけ詳しくなった
悪かったこと ▪ 可読性が低くてメンテナンスしづらい ▪ カスタムリソースで作成したAWSリソースへのタグ付けは また別のカスタムリソースが必要になった ▪ 初心者には難しく、使いこなせていない – CDKが補完してくれていたところが多かった(のだろうという推測)
– AWS SDKで設定できることが多すぎて何が必要で何が不要かわからない
まとめ ▪ カスタムリソースを使うとCloudFormation非対応のリソースも コードで管理できる ▪ 保守性が低いので使いどころは考えたほうがいい ▪ 初心者にとっては良いことも悪いことも多い