LoginSignup
0
3

More than 5 years have passed since last update.

Amazon S3バケットへのファイルアップ

Posted at

S3バケットへのファイルアップ(CLI編)

今回はシステムの連携などでコマンドでAmazon S3にファイルを転送する必要がある時に役に立つ情報共有です。


設置

以下の順番で設置してください。
$ wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
$ unzip awscli-bundle.zip
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

※aws設定
$ aws configure
上記のコマンドを実行すると以下の入力が必要です。
AWS Access Key ID [None]: xxxxxxxxxx
AWS Secret Access Key [None]: xxxxxxxxxx
Default region name [None]: 入力せずにEnterキー
Default output format [None]: 入力せずにEnterキークリック

aws s3コマンドの実行方法

test.txtファイルをaws s3のbucketに転送
$ aws s3 cp /tmp/foo/test.txt s3://bucket/ 

これで簡単にAmazon S3バケットへファイル転送ができます。
次回は転送以外のコマンドについて掲載しますので。お楽しみに。。。。

詳しい情報はこちらを参考してください

0
3
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
3