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
S3のキー設計でハマった話
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
maroKanatani
April 23, 2021
Technology
1.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
S3のキー設計でハマった話
AKIBA.AWS ONLINE #02
https://classmethod.connpass.com/event/209019/
maroKanatani
April 23, 2021
More Decks by maroKanatani
See All by maroKanatani
as(型アサーション)を書く前にできること
marokanatani
11
4.5k
App Router を実プロダクトで採用して見えてきた勘所をちょっとだけ紹介
marokanatani
3
2.3k
長期運用に耐えるフロントエンド目指して
marokanatani
2
46k
Other Decks in Technology
See All in Technology
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
16
120k
AWS FinOps Agent 結局何が得意なの?
siromi
0
220
メルカリにおけるAI時代の高速プロトタイピング基盤「Arca」
ryotarai
18
13k
Meet AgentCore Identity Consent Portal
hironobuiga
2
130
大阪オフィスに Unitree Go2 がやってきたので Physical AI やってみた
dafujii
0
120
AI coding 整合正規方法
philipz
0
570
Apache Iceberg が拓く AI 時代のオープンレイクハウス
tomtanaka
0
190
行動するAIのためのオントロジー | DevRev — Encraft #26.pdf
dvrv_tknrszk
1
600
Azure Copilot Resiliency Agentをいろいろ試してみる
tomokusaba
0
140
Mastering Agentic Development: Harness Engineering for Effective Coding Agents
konippi
3
650
猫でもわかるKiro Web
kentapapa
1
160
ログラスのマルチプロダクトを 支える認証基盤 〜テナントごとに異なる統制とどう向き合うか〜
dada4386
3
230
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
600
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
340
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
HDC tutorial
michielstock
2
920
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
550
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
270
A Modern Web Designer's Workflow
chriscoyier
699
190k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
470
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
What's in a price? How to price your products and services
michaelherold
247
13k
The Curse of the Amulet
leimatthew05
3
15k
Transcript
S3のキー設計で ハマった話 AKIBA.AWS ONLINE #02
自己紹介 • 金谷政大 • クラスメソッド AWS事業本部サービスグループ ◦ クラスメソッドメンバーズの開発・運用 ◦ アプリ部分を触ることが多い(最近はフロントエンド多め)
◦ AWS絶賛勉強中 • 2021年2月入社(大阪オフィス) • SI・プログラミング講師→クラスメソッド • 好きなAWSサービス ◦ S3, Lambdaなど • 本日初登壇
S3 ?
ファイルストレージ?
None
まぁゆーてもファイルストレージみたいなもんやろ… (´~`)
. ├── a_company │ ├── accounting │ │ ├── 202101
│ │ └── 202102 │ ├── development │ │ ├── 202101 │ │ └── 202102 │ └── sales │ ├── 202101 │ └── 202102 ├── b_company │ ├── . . . 1月のデータだけ欲 しい
ファイルシステムの 場合
ls */*/202101
None
S3(AWS CLI) の場合
aws s3 ls bucket/*/*/202101 ??
None
• s3 lsの場合、ワイルドカードは基本的には使えない ◦ 公式リファレンス ◦ https://docs.aws.amazon.com/cli/latest/reference/s3/ls.html • s3 cpとかだとワイルドカードを使うオプションがあったりする
◦ --excludeとか--includeとかを駆使する ◦ (少しググったりしたらできそうな雰囲気に見えてしまった・・・) ◦ https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html S3でのワイルドカード
• s3 lsの場合、ワイルドカードは基本的には使えない ◦ => AWS CLI(各種SDK)での検索を想定する場合、 絞り込む順番にキーを設計しないと困る ◦ キーの前方一致による絞り込みは可能
▪ OKパターン • aws s3 ls bucket/a_company/ • aws s3 ls bucket/a_com ◦ 今回の場合、202101を最初にすればスムーズに検索できそう • でも、もっと柔軟に検索したい・・・ ◦ アプリケーション側で頑張る・・・ ◦ 基本的には置き場所として使ってあげるのが良さそう S3でのワイルドカード
• 5分で絶対に分かるオブジェクトストレージ ◦ https://www.atmarkit.co.jp/ait/articles/1705/29/news014_3.html • Amazon S3における「フォルダ」という幻想をぶち壊し、その実体を明らかにする ◦ https://dev.classmethod.jp/articles/amazon-s3-folders/ オブジェクトストレージ(参考)
• S3とファイルストレージはちょっと違うよ! • クラウドはもはやインフラエンジニアだけのものではない・・・! • アプリの人もインフラの人もみんなでAWS盛り上げていこう!! 最後に
ご清聴ありがとうございました!