LoginSignup
3
1

More than 5 years have passed since last update.

AWSCLIにおけるS3の帯域制限について

Last updated at Posted at 2018-12-13

AWSCLIのS3帯域制限ができるようになって1年くらいになります
間違ったコマンドを見かけるので、コピペできるようにしました

「AWS CLIがS3とのトラフィックを帯域制御できるようになりました」

10MB/sで帯域制限をかける方法

$ aws configure set default.s3.max_bandwidth 10MB/s
$ cat $HOME/.aws/config
[default]
region = ap-northeast-1
s3 =
    max_bandwidth = 10MB/s

結構コピペしますよね?

みなさんprofile使ってませんか?

AWSCLIで複数のIAMユーザー(AWSアカウント)を使い分けるための方法
参考)https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/cli-multiple-profiles.html

profileを使っていると上記コマンドじゃダメですよ

↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
$ aws configure set profile.[profile名].s3.max_bandwidth 10MB/s
↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

$ aws configure set profile.test.s3.max_bandwidth 10MB/s
$ cat $HOME/.aws/config
[profile test]
region = ap-northeast-1
s3 =
    max_bandwidth = 10MB/s

一応ドキュメントにも記載がありました
https://docs.aws.amazon.com/cli/latest/reference/configure/set.html

逆にsetコマンド時は--profileは不要です

コピペだけじゃなく、ドキュメント読みましょう。。。

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