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
160
AWS CDK を支える Constructs について
acomagu
January 10, 2021
Tweet
Share
More Decks by acomagu
See All by acomagu
Stripe SSoT をするべきか否か
acomagu
0
40
JP_Stripes: リコンサイル(突合処理)のテスト
acomagu
0
70
「境界付けられたコンテキスト間の関係」についてもっと語ろう
acomagu
0
67
地方 MaaS 事例: アプリの進化に伴って変化してきた Stripe 利用方法
acomagu
0
240
Stripe リコンサイルの勘所
acomagu
0
410
CDK 一発で全てのエラーログを Slack に流す
acomagu
0
2.1k
DDDとは結局何なのか
acomagu
0
290
API Gateway HTTP API について
acomagu
0
130
JP_Stripes: 一貫性に寄与する設計
acomagu
0
91
Other Decks in Programming
See All in Programming
Strategic Design (DDD)for the Frontend @DDD Meetup Stuttgart
manfredsteyer
PRO
0
110
Devin入門と最近のアップデートから見るDevinの進化 / Introduction to Devin and the Evolution of Devin as Seen in Recent Update
rkaga
9
4.8k
custom_lintで始めるチームルール管理
akaboshinit
0
210
サービスレベルを管理してアジャイルを加速しよう!! / slm-accelerate-agility
tomoyakitaura
1
170
State of Namespace
tagomoris
4
870
マルチアカウント環境での、そこまでがんばらない RI/SP 運用設計
wa6sn
0
710
Django for Data Science (Boston Python Meetup, March 2025)
wsvincent
0
330
PHP で学ぶ OAuth 入門
azuki
1
160
Building Scalable Mobile Projects: Fast Builds, High Reusability and Clear Ownership
cyrilmottier
2
270
Signal-Based Data FetchingWith the New httpResource
manfredsteyer
PRO
0
170
The Evolution of the CRuby Build System
kateinoigakukun
0
110
国漢文混用体からHolloまで
minhee
1
180
Featured
See All Featured
For a Future-Friendly Web
brad_frost
176
9.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Testing 201, or: Great Expectations
jmmastey
42
7.4k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
[RailsConf 2023] Rails as a piece of cake
palkan
54
5.4k
KATA
mclloyd
29
14k
Building Adaptive Systems
keathley
41
2.5k
Agile that works and the tools we love
rasmusluckow
328
21k
What's in a price? How to price your products and services
michaelherold
245
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.1k
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 を記述するための技術(ライブラリ群)である