<p>Got it from <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html" rel="nofollow noreferrer">official documentation</a> of UpdatePolicy . Indeed, we can suspend processes by using the <code>UpdatePolicy</code> attribute for the <code>AWS::AutoScaling::AutoScalingGroup</code> resource : </p>

<ul>
<li><p>So instead of <code>SuspendedProcesses</code>, the right term is <code>SuspendProcesses</code>.</p></li>
<li><p>Also instead of putting <code>SuspendProcesses</code> under <code>Properties</code>, it should be under <code>UpdatePolicy &gt; AutoScalingRollingUpdate</code> .</p></li>
</ul>

<p>_</p>

<pre><code>  MyAutoScalingGroup:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      DesiredCapacity: 1
      MinSize: 1
      MaxSize: 1
      LaunchConfigurationName: !Ref MyLaunchConfiguration
      AvailabilityZones: !GetAZs
    UpdatePolicy:
      AutoScalingRollingUpdate:
        SuspendProcesses:
        - AZRebalance
        - Terminate
</code></pre>

CC BY-SA 4.0
2018-06-13T22:57:13.850Z
This suspends the processes during updates to the ASG via the CF stack, not in general (CF resumes the processes when it is done updating the ASG).
raylu
CC BY-SA 3.0
2017-12-14T17:02:49.020Z
2017-12-14T17:02:49.020Z
Abdennour TOUMI
<p>I have the following autoscaling as a Cloudformation template : </p>

<pre><code>  MyAutoScalingGroup:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      DesiredCapacity: 1
      MinSize: 1
      MaxSize: 1
      LaunchConfigurationName: !Ref MyLaunchConfiguration
      AvailabilityZones: !GetAZs
</code></pre>

<p>I am struggling with defining <a href="http://docs.aws.amazon.com/autoscaling/latest/userguide/as-suspend-resume-processes.html" rel="nofollow noreferrer">suspended processes</a> inside Cloudformation template.</p>

<p>Trying an intuitive approach ( adding it as property) and it does not work at all : </p>

<pre><code>  MyAutoScalingGroup:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      DesiredCapacity: 1
      MinSize: 1
      MaxSize: 1
      LaunchConfigurationName: !Ref MyLaunchConfiguration
      AvailabilityZones: !GetAZs
      SuspendedProcesses:
        - AZRebalance
        - Terminate
</code></pre>

CC BY-SA 3.0
2017-12-14T14:26:46.527Z
What are you trying to do ? It's unclear what you're trying to accomplish here.
Tensibai
CC BY-SA 3.0
2017-12-14T17:03:18.273Z
Hello @Tensibai, I got it. Thank you for your interesting.
Abdennour TOUMI
CC BY-SA 4.0
2019-01-17T23:42:41.933Z
I followed the same, but once the autoscaling group is created without having any SuspenProcess properties.
Sai
<amazon-web-services><autoscaling><infrastructure-as-code><yaml>
Suspend autoscaling processes through Cloudformation template
Abdennour TOUMI
# Suspend autoscaling processes through Cloudformation template

(Asked by: username_0 on 2017-12-14)

I have the following autoscaling as a Cloudformation template : 
  MyAutoScalingGroup:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      DesiredCapacity: 1
      MinSize: 1
      MaxSize: 1
      LaunchConfigurationName: !Ref MyLaunchConfiguration
      AvailabilityZones: !GetAZs

I am struggling with defining suspended processes inside Cloudformation template.
Trying an intuitive approach ( adding it as property) and it does not work at all : 
  MyAutoScalingGroup:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      DesiredCapacity: 1
      MinSize: 1
      MaxSize: 1
      LaunchConfigurationName: !Ref MyLaunchConfiguration
      AvailabilityZones: !GetAZs
      SuspendedProcesses:
        - AZRebalance
        - Terminate

**Tags:** amazon-web-services, autoscaling, infrastructure-as-code, yaml

> **Comments:**
> **username_1**: What are you trying to do ? It's unclear what you're trying to accomplish here.  
> **username_0**: Hello @username_1, I got it. Thank you for your interesting.  
> **username_2**: I followed the same, but once the autoscaling group is created without having any SuspenProcess properties.  

---

## 1 answers

### Answer by username_0 on 2017-12-14. Score: 0 | Accepted answer

Got it from official documentation of UpdatePolicy . Indeed, we can suspend processes by using the UpdatePolicy attribute for the AWS::AutoScaling::AutoScalingGroup resource : 

So instead of SuspendedProcesses, the right term is SuspendProcesses.
Also instead of putting SuspendProcesses under Properties, it should be under UpdatePolicy > AutoScalingRollingUpdate .

_
  MyAutoScalingGroup:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      DesiredCapacity: 1
      MinSize: 1
      MaxSize: 1
      LaunchConfigurationName: !Ref MyLaunchConfiguration
      AvailabilityZones: !GetAZs
    UpdatePolicy:
      AutoScalingRollingUpdate:
        SuspendProcesses:
        - AZRebalance
        - Terminate

> **Comments:**
> **username_3**: This suspends the processes during updates to the ASG via the CF stack, not in general (CF resumes the processes when it is done updating the ASG).  

---

