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 を支える Constructs について
Search
acomagu
January 10, 2021
Programming
0
170
AWS CDK を支える Constructs について
acomagu
January 10, 2021
Tweet
Share
More Decks by acomagu
See All by acomagu
Stripe SSoT をするべきか否か
acomagu
0
52
JP_Stripes: リコンサイル(突合処理)のテスト
acomagu
0
98
「境界付けられたコンテキスト間の関係」についてもっと語ろう
acomagu
0
94
地方 MaaS 事例: アプリの進化に伴って変化してきた Stripe 利用方法
acomagu
0
320
Stripe リコンサイルの勘所
acomagu
0
490
CDK 一発で全てのエラーログを Slack に流す
acomagu
0
2.2k
DDDとは結局何なのか
acomagu
0
350
API Gateway HTTP API について
acomagu
0
140
JP_Stripes: 一貫性に寄与する設計
acomagu
0
97
Other Decks in Programming
See All in Programming
(Extension DC 2025) Actor境界を越える技術
teamhimeh
1
250
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
130
オープンソースソフトウェアへの解像度🔬
utam0k
15
2.8k
XP, Testing and ninja testing ZOZ5
m_seki
3
630
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
510
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
2
840
Cloudflare AgentsとAI SDKでAIエージェントを作ってみた
briete
0
140
dynamic!
moro
10
7.7k
Web フロントエンドエンジニアに開かれる AI Agent プロダクト開発 - Vercel AI SDK を観察して AI Agent と仲良くなろう! #FEC余熱NIGHT
izumin5210
3
520
CI_CD「健康診断」のススメ。現場でのボトルネック特定から、健康診断を通じた組織的な改善手法
teamlab
PRO
0
210
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
160
CSC305 Lecture 05
javiergs
PRO
0
210
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
30
2.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
The Cult of Friendly URLs
andyhume
79
6.6k
How to train your dragon (web standard)
notwaldorf
96
6.3k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
Why Our Code Smells
bkeepers
PRO
339
57k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Documentation Writing (for coders)
carmenintech
75
5.1k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Visualization
eitanlees
149
16k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
How GitHub (no longer) Works
holman
315
140k
Transcript
AWS CDK を支える Constructs について @acomagu
AWS CDK とは Constructs Programming Model で CloudFormation Template を記述するための
ライブラリである
Costructs Programming Model とは? Construct と呼ばれるオブジェクトのツリー構造で任意の設定ファイルを生成する方法 github.com/aws/constructs に Constructs Programming
Model を実践するための支 援ライブラリがある。
Costructs Programming Model とは? Source Code
Costructs Programming Model とは? Source Code
Costructs Programming Model とは? Source Code
Costructs Programming Model とは? Source Code
Costructs Programming Model とは?
Question こうするには?
Answer
何が言いたいか: Construct のツリー構造がそのまま結果の構造になるわけではない (iff. 結果の構造がそのまま Construct のツリー構造に反映されるわけではない)
じゃあ ここって何に使うの...? →
じゃあ ここって何に使うの...? → 答え: 抽象化
抽象化する Source Code
抽象化する Source Code
抽象化する Source Code
抽象化する
何が嬉しいの?
何が嬉しいの?
何が嬉しいの?
何が嬉しいの? ライブラリ
何が嬉しいの?
実際の AWS CDK でどうなっているか
何が省略されているか - よく練られたデフォルト値 - lambda.Function も実際には CloudFormation の Function Resource
だけでな く、Deployment、CloudWatch(Log)、ServiceRole などを含んでいる - インターフェースやメソッドを駆使して設定を表現できる
その他やっていること - LambdaFunctionFactory という、Lambda.Function を作るための便利関数を作っ てたりする - ログの設定やデプロイ周りのコードがまとまっていたりする - ApiGatewayV2
というリソースがまだ完全に L2 Construct ライブラリ化されていな いので、社内で自作のものを共有している - 実質 CloudFormation のテンプレートをそのまま書くのと変わらないので、 CloudFormation に慣れ ていれば簡単 - 「特定の文字列が含まれるログを Slack に通知する」という機能を実現する Construct を OSS で公開している(TheDesignium/cdk-log-notifier)
まとめ - Constructs Programming Model とは Construct と呼ばれるオブジェクトのツリー 構造で設定ファイルを記述するパターンである -
AWS CDK とは Constructs Programming Model で CloudFormation Template を記述するための技術(ライブラリ群)である