0

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
3
  • 3
    What are you trying to do ? It's unclear what you're trying to accomplish here.
    – Tensibai
    Dec 14 '17 at 14:26
  • Hello @Tensibai, I got it. Thank you for your interesting. Dec 14 '17 at 17:03
  • I followed the same, but once the autoscaling group is created without having any SuspenProcess properties.
    – Sai
    Jan 17 '19 at 23:42
0

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
1
  • 1
    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
    Jun 13 '18 at 22:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.