How to configure Instance Protection over CloudFormation in AWS?

I need to set the Instance Protection property for instances in my auto-scale group using the CloudFormation template.

I usually do this in my AWS console as follows: EC2 -> Auto Scale Groups

But I can not find it in the CloudFormation documentation

+4
source share
2 answers

This can be done using CloudFormation, but it is not easy.

CloudFormation ( 3/30/2016) . CloudFormation, , , API AWS, 12/7/2015.

, , CloudFormation, CloudFormation ., .

AWS SDK, , , AutoScaling, , , AWS CLI create-auto-scaling-group --new-instances-protected-from-scale-in.

CloudFormation , , ( ) CloudFormation SDK. , IAM resouce. , , CloudFormation ( ACM CloudFront), . SO .

, , AWS CloudFormation, .

+5

, CloudFormation.

CFN Autoscaling, TerminationProtection, . , CLI, , :

$> aws autoscaling describe-termination-policy-types
{
    "TerminationPolicyTypes": [
        "ClosestToNextInstanceHour", 
        "Default", 
        "NewestInstance", 
        "OldestInstance", 
        "OldestLaunchConfiguration"
    ]
}
+2

All Articles