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
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.4k
長期運用に耐えるフロントエンド目指して
marokanatani
2
46k
Other Decks in Technology
See All in Technology
IBC 2026 動画技術関連レポート / IBC 2026 Report
cyberagentdevelopers
PRO
2
450
cdkd (CDK Direct)
gotok365
4
280
自律的なチームを作るためにTechPMがやらないこと
ny7760
1
530
[dbts2026]数十PBの超巨大データ×AI活用を支えるSnowflakeの実力〜大規模環境におけるアーキテクチャと運用のリアル〜
y_matsubara
0
120
The future of architectural work
ufried
0
190
Gifu WordPress Meetup #200 に向けて、私たちには何ができるだろうか?/ 2026-11-07 Gifu WordPress Meetup
torounit
0
240
詳解 never 型 - ボトム型の性質を深掘り
nealle
0
160
コードレビューをなくして見えたもの
henteko
0
140
SSFの現在地 ― CAEP/RISCからAI Identityへ
oidfj
0
310
現場を動かすAIエージェント#2_製造業現場でのAI活用から見た、ハマる罠と実践知
kintotechdev
2
210
PostgreSQL オプティマイザ統計の秘密
nori_shinoda
1
440
並列度を下げたら速くなった — go build の重複コンパイルを実測で見る
tomoaki25
2
1k
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
520
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
470
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
370
Test your architecture with Archunit
thirion
2
2.5k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Documentation Writing (for coders)
carmenintech
77
5.6k
Odyssey Design
rkendrick25
PRO
2
930
Designing for Performance
lara
612
70k
GitHub's CSS Performance
jonrohan
1033
470k
Facilitating Awesome Meetings
lara
57
7.2k
Designing Powerful Visuals for Engaging Learning
tmiket
1
650
Un-Boring Meetings
codingconduct
0
490
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盛り上げていこう!! 最後に
ご清聴ありがとうございました!