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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
acomagu
January 10, 2021
Programming
0
180
AWS CDK を支える Constructs について
acomagu
January 10, 2021
Tweet
Share
More Decks by acomagu
See All by acomagu
Payment Records API を使って地域通貨を Stripe Dashboard に統合してみた
acomagu
0
48
Restate x Stripe: 安心して眠れる決済システムを目指して
acomagu
0
9
Stripe SSoT をするべきか否か
acomagu
0
66
JP_Stripes: リコンサイル(突合処理)のテスト
acomagu
0
110
「境界付けられたコンテキスト間の関係」についてもっと語ろう
acomagu
0
140
地方 MaaS 事例: アプリの進化に伴って変化してきた Stripe 利用方法
acomagu
0
430
Stripe リコンサイルの勘所
acomagu
0
520
CDK 一発で全てのエラーログを Slack に流す
acomagu
0
2.2k
DDDとは結局何なのか
acomagu
0
400
Other Decks in Programming
See All in Programming
「抽象に依存せよ」が分からなかった新卒1年目の私が Goのインターフェースと和解するまで
kurogenki
0
110
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
2
280
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
460
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
580
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
850
株式会社 Sun terras カンパニーデック
sunterras
0
2.1k
How to stabilize UI tests using XCTest
akkeylab
0
120
SourceGeneratorのマーカー属性問題について
htkym
0
190
CSC307 Lecture 15
javiergs
PRO
0
240
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
210
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
130
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
100
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
710
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
120
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Become a Pro
speakerdeck
PRO
31
5.8k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
A designer walks into a library…
pauljervisheath
210
24k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
240
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 を記述するための技術(ライブラリ群)である