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
Try Infrastructure as Code with AWS CDK!
Search
@twingo_b
September 04, 2021
Technology
1
410
Try Infrastructure as Code with AWS CDK!
AWS CDK で Infrastructure as Code にチャレンジ!
合同勉強会 in 大都会岡山 – 2021 Summer Online - LT
2021.09.04
@twingo_b
September 04, 2021
Tweet
Share
More Decks by @twingo_b
See All by @twingo_b
20240713 Generative AI with AWS
twingob
6
600
Amazon RDS / Amazon Aurora パフォーマンスチューニングとモニタリング
twingob
9
2.4k
短縮 URL サービス 4分間クッキング - Amazon CloudFront KeyValueStore, CloudFront Functions, AWS CDK で作成、CloudWatch Logs で簡易アクセス集計 -
twingob
1
1.1k
失敗知識から学ぶ!クラウドアプリ設計で避けるべき事例とその対策
twingob
11
5.4k
Amazon CodeCatalyst と Amazon CodeWhisperer で開発を加速しよう!
twingob
1
760
AWS Copilot with AWS CDK
twingob
1
510
Amazon Redshift Serverless with CDK
twingob
1
1.7k
Rapid Prototyping with AWS
twingob
0
460
Using cdk-remote-stack and AWS Edge Networking Services for cross-regional applications
twingob
0
340
Other Decks in Technology
See All in Technology
Explainable Software Engineering in the Public Sector
avandeursen
0
180
EMの仕事、あるいは顧客価値創出のアーキテクト
radiocat
0
120
30代エンジニアが考える、エンジニア生存戦略~~セキュリティを添えて~~
masakiokuda
4
1.9k
生成AIで生産性向上
tomuro
0
240
バックエンドエンジニアによるフロントエンドテスト拡充の具体的手法
kinosuke01
1
400
心に火を灯すヒントは自分の中にある/The clue to lighting a fire in your heart is within you.
bitkey
1
130
目次機能実装から理解するLexical Editor
wtdlee
0
120
BCMathを高速化した一部始終をC言語でガチ目に解説する / BCMath performance improvement explanation
sakitakamachi
2
580
コード品質向上で得られる効果と実践的取り組み
ham0215
0
170
非エンジニアにも伝えるメールセキュリティ / Email security for non-engineers
ykanoh
13
3.5k
株式会社イングリウッド_中途エンジニア採用会社説明資料
ig_umemotoryo
0
150
fukuoka.ts #3 社内でESLintの共通設定を配りたい2025年春版
pirosikick
1
260
Featured
See All Featured
Music & Morning Musume
bryan
46
6.4k
Speed Design
sergeychernyshev
28
850
Writing Fast Ruby
sferik
628
61k
Facilitating Awesome Meetings
lara
53
6.3k
The World Runs on Bad Software
bkeepers
PRO
67
11k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
134
33k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
101
18k
Git: the NoSQL Database
bkeepers
PRO
429
65k
Transcript
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. アマゾン ウェブ サービス ジャパン株式会社 ソリューションアーキテクト 藤原 吉規 @twingo_b AWS CDK で Infrastructure as Code にチャレンジ︕ 合同勉強会 in ⼤都会岡⼭ – 2021 Summer Online - LT 2021.09.04
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. AWS の環境を構築するには
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. ⼿動操作(マネジメントコンソール) 〇 始めるのは簡単 × 繰り返し可能ではない × エラーが起きやすい × 時間がかかる High level Low level Manual 管理レベル 操作⼿順書が別途必要
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. スクリプト (SDK, CLI) ︖ APIコールが失敗したら何が起こる︖ ︖どうやってアップデートする︖ ︖リソースが準備完了なのはどうやって知る︖ ︖どうやってロールバックする︖ Scripted Manual High level Low level 管理レベル 操作⼿順の定義が可能
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. プロビジョニング ツール (CloudFormation など) AWS CloudFormation テ ンプレート (JSON/YAML) HashiCorp Configuration Language (HCL) あるべき状態の定義が可能 Declarative Scripted Manual High level Low level 〇⾃動化が容易 〇再⽣成可能 × ツール固有の記述⽅式 × 抽象化なし、詳細な記述 管理レベル CloudFormationや Terraformで デプロイ
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. Document Object Models (DOMs) Troposphere Python SparkleFormation Ruby GoFormation Go … if⽂、for ループ、IDE利⽤可能 例えば、TroposphereでVPCを作成するには128⾏必要 〇 リアルコード 〇 あるべき状態の定義 × 抽象化は組み込まれていない DOMs Declarative Scripted Manual High level Low level 管理レベル CFnで デプロイ CFn テンプレート の⽣成 あるべき状態の定義がコードで可能
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. AWS CDK Application Stack(s) Construct Construct AWS CDK Componentized DOMs Declarative Scripted Manual High level Low level 管理レベル コードであるべき状態を定義 CFnで デプロイ CFn テンプレート の⽣成 あるべき状態の定義がコードで可能+抽象化 (Developer preview) Java
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. AWS CDK で構築を⾼速に
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. AWS CDK で構築を⾼速に • リファレンスの参照回数と試⾏錯誤が格段に少なくなる • 型定義(TypeScript)とエディタによるサジェスト • リソース間の依存関係把握が楽(オブジェクト指向) • CDK diff とテストによるチェック • 記述の絶対量が⼩さい • 最低限のパラメータ指定でリソースを作れる • つまり他⼈のコードを読むのも楽 • ⼀括タグ付けなどの便利機能 • 開発者を集めやすい • アプリケーション開発者が始めやすい
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. S3バケットのコード サジェスト: 必須プロパティ(?なし) オプションプロパティ(?あり) サジェスト︓ 型がわかる ⽂字列でなく ENUM で指定 L2 Constructは 少ないプロパティで 複数のリソースを まとめて構成可能 VPC作成のコード 複雑なものは コンストラクタでなく メソッドで追加する
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. AWS CDK の主なコンポーネント Auto Scaling CDK を構成する基本要素 CDK アプリケーションの基本要素 クラウドコンポーネントを表す CDK アプリケーションを操作するツール CloudFormation テンプレートを ⽣成・デプロイする
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. デモ
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved.
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. AWS CDK ドキュメントとワークショップ • [AWS Black Belt Online Seminar] AWS CDK • PDF: LINK • YouTube: LINK • GitHub: LINK • APIリファレンス: LINK • Developer Guide: LINK • Roadmap: LINK • RFCs: LINK • ワークショップ: LINK
© 2021, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank You!