Case 1: EC2 Instances

.

We will schedule the starting and stopping of EC2 instances. The instances with the tag Park will be set to run only from 09:00 to 18:00 on weekdays.

.

  1. Click Add Schedules in the Schedules page. Set a Group Name, and the Region and Account in which to deploy the workflow. Click Next.

.

  1. Here we enter the resources we want to be scheduled
    1. Click Edit
    2. Choose the service (EC2) and resource (Instances)
    3. Click Save. Click Next.

.

  1. Choose filters to access specific resources. Here we select the Instances with the Key Parking.
    1. Click Edit, then choose the input from the resource node, under Select data to filter
    2. Filter the data by param
    3. Set the Key as '$.Tags..Key', Operator as '==' and Value as 'Park'
    4. Click Save. Click Next.

You can filter your resources by just a variety of parameters. Set the Key to any of the following to filter:
"$.State..Name" for the present Instance State, "$.InstanceId" for Instance ID, "$.InstanceType" for Instance Type.

.

  1. Here we choose the action that occurs during parking
    1. In order to stop the instances, click Edit, and choose the output of the filter node from the drop-down.
    2. Set the service as EC2 and action as Stop Instances
    3. Click Save. Click Next.

.

  1. Here we choose the action that occurs during un-parking
    1. In order to restart the instances, click Edit, and choose the output of the filter node from the drop-down.
    2. Set the service as EC2 and action as Start Instances
    3. Click Save. Click Next.

.

(Optional) You can also activate Smart Schedule, and enter a metric threshold (%). This will automatically park your instances when the metric goes below the value.

.

  1. Click Save, and then Save and Deploy. Save and Deploy will save and then activate the group according to the schedule.

.

  1. You will get a Successfully Saved Workflow notification, and can now see the Group in the Schedules tab.

Did You Find This Article Helpful?

TotalCloud Resource Scheduler Vs AWS Instance Scheduler

Case 2: Instances in ASG

Powered by HelpDocs