使用AWS CLI更新实例监控

时间:2016-11-21 17:54:46

标签: amazon-web-services amazon-ec2 aws-cli autoscaling launch-configuration

我正在尝试使用AWS CLI更新实例监控以进行自动扩展并使用文档on AWS here 我正在尝试以下命令,但未发现任何成功或进一步的文档。

>> aws autoscaling update-auto-scaling-group --auto-scaling-group-name awseb-e-test-stack-AWSEBAutoScalingGroup-5ECR3Tc0de  --instance-monitoring Enabled=true

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
  aws help
  aws <command> help
  aws <command> <subcommand> help
Unknown options: --instance-monitoring, Enabled=true

我也尝试了aws autoscaling update-auto-scaling-group --auto-scaling-group-name awseb-e-test-stack-AWSEBAutoScalingGroup-5ECR3Tc0de --instance-monitoring help,但这并没有提供对--instance-monitoring

选项的任何见解

在现有启动配置上启用实例的详细监控的最佳方法是什么?

1 个答案:

答案 0 :(得分:3)

不幸的是,您无法为现有启动配置上的实例启用详细监控。它仅在create-launch-configuration

中受支持

来自Monitoring Your Auto Scaling Groups and Instances Using Amazon CloudWatch

  

如果您有Auto Scaling组并需要更改哪种类型   您必须创建Auto Scaling实例的监控功能   新的启动配置并更新要使用的Auto Scaling组   这个启动配置。

使用新的启动配置更新AS组后:

  

从现在开始,Auto Scaling组将启动的实例将会出现   使用更新的监控类型。但是,如果你有   Auto Scaling组中的实例保留了之前的实例   监控类型。您可以终止这些实例以便Auto   缩放替换它们,或单独更新每个实例。

相关问题