0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

S3にディレクトリをアップする時に微ハマりした話

Posted at

S3のアクセス制御とcliがちゃんと使えるかの確認中
「ディレクトリごとアップロード」 を試した時に起きたこと

アップしようとしたファイルはこういう中身

sample_dir/
 ┣ test/
 ┃ ┗ index.html
 ┗ index.html
aws s3 cp --profile iichiko ./sample_dir s3://mugijo-chu/ --recursive 

upload: sample_dir/index.html to s3://mugijo-chu/index.html 
upload: sample_dir/test/index.html to s3://mugijo-chu/test/index.html 

いけ...てない。
思てたんと違う。

s3://mugijo-chu/sample_dir/index.html 
s3://mugijo-chu/sample_dir/test/index.html 

こうなってほしいのだが。

aws s3 cp --profile iichiko ./sample_dir s3://mugijo-chu/sample_dir --recursive 

from sample_dir
to sample_dir
と指定すればOK

ディレクトリごとコピーってこんなんだったかな
普通のファイル操作と微妙に違う感じがちょっと気持ち悪い
S3でディレクトリとか言うこと自体がそもそもナンセンスなのかもしれないけど

おわり。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?