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
CloudFront OAC × Lambda Function URLs で作る認証付き簡易...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
shuntaka
February 23, 2026
0
670
CloudFront OAC × Lambda Function URLs で作る認証付き簡易サイト / Simple Authenticated Website Built with CloudFront OAC and Lambda Function URLs
shuntaka
February 23, 2026
Tweet
Share
More Decks by shuntaka
See All by shuntaka
顧客体験を加速させるチャットボットで始めるAIエージェント入門 / Introduction to AI Agents: Starting with Chatbots to Accelerate Customer Experience
shuntaka
1
2.9k
AI SDKで作るチャットボット開発 / Chatbot Development with AI SDK
shuntaka
0
1.4k
Claude Codeチーム活用の現在地 〜小さな実践と今後の展望〜 / Current State of Claude Code Team Adoption - Small Practices and Future Prospects
shuntaka
2
7.6k
Claude Codeをdotfiles管理しよう! / Let's Manage Claude Code with Dotfiles!
shuntaka
7
17k
個人プロジェクトをKiroベースに 乗り換えてみた / I Tried Migrating My Personal Project to Kiro-based
shuntaka
0
2.1k
AI駆動開発がもたらす革新と実践 / Innovation and Practice Brought by AI-Driven Development
shuntaka
2
1.8k
リモートMCP + MCP業務取り組み例 / Remote MCP + MCP Business Initiative Examples
shuntaka
0
2.1k
話題のMCPとは何か? 基礎知識と活用事例をご紹介 / What is the Trending MCP? Introduction to Basic Knowledge and Practical Applications
shuntaka
0
1.7k
MCPに入門する/ Introduction to MCP
shuntaka
115
81k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.4k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
200
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
GitHub's CSS Performance
jonrohan
1032
470k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
190
Google's AI Overviews - The New Search
badams
0
920
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
250
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
63
53k
Amusing Abliteration
ianozsvald
0
110
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Skip the Path - Find Your Career Trail
mkilby
0
66
Transcript
CloudFront OAC × AWS Lambda Function URLs で作る認証付き簡易サイト 2026/02/20 TECH
BATON in 東京 LT 髙橋俊⼀ a.k.a. shuntaka 1
⾃⼰紹介 2 shuntaka/髙橋俊⼀ 🧳 TypeScript/AWS/Backend/RAG ❤ Neovim, Nix, CLI⾃作 📝
⾦融情報ベンダー → クラスメソッド 製造ビジネステクノロジー部 最近はtmuxのセッション管理ツールをTAURI 作っています。Apple Developerになりまし た。(- ¥12800) shuntaka.dev/who @shuntaka_jp
ぼくとLambda 3 個⼈ブログ(shuntaka.dev)をLambdaで6年くらい運⽤しています! 旧構成 (ver 2020) 新構成 (ver2026) 詳しくは https://shuntaka.dev/shuntaka/articles/20260108-shuntaka-blog-rearchitecture
ブログ 4 https://github.com/shuntaka9576/shuntaka-dev Rustのビルドが重くSelf-Hosted Runner(Mac mini)を利⽤中...
マイクロフロントエンド ‧業務SaaS ‧複数の会社で構築(メイン画⾯, 管理画⾯, etc..) ‧会社、ドメイン領域によって技術スタッ クが異なる... ‧管理画⾯はReact、メイン画⾯はPure JavaScriptなど並列に開発出来るようにす るため
5
ヘルプサイトを作りたい お客さん向けのマニュアルを表⽰するだ けでいいとのこと ‧静的サイトでいいかな?🧐 DocusaurusとかSphinxが良さそう? ‧ただ他の画⾯同様に同じ認証情報で⾒ たい(外に⾒せる必要はない, no-indexも 微妙)ということだった... 6
アセットにも保護がかけられるので筋良 さそう...🧐 ‧前段にLambda@Edgeをおく ‧JWTを検証して問題なければ、静的サ イトを返却。 ‧前段のLambda@EdgeでJWTを検証 し、未認証なら/auth へリダイレクト ‧img, videoを含む全静的アセットをCDN
層で保護 → 現構成がlocalStorage + JWTだったの で後述のOAC⽅式を選んだ 7 cookieの場合
CloudFront + Lambda Functions URLsへのOAC ‧現構成がlocal storage、JWT構成。SPAを別途⽤意 し、関数URLでヘルプコンテンツを保護 ‧IAM認証(AWS_IAM)とリソースポリシーにより、 CloudFront経由でしかアクセスできない
‧GET/HEADはそのまま、POST/PUTは x-amz-content-sha256ヘッダーが必要(今回は不要) Lambda@Edegeなどで対応可 ‧画像は推測困難なパスで保護(公開素材のため完全 保護は割り切り) ‧ Authorization Bearerヘッダーで /help/apiに送信 するとOAC署名と競合するため業務JWTは別ヘッダー に分離 8
おしまい ありがとうございました! 9