LoginSignup
4
2

More than 5 years have passed since last update.

UbuntuのAWSCliで、S3にファイル転送の際にエラーが出る件

Last updated at Posted at 2017-02-28

初めからpipでいれろという結論だったのですが一応…

マルチバイト文字が入っているファイルでエラー

upload failed: ./HOGE0006\udc82̉\udcf1\udc93]1.jpg to s3://example.com/HOGE0006\udc82̉\udcf1\udc93]1.jpg 'utf-8' codec can't encode character '\udc82' in position
  • LANGと同じエンコードにファイル名をエンコード
convmv -f shiftjis -t utf8 * --notest
  • (/・ω・)/
upload: ./HOGE0006の回転1.jpg to s3://example.com/HOGE0006の回転1.jpg

空ファイルでエラー

upload failed: ./ae002.htm to s3://example/ae002.htm seek() takes 2 positional arguments but 3 were given
$ dpkg -l |grep aws
ii  awscli                                     1.11.13-1ubuntu1~16.10.0                         all          Universal Command Line Environment for AWS
  • pipで入れなおす
$ aws --version
aws-cli/1.11.55 Python/2.7.12+ Linux/4.8.0-37-generic botocore/1.5.18
  • (/・ω・)/
$ aws s3 cp ae002.htm s3://example.com/ --profile=AWS
upload: ./ae002.htm to s3://example.com/ae002.htm
4
2
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
4
2