Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
AWS CDKを触ってみて
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Toru_Kubota
July 22, 2022
Technology
660
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AWS CDKを触ってみて
Toru_Kubota
July 22, 2022
More Decks by Toru_Kubota
See All by Toru_Kubota
ガバメントクラウドでのAWS DevOps Agentの活用
toru_kubota
2
88
制約が多いからこそ設計しがいがある!?公共領域でのAWSと生成AIの活用
toru_kubota
0
160
AWSアップデートから考える継続的な運用改善
toru_kubota
2
510
AWS Systems Managerのハイブリッドアクティベーションを使用したガバメントクラウド環境の統合管理
toru_kubota
1
350
ガバメントクラウド運用改善からSaaS製品の開発へ
toru_kubota
0
89
生成AI活用によるガバメントクラウド運用管理補助業務の効率化
toru_kubota
0
81
「どこにある?」の解決。生成AI(RAG)で効率化するガバメントクラウド運用
toru_kubota
4
1.2k
いつも初心者向けの記事に助けられているので得意分野では初心者向けの記事を書きます
toru_kubota
2
700
AWSの利点
toru_kubota
0
300
Other Decks in Technology
See All in Technology
AIは推し活である。
kurazuuuuuu
2
980
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
4
1.3k
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
5
740
アクセスキーこわい やめかたと漏らさない工夫
sassssan68
1
790
Azure Serverless 2026:Production-ready な AI エージェント基盤 / Azure Serverless 2026: Production-Ready AI Agent Platform
miyake
2
600
サーバーレスをどこまで使う? WebRTC対戦ゲームで選んだVPSとの共存設計
kaidouji85
0
440
「どのログを見ればいい?」 から始めた サーバーレス障害解析
y_waka1
1
150
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
21k
AI Native Platform Engineering 〜PlatformとAgileで“作る速さ”を“価値”へ〜
uya116
0
130
Why Agent Cost Needs Observability
nttcom
0
160
Amazon Bedrock Agents ClassicからAmazon Bedrock AgentCoreへ移行した際、ガードレール設定が2箇所に割れた話
matsunobu
0
100
人にやさしく、AIにやさしく、書き手を選ばないIaCのガードレール再考 / Rethinking IaC Guardrails for Humans and AI Alike
kohbis
5
1.1k
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
520
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
540
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
850
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
420
How STYLIGHT went responsive
nonsquared
100
6.3k
Building an army of robots
kneath
307
46k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
340
We Are The Robots
honzajavorek
0
380
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
The Curse of the Amulet
leimatthew05
3
15k
Transcript
AWS CDKを触ってみて NCDC Dev Meetup クラウドなんでもLT会 #6 2022/07/22 久保田 亨
自己紹介 氏名 : 久保田 亨 会社 : SaaS企業 職業 : インフラエンジニア 趣味 : 歩くこと
背景 ~2022/06 SI勤務(DC) 2022/07~(転職) SaaS企業 ・AWSサービス検証 ・AWSサービスメニュー化 ・AWSを使用 CloudFormation(CFn) CloudFormation(CFn)
CFn (CloudFormation) Stack Template YAML/JSON AWS Cloud CloudFormation(CFn)
実行環境 AWS CDK Stack Template JavaScript/TypeScript/Python/Java/C# AWS Cloud AWS CDK
AWS Cloud VPC Public subnet Public subnet Private subnet Private
subnet AWS Cloud VPC Public subnet Public subnet Private subnet Private subnet AWS Cloud VPC Public subnet Public subnet Private subnet Private subnet AWS Cloud VPC Public subnet Public subnet Private subnet Private subnet AWS Cloud VPC Public subnet Public subnet Private subnet Private subnet
import { Stack, StackProps } from 'aws-cdk-lib'; import { Construct
} from 'constructs'; import * as ec2 from 'aws-cdk-lib/aws-ec2'; import { Vpc } from 'aws-cdk-lib/aws-ec2'; export class VpcStack extends Stack { //別スタックから参照できるようにする public readonly vpc: Vpc; constructor(scope: Construct, id: string, props?: StackProps) { super(scope, id, props); const vpc_name = 'cdk-vpc'; const cidr = '10.1.0.0/16'; this.vpc = new ec2.Vpc(this, 'VPC', { vpcName: vpc_name, cidr: cidr, maxAzs: 2, subnetConfiguration: [ { cidrMask: 24, name: `${vpc_name}-public`, subnetType: ec2.SubnetType.PUBLIC, }, { cidrMask: 24, name: `${vpc_name}-private`, subnetType: ec2.SubnetType.PRIVATE_ISOLATED, }, ] }) } };
Resources: VPCXXXXXXX: Type: 'AWS::EC2::VPC' Properties: CidrBlock: 10.1.0.0/16 EnableDnsHostnames: true EnableDnsSupport:
true InstanceTenancy: default Tags: - Key: Name Value: cdk-vpc Metadata: 'aws:cdk:path': VpcStack/VPC/Resource VPCcdkvpcpublicSubnet1SubnetYYYYYYYY: Type: 'AWS::EC2::Subnet' Properties: VpcId: !Ref VPCXXXXXXX AvailabilityZone: ap-northeast-1a CidrBlock: 10.1.0.0/24 MapPublicIpOnLaunch: true Tags: - Key: 'aws-cdk:subnet-name' Value: cdk-vpc-public - Key: 'aws-cdk:subnet-type' Value: Public - Key: Name Value: VpcStack/VPC/cdk-vpc-publicSubnet1 Metadata: 'aws:cdk:path': VpcStack/VPC/cdk-vpc- publicSubnet1/Subnet VPCcdkvpcpublicSubnet1RouteTableZZZZZZZZ: Type: 'AWS::EC2::RouteTable' Properties: VpcId: !Ref VPCXXXXXXXX Tags: - Key: Name Value: VpcStack/VPC/cdk-vpc-publicSubnet1 ・・・・222行(CDKで出力されたテンプレート)
https://qiita.com/Toru_Kubota/items/f6fb42c5da442b03a98f ALB+ECS+Aurora
//aws-ecs-patternsモジュール使用 new ecsp.ApplicationLoadBalancedFargateService(this, 'WebApp01', { cluster, domainName: domain_name, domainZone, memoryLimitMiB:
512, desiredCount: 2, cpu: 256, assignPublicIp: true, loadBalancerName: 'WebApp01-lb01', publicLoadBalancer: true, taskImageOptions: { image: ecs.ContainerImage.fromRegistry('nginx'), },}); ALB+Fargate設定(一部抜粋)
・セキュアなベースラインを提供するテンプレート ・AWS CDKで実装 ・共通設定とシステム固有設定の2層 Baseline Environment on AWS
共通設定箇所 Amazon GuardDuty AWS Security Hub AWS CloudTrail AWS Config
Amazon SNS AWS Systems Manager
・少ないコード量で運用が楽そう! ・書き方は慣れれば難しくない! ・BLEAと合わせて運用が楽になりそう! AWS CDKを触ってみて