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
プライベートコンテンツのHLS配信 with CloudFront
Search
defunty
December 23, 2021
Programming
350
0
Share
プライベートコンテンツのHLS配信 with CloudFront
LT資料(2021/12/23)
defunty
December 23, 2021
More Decks by defunty
See All by defunty
SPAでの認証方法に関するマサカリぶん投げ会場はこちらです
defunty
0
1k
CSS Module・CSS in JS抗争の過去と現在
defunty
1
200
アクセシビリティ in 令和
defunty
0
36
Other Decks in Programming
See All in Programming
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
140
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
410
書き換えて学ぶTemporal #fukts
pirosikick
2
370
cloudnative conference 2026 flyle
azihsoyn
0
170
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.8k
GitHubCopilotCLIをはじめよう.pdf
htkym
0
330
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
270
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
270
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
380
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1.1k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
690
[RubyKaigi 2026] Require Hooks
palkan
1
310
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
180
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
500
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
The Cult of Friendly URLs
andyhume
79
6.9k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
340
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Deep Space Network (abreviated)
tonyrice
0
130
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
130
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
790
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
350
Transcript
2021/12/23 プライベートコンテンツのHLS 配信 with CloudFront
本スライドでの「プライベートコンテンツ」の定義 ↓ 個人情報を含む、第三者に公開されるべきではない情報
HLS HTTP Live Streaming. 複数ファイル(インデックスファイル・セグメントファイル)で構成 された規格。 動画ファイルをライブストリーミング用にしたもの。
S3 でシンプルな画像形式のプライベートコン テンツを配信する場合(not HLS ) S3 のパブリックアクセスブロックをON にする EC2 にS3
を制御するポリシーをアタッチする (バックエンド側でのアクセス制御) 署名付きURL の発行 (ブラウザ側でのアクセス制御)
署名付きURL 認証用パラメータのついた有効期限付きのURL 。 S3 の機能で発行できる。 AWS のSDK からも発行可能。 Aws::S3::Object#presigned_url https://docs.aws.amazon.com/sdk-for-
ruby/v3/api/Aws/S3/Object.html#presigned_url-instance_method
署名付きURL -2- 複数ファイルを取り扱うHLS では署名付きURL は適していない。 https://docs.aws.amazon.com/ja_jp/AmazonCloudFront/latest/Develo perGuide/private-content-choosing-signed-urls-cookies.html 次のような場合は、署名付き Cookie を使用します。
・複数の制限されたファイル (HLS 形式の動画のすべてのファイ ルやウェブサイトの購読者の領域にあるすべてのファイルなど) へのアクセスを提供する場合。 “ “
署名付きCookie CloudFront の機能。 S3 にはない。 AWS のSDK からも発行可能。 Aws::CloudFront::CookieSigner#signed_cookie https://docs.aws.amazon.com/sdk-for-
ruby/v3/api/Aws/CloudFront/CookieSigner.html
署名付きCookie -2- signer = Aws::CloudFront::CookieSigner.new( key_pair_id: "cf-keypair-id", private_key_path: "./unit_test_dummy_key" )
cookies = signer.signed_cookie(url, policy: policy.to_json )
CloudFront でプライベートコンテンツをHLS 形式で配信する場合 署名付き Cookie を使用して HLS コンテンツを取得してみた | DevelopersIO
↑ の記事ではルートアカウントでしか取得できない情報を使っている が、ローカルで作成した鍵情報をCloudFront に登録し、利用するのも 可。 [ アップデート] root ユーザー作業が不要に!Amazon CloudFront で署 名付き URL/Cookie 向け公開鍵を IAM ユーザー権限で管理できるよう になりました。 | DevelopersIO
None