$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
S3のキー設計でハマった話
Search
maroKanatani
April 23, 2021
Technology
0
1.5k
S3のキー設計でハマった話
AKIBA.AWS ONLINE #02
https://classmethod.connpass.com/event/209019/
maroKanatani
April 23, 2021
Tweet
Share
More Decks by maroKanatani
See All by maroKanatani
as(型アサーション)を書く前にできること
marokanatani
11
4.1k
App Router を実プロダクトで採用して見えてきた勘所をちょっとだけ紹介
marokanatani
3
1.9k
長期運用に耐えるフロントエンド目指して
marokanatani
2
45k
Other Decks in Technology
See All in Technology
モダンデータスタックの理想と現実の間で~1.3億人Vポイントデータ基盤の現在地とこれから~
taromatsui_cccmkhd
2
270
『君の名は』と聞く君の名は。 / Your name, you who asks for mine.
nttcom
1
120
Entity Framework Core におけるIN句クエリ最適化について
htkym
0
130
Strands Agents × インタリーブ思考 で変わるAIエージェント設計 / Strands Agents x Interleaved Thinking AI Agents
takanorig
5
2.1k
Snowflake導入から1年、LayerXのデータ活用の現在 / One Year into Snowflake: How LayerX Uses Data Today
civitaspo
0
2.4k
AI時代のワークフロー設計〜Durable Functions / Step Functions / Strands Agents を添えて〜
yakumo
3
2.2k
[Neurogica] 採用ポジション/ Recruitment Position
neurogica
1
130
2025-12-18_AI駆動開発推進プロジェクト運営について / AIDD-Promotion project management
yayoi_dd
0
160
[Data & AI Summit '25 Fall] AIでデータ活用を進化させる!Google Cloudで作るデータ活用の未来
kirimaru
0
3.9k
意外と知らない状態遷移テストの世界
nihonbuson
PRO
1
260
たまに起きる外部サービスの障害に備えたり備えなかったりする話
egmc
0
410
"人"が頑張るAI駆動開発
yokomachi
1
590
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
120
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
28
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Designing Powerful Visuals for Engaging Learning
tmiket
0
190
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
93
Prompt Engineering for Job Search
mfonobong
0
130
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
310
Technical Leadership for Architectural Decision Making
baasie
0
180
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盛り上げていこう!! 最後に
ご清聴ありがとうございました!