Case 3: Instances in ASG (Without Termination)

.

Instances in an Auto Scaling Group when parked in a schedule get terminated. If you want to preserve the instance, and only want to stop them, try this workflow.

.

  1. Create a new schedule, and set the time for when you want the resources parked

.

  1. Now we will access both Auto Scaling Groups and the Instances launched by it
    1. Choose Auto Scaling as the Service and Auto Scaling Groups as Resource
    2. Choose Instances in Add-Ons

.

  1. Now we will filter out only the ASGs that have the tag Schedule set as True, and the Instances that have state as Running
    1. Choose the main output of the Resource Node from the drop-down
    2. Set filter type to Tag. Select condition as Has, Key as Schedule and Value as True.
    3. Click Add Condition (AND type). Set filter type to Param. Set Key as '$.addOns.Instances.data..State..Name', Operator as '==' and Value as 'running'.

.

  1. During parking, will suspend all processes from the ASG, and then stop all the Instances launched by it.
    1. For the first action, choose the main output of the the Filter Node from the drop-down. Choose Auto Scaling as the service and Suspend Processes as the action. In the params mapping editor, paste this under optional params: "ScalingProcesses": []. Click Save.
    1. Add another action for parking. Choose the add-on output of the Filter Node from the drop-down. Select EC2 as Service and Stop Instances as Action. Click Save.

.

  1. During un-parking, we will restart all the instances, and then resume all ASG processes
    1. For the first action, choose the add-on output of the Filter Node from the drop-down. Choose EC2 as the service and Start Instances as the action. Click Save.
    1. Add another action for un-parking. Choose the main output of the Filter Node from the drop-down. Choose Auto Scaling as the service and Resume Processes as the action. In the params mapping editor, paste this under optional params: "ScalingProcesses": []. Click Save.

.

  1. Save the schedule. Choose Save and Deploy if you want it active from now.

.

Did You Find This Article Helpful?

Case 2: Instances in ASG

Case 4: RDS DB Instances

Powered by HelpDocs