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
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.5k
0
Share
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.3k
App Router を実プロダクトで採用して見えてきた勘所をちょっとだけ紹介
marokanatani
3
2k
長期運用に耐えるフロントエンド目指して
marokanatani
2
45k
Other Decks in Technology
See All in Technology
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
270
FASTでAIエージェントを作りまくろう!
yukiogawa
4
180
MIX AUDIO EN BROADCAST
ralpherick
0
140
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
18k
40代からのアウトプット ― 経験は価値ある学びに変わる / 20260404 Naoki Takahashi
shift_evolve
PRO
2
430
AWS DevOps Agent or Kiro の使いどころを考える_20260402
masakiokuda
0
120
【Oracle Cloud ウェビナー】データ主権はクラウドで守れるのか?NTTデータ様のOracle Alloyで実現するソブリン対応クラウドの最適解
oracle4engineer
PRO
3
130
ブラックボックス化したMLシステムのVertex AI移行 / mlops_community_62
visional_engineering_and_design
1
240
Cursor Subagentsはいいぞ
yug1224
2
120
AIエージェント時代に必要な オペレーションマネージャーのロールとは
kentarofujii
0
230
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
3
2k
TUNA Camp 2026 京都Stage ヒューリスティックアルゴリズム入門
terryu16
0
640
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
210
We Have a Design System, Now What?
morganepeng
55
8k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
260
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Accessibility Awareness
sabderemane
0
88
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
370
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
240
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
240
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
120
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盛り上げていこう!! 最後に
ご清聴ありがとうございました!