5

我正在使用 CloudFormation 来启动 Auto Scaling 组中的一些服务器,并且我希望它们都使用基本监控。我尝试Monitoringfalse属性AWS::AutoScaling::AutoScalingGroup和 中设置AWS::AutoScaling::LaunchConfiguration,但堆栈无法启动;我看到CREATE_FAILED错误消息:Encountered unsupported property Monitoring.

4

1 回答 1

9

Just another day in the lovingly roguish world of almost-but-not-quite-consistant CFN template syntax.

The property you want is InstanceMonitoring, not Monitoring. It should apply to your LaunchConfiguration resource. More details are in the docs.

InstanceMonitoring

Indicates whether or not instance monitoring should be enabled for this
    autoscaling group. This is enabled by default. To turn it off, set
    InstanceMonitoring to "false".

Required: No. Default value is "true".
Type: Boolean

Of course, if you're provisioning an AWS::EC2::Instance resource, it's just straight up Monitoring. For what it's worth, I find this slightly less annoying than changing SecurityGroups to SecurityGroupIds when moving Instance declarations in and out of VPCs, but that's just me.

于 2012-08-07T03:36:51.990 回答