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のインフラ構築ツールを比較してみよう
Search
ohori97
June 30, 2023
Technology
0
380
AWSのインフラ構築ツールを比較してみよう
https://infra365.connpass.com/event/277147/
ohori97
June 30, 2023
Tweet
Share
Other Decks in Technology
See All in Technology
現場が抱える様々な問題は “組織設計上” の問題によって生じていることがある / Team-oriented Organization Design 20250827
mtx2s
1
490
Delegate authentication and a lot more to Keycloak with OpenID Connect
ahus1
0
240
あなたの知らない OneDrive
murachiakira
0
230
生成AI利用プログラミング:誰でもプログラムが書けると 世の中どうなる?/opencampus202508
okana2ki
0
190
Engineering Failure-Resilient Systems
infraplumber0
0
130
Exadata Database Service on Dedicated Infrastructure セキュリティ、ネットワーク、および管理について
oracle4engineer
PRO
1
360
ウォンテッドリーのアラート設計と Datadog 移行での知見
donkomura
0
300
人と組織に偏重したEMへのアンチテーゼ──なぜ、EMに設計力が必要なのか/An antithesis to the overemphasis of people and organizations in EM
dskst
4
490
Rethinking Incident Response: Context-Aware AI in Practice - Incident Buddy Edition -
rrreeeyyy
0
130
知られざるprops命名の慣習 アクション編
uhyo
10
2.1k
生成AI活用のROI、どう測る? DMM.com 開発責任者から学ぶ「AI効果検証のノウハウ」 / ROI of AI
i35_267
4
150
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
2
20k
Featured
See All Featured
Balancing Empowerment & Direction
lara
2
580
Speed Design
sergeychernyshev
32
1.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
KATA
mclloyd
32
14k
Done Done
chrislema
185
16k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
480
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.4k
Thoughts on Productivity
jonyablonski
69
4.8k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Transcript
AWSのインフラ構築ツールを 比較してみよう おほり @ 6/24 インフラ技術基礎勉強会 #3 1
おしながき 1. 自己紹介 2. ツールの紹介 2.1. Rain 2.2. SAM /
SAM CLI 2.3. CDK / CDK Toolkit 2.4. Copilot CLI 3. まとめ 4. おわりに AWSが(発端や主体となって)開発しているインフラ構築ツール・フレームワークをご紹介 2
1. 自己紹介 おほり (Ayumu Horii) • 理工系出身 • クラウドアーキテクト歴 3年+
• IaC コンテナ技術が好き • 推し: こぎみゅん(サンリオキャラ) • 趣味: お散歩、バイク、VRChat … 3
2. ツールのご紹介 4
2.1 Rain aws cli の使いづらさを解消 5 https://github.com/aws-cloudformation/rain • CloudFormation を操作するためのCLIツール
• “aws cloudformation” コマンドの上位互換的な 存在 ◦ ひな形生成 ◦ テンプレート整形 ◦ イケてるログ表示 ◦ イケてるリソース一覧表示 • 巷の情報は少ない(が、シンプルなので別に困ら ない)
2.1 Rain (ひな型の生成) AWSTemplateFormatVersion: "2010-09-09" Description: Template generated by rain
Resources: MyInstance: Type: AWS::EC2::Instance Properties: AdditionalInfo: CHANGEME # Optional Affinity: CHANGEME # Optional AvailabilityZone: CHANGEME # Optional BlockDeviceMappings: - DeviceName: CHANGEME Ebs: # Optional DeleteOnTermination: false # Optional … 6 $ rain build AWS::EC2::Instance
2.2 SAM CFn + サーバレスアーキテクチャ特化 7 https://github.com/aws/aws-sam-cli • SAM (Serverless
Application Model) • サーバレスリソース用の短縮記法 ◦ 通常 CFn 記法の拡張 ◦ 短く読みやすい ◦ AWS がネイティブ対応 ◦ サーバレス系のみ(Lambda, DynamoDB, …) • テストツールが充実 ◦ コマンド一発でローカルLambdaをデプロイしてテ スト実行 ◦ CFn を介さずに Lambda を更新する SAM Acceralate • パイプライン構築もかんたん ◦ sam pipeline
2.2 SAM (記述量の削減) HelloWorldFunction: Type: AWS::Serverless::Function Properties: CodeUri: hello_world/ Handler:
app.lambda_handler Runtime: python3.9 Architectures: - x86_64 Events: HelloWorld: Type: Api Properties: Path: /hello Method: get Environment: Variables: TABLE_NAME: !Ref Table TABLE_ARN: !GetAtt Table.Arn Policies: - DynamoDBCrudPolicy: TableName: !Ref Table Table: Type: AWS::DynamoDB::Table Properties: AttributeDefinitions: - AttributeName: hello AttributeType: S BillingMode: PAY_PER_REQUEST KeySchema: - AttributeName: hello KeyType: HASH StreamSpecification: StreamViewType: NEW_AND_OLD_IMAGES 8
2.3 CDK 豊富なライブラリとコミュニティ 9 https://github.com/aws/aws-cdk • AWS CDK (Cloud Development
Kit) • インフラをプログラミング言語で記述 ◦ TypeScript, Python 等 ▪ TypeScriptなら型の恩恵を享受できる ◦ プログラミング言語と同じ開発体験 ◦ ライブラリを扱える ▪ 抽象化で記述量を大幅削減 ◦ 最終的に CFn テンプレートに変換 • 管理負荷は高め ◦ かなり頻繁な更新(良いこと) ◦ Node.js の管理 • 学習コストも高め ◦ CFnに加え、言語の知識が必要 • コミュニティが超活発 ◦ Construct Hub: 様々なライブラリが大量に公開 ◦ JAWS にも CDK 支部が存在
2.3 CDK (Construct Hub) 10
2.4 AWS Copilot CLI 誰でも簡単コンテナデプロイ 11 https://github.com/aws/copilot-cli • AppRunner と
ECS へのデプロイに特化したCLI ツール ◦ GitHub Copilot とは無関係 • インフラを意識せずコンテナをデプロイ ◦ 対話形式 ◦ ベストプラクティスな構成を自動適用 • 独自のリソース概念とテンプレート記法 ◦ AWSリソースを抽象化 ◦ 最終的には CFn でデプロイ • 拡張も可能(その気になれば) ◦ CFn テンプレートを追加してカスタムリソース を追加
2.4 Copilot CLI (対話形式) 12
3. まとめ 13
まとめ (むりやり比較表) Rain SAM CDK AWS Copilot こんな人向け CloudFormation を
もっと便利に使いたい サーバレス開発を 加速させたい プログラミング言語と コミュニティの恩恵を 受けたい コンテナを楽に デプロイ・運用したい 汎用性の高さ ★★★ ★★★ ★★★ ★★ 運用負荷の低さ ★★★ ★★★ ★★ ★★★ 難易度の低さ ★★ ★★ ★ ★★★ コミュニティの 活発さ(主観) ★★ ★★ ★★★ ★★ 14
4. おわりに 15
おわりに 16 • それぞれ用途が違うので、目的に合わせて選ぶと良い ◦ SAMとCDKを組み合わせる手法も存在 • 食わず嫌いは損!なんにせよ触ってみよう • 今回紹介できなかった方々
: Amplify CLI, CloudFormation CLI
弊社について 17 株式会社エーピーコミュニケーションズ(APC) • クラウドネイティブ環境の内製化・自動化支援 • 洒落たイベント会場(@神田本社) 貸し出してます • 最近
◦ カプセルトイを企画・発売(?) ◦ APN Certification Distinction 100 に認定