awscli の eb config コマンドでコンソールから #AWS インスタンスタイプを変更して サーバー応答速度を速くしたい

# eb config

編集モードに突入するので、 `InstanceType: t2.small` を変えて編集終了してみる

デフォルトエディタは vim だと思うので、操作方法はてきとうにぐぐる

```diff
pplicationName: ex
DateUpdated: 2019-11-09 00:41:23+00:00
EnvironmentName: puppeteer
PlatformArn: arn:aws:elasticbeanstalk:us-east-2::platform/Node.js running on 64bit
  Amazon Linux/4.11.0
settings:
  aws:autoscaling:asg:
    Availability Zones: Any
    Cooldown: '360'
    Custom Availability Zones: ''
    MaxSize: '1'
    MinSize: '1'
  aws:autoscaling:launchconfiguration:
    BlockDeviceMappings: null
    EC2KeyName: pup
    IamInstanceProfile: aws-elasticbeanstalk-ec2-role
    ImageId: ami-03a85af99f1eeec28
-    InstanceType: t2.micro
+    InstanceType: t2.small
    MonitoringInterval: 5 minute
    RootVolumeIOPS: null
    RootVolumeSize: null
    RootVolumeType: null

...
```

# 編集完了すると

なにやら自動で設定変更してくれてるっぽい、賢いAWS。しばらく待つ。

```
$ eb config
Printing Status:
2019-11-09 00:41:23    INFO    Environment update is starting.
2019-11-09 00:41:27    INFO    Updating environment puppeteer's configuration settings.
2019-11-09 00:41:43    INFO    Created Auto Scaling launch configuration named: awseb-e-mkq26v5mcp-stack-AWSEBAutoScalingLaunchConfiguration-T6887H7BU7HB
 -- Events -- (safe to Ctrl+C) Use "eb abort" to cancel the command.
```


# AWS コンソールでインスタンスの設定を確認する

反映されてるね！

![image](https://user-images.githubusercontent.com/13635059/68519620-7efcae80-02d5-11ea-93cf-69c8415e92f9.png)

# 別の環境に対して実行したい

eb init し直すか、コマンド引数で name が指定できそう？

```
$ eb config --help


usage: eb config < |save|get|put|list|delete> <name> [options ...]

Modify an environment's configuration. Use subcommands to manage saved configurations.

commands:
  delete   Delete a configuration.
  get      Download a configuration from S3.
  list     List all configurations.
  put      Upload a configuration to S3.
  save     Save a configuration of the environment.

positional arguments:
  name                  environment_name|template_name

optional arguments:
  -h, --help            show this help message and exit
  --debug               toggle debug output
  --quiet               suppress all output
  -v, --verbose         toggle verbose output
  --profile PROFILE     use a specific profile from your credential file
  -r REGION, --region REGION
                        use a specific region
  --no-verify-ssl       don't verify AWS SSL certificates
  -nh, --nohang         return immediately, do not wait for config to be
                        completed
  --timeout TIMEOUT     timeout period in minutes
  --cfg CFG             name of configuration
  --tags TAGS           a comma separated list of tags as key=value pairs

Use this command to work with environment configuration settings.
To update your environment directly in an interactive editor, type:
  eb config
```

# 料金

https://aws.amazon.com/jp/elasticsearch-service/pricing/

![image](https://user-images.githubusercontent.com/13635059/68519549-f8e06800-02d4-11ea-9a2e-172d082c7d05.png)


# Original by Github issue

https://github.com/YumaInaura/YumaInaura/issues/2689








<!-- Update From Qiita API -->

# チャットメンバー募集


何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

https://line.me/ti/g2/eEPltQ6Tzh3pYAZV8JXKZqc7PJ6L0rpm573dcQ





# Twitter


https://twitter.com/YumaInaura


<!-- Update From Qiita API -->