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
CloudFrontFunctions&KVS-bluegreen
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ayuminmin
September 02, 2026
14
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CloudFrontFunctions&KVS-bluegreen
CloudFrontFunctions+KVSでBlueGreenデプロイの実装するユースケースを紹介した資料
Ayuminmin
September 02, 2026
More Decks by Ayuminmin
See All by Ayuminmin
bedrock-incident-response
ayuminmin
0
6
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Marketing to machines
jonoalderson
1
5.9k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
59k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
630
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
Git: the NoSQL Database
bkeepers
PRO
433
67k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
630
YesSQL, Process and Tooling at Scale
rocio
174
15k
Design in an AI World
tapps
1
350
Transcript
CloudFront Functions + KVS で実現する BlueGreen デプロイ 谷口あゆみ Netadashi Meetup
#17 / 2026-08-28
いきなり結論 CloudFrontの標準機能「継続的デプロイ」で足りない部分を Function + KVS で補完する 継続的デプロイは、ディストリビューション単位でBlueGreenを切り替える S3パス単位で、一部だけGreenへ切り替える細かな制御ができない CloudFront Function
+ KVS でS3パス単位の柔軟なBlueGreen切り替えを行う
前提 BlueGreenデプロイとは? サービス停止させず、現Ver(Blue)から、新Ver(Green)に切り替えるデプロイ方式 一般ユーザー 切り替え 事前に打鍵確認 アプリ開発者 問題があれば ロールバック
現Ver Blue 新Ver Green
前提 CloudFrontにはBlueGreen標準機能「継続的デプロイ」がある ステージングVerのディストリビューションを、本番Verに反映する 現Ver Blue 一般ユーザー CloudFront (本番) 反映(切り替え)
※ロールバック機能はない 新Ver Green 事前に打鍵確認 アプリ開発者 CloudFront (ステージング)
継続的デプロイの課題 「オリジン」もしくは「オリジンパス」でしか切り替えられず、リリース単位が大きい オリジンで切り替える オリジンパスで切り替える Blue S3 /contents └ app01 ※機能名
オリジンパスは先頭(FQDNの後)に追加される ex) URL:FQDN/contents/app01/xxx S3のパス:オリジンパス/contents/app01/xxx └ index.html └XXX 一般ユーザー CloudFront Green S3 CloudFront (ステージング) └ XXX └ app02 └XXX オリジン(S3)作成しなければならない └XXX └ contents └ app01 アプリ開発者 └ app02 Green-Path /contents └ index.html └ app01 ※機能名 └ XXX └ app02 CloudFront └ contents └ index.html └ XXX 一般ユーザー Blue-Path └ app01 アプリ開発者 CloudFront (ステージング) └ index.html └ XXX └ app02 └XXX オリジンパス配下を総入れ替えしなければならない
継続的デプロイでは実現できないケース CloudFront + S3によるコンテンツ配信で、一部のS3パスだけをリリースしたい /contents └ app01 ※機能名 └ index.html
└ XXX 一般ユーザー 機能パス単位でリリースしたい └ index.html └ XXX アプリ開発者 └ app02 └XXX └ aplXX
解決策 CloudFront Function + KVS(KeyValueStore)で 特定のS3パスに振り分ける URL: FQDN/contents/app01/xxx CloudFront KVSとは、
CloudFront Functionsから参照できる エッジ上のキーバリューストア /contents └ app01 ※機能名 CloudFront Function URLリクエストパス: /contents/app01/Blue-Path/xxx CloudFront KVS 一般ユーザー └ Green-Path ②リクエストURLを書き換える アプリ開発者 Key:app01 Value:Green-Path └ index.html └ XXX ①KVSでS3振り分け先を取得する S3パス単位の振り分け先を管理 └ Blue-Path URLリクエストパス: /contents/app01/Green-Path/xxx └ index.html └ XXX └ app02 └XXX └ aplXX
メリデメ比較 継続的デプロイ 【メリット】 複雑な作り込みが不要である 標準機能を用いたシンプルな運用ができる 【デメリット】 S3の細かいパス単位で切り替えができない
キャッシュ削除を考慮する必要がある Function + KVS 【メリット】 KVSの切り替えだけでリリースができる S3の細かいパス単位で切り替え、ロールバックができる キャッシュ削除を考慮する必要がない ②を書き換えるため、BlueGreenでキャッシュキーが異なる ①CloudFront ディストリビューションのドメイン名 ②リクエストされたオブジェクトの URL パス 【デメリット】 旧Verのコンテンツを削除する運用が必要になる KVS・Functionの作り込みが必要になる リリース頻度や配置するコンテンツ数が少ない 場合に適しています リリース頻度や配置するコンテンツ数が多い またはS3のパス単位で切り替えたい要件がある 場合に適しています