How do I disable detailed monitoring for instances in an auto scaling group in a CloudFormation template?

StackOverflow https://stackoverflow.com/questions/11837395

문제

I'm using CloudFormation to spin up some servers in an auto scaling group, and I want them all to use basic monitoring. I tried setting Monitoring to false in the AWS::AutoScaling::AutoScalingGroup properties as well as the AWS::AutoScaling::LaunchConfiguration, but the stack cannot start up; I see CREATE_FAILED with the error message: Encountered unsupported property Monitoring.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top