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
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
190
freeeにおけるSoftware Factory
freee
PRO
0
260
【データ横丁主催】AI エージェント時代のTranslytical Data Platform
shisyu_gaku
0
190
[EMNLP26] RIGEL: Self-Distilled Score Adaptation for Image and Video Captioning Evaluation
keio_smilab
PRO
0
110
AIカンパニーへの転換を支えた、エンジニアの仕事の再定義
kworkdev
PRO
2
1.4k
[JAWS-UG彩の国埼玉#12]そろそろ準備する?re:Invent2026をやさしく解説 / reinvent2026-sainokuni
sh_fk2
1
380
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
PRO
0
450
macOS Golden Gate 時代のMac管理
tategami
0
110
Temporal 最高!でも改めて「日付」について調べたら人類の負債すぎる件
riyaamemiya
0
220
Codex を使った障害対応机上演習の実際
orgachem
PRO
0
230
AI駆動開発における開発環境のセキュリティの考え方
yamahiro
0
200
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
2
370
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
15k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Designing Experiences People Love
moore
143
24k
RailsConf 2023
tenderlove
30
1.6k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
How to train your dragon (web standard)
notwaldorf
96
6.9k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
640
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
A Tale of Four Properties
chriscoyier
163
24k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
640
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盛り上げていこう!! 最後に
ご清聴ありがとうございました!