Cloudability Automation

Automation allows you to control your environment and save money on your cloud spend. You can scale down or stop development, test resources during periods of under utilization, detect and remove waste, and create and maintain a culture of cost savings.

In Automation, you can set up and schedule the following tasks:

  • Unattached EBS Volume Cleanup - Find, Snapshot, and Remove Unattached EBS Volumes. In this task, you can choose Accounts and Tags that you want to scan for Unattached Volumes, and configure how long the Volume is shown as unattached before a snapshot is generated to volume is terminated.
  • EBS Snapshot Creation - Create a schedule to generate snapshots from EBS volumes by Account, Tag, Name, and ID.
  • EBS Snapshot Cleanup - Cleanup old EBS snapshots that are costing you money. Create a policy for how long they should stick around. Select Snapshots by Account and Tag.
  • ASG Scale Down & Scale Up: Scale ASGs down to 0, and back up, on a schedule. Turn your development resources off during nights and weekends. Select ASGs by Account, Tag, or Name.
  • EC2 Stop & Start - Stop and start your EC2 instances on a schedule. Turn your development resources off during nights and weekends. Select EC2s by Account, ID, Tag, or Name.
    NOTE : Currently there is no support for EC2 instances that have an attached EBS volume that is encrypted.
  • RDS Stop & Start - Stop RDS instances during periods when they are not utilized and start them up again when you need them. Select instances by Account, ID, and tag.

Use Case

View each task run, when it was executed, and see the number of resources affected during that run.

Before you Begin

  1. Contact your Admin at Cloudability, or request access via Cloudability Support.
  2. Once you have been granted access (Automation is an Admin only feature),generate a new credential policy for each account you want to perform automation on. See Credentials . Ensure that INCLUDE AUTOMATION PERMISSIONS box is selected while creating the policy.
  3. nce the new policy with Automation is generated, delete any existing Cloudability credentials stack(s), create a new one and re-verify your credentials in Cloudability. For more information, see the Connect Amazon Web Services .
  4. Create your first Automation task .

Setting up tasks

In this example, we are going to create a task to scale down an Auto Scaling Group. Note that, the task is also named ASG Development Scale Down/Up.

Set your schedule

In this example, we will be scale down the ASGs Monday, Tuesday, Wednesday, Thursday, and Friday at 01:00 UTC, and scale them back up each day at 12:00 UTC.

Select the resources

In this example, the task will run on any ASG in the AWS Production account with the tag Environment:Development .

Note: you must always select at least one account, and then pair down the scope of resources by selecting Cloudability tags or by targeting resources individually by name or ID. If you select an account with no additional filters, the task will run on all resources (ASG or EC2) in that Account.

If you are setting up a task to clean up unattached EBS volumes, there is no need set a schedule, as that task runs every hour to look for new volumes. However, you have to configure resource selection (just like above in the ASG task), and also pick the number of days you want to wait to delete the volume after noticing that it is unattached. In the below example, you are looking for unattached volumes in your AWS Production account, and delete any unattached volumes 15 days after detection (if still unattached at that time).

Now, you can preview your task to see what resources were impacted. If you see resources you did not intend to automate, you can edit your task configuration, and preview again.

Note:

Some resources cannot be automated due to AWS rules. But if resources are added in the future that meet your task filters, they also may be impacted by the task.

At this point, you are ready to schedule your task. If you want to make adjustments, you can edit the task configuration using the ... menu on the task list and by selecting the Edit icon.

Reading the Audit Log

The Automation audit log shows you events that impact your environment. A few sample audit entries are mentioned here:

ASG Scale Down & Up

Resources Affected : This refers to the number of Auto Scaling Groups that were either Scaled Up or Down during that task run.

Example : "3 Instances"

Description : This gives a brief description of exactly what happened during that task run.

Example : "3 groups scaled down"

EC2 Stop & Start

Resources Affected : This refers to the number of EC2 Instances that were either Stopped or Started during that task run.

Example : "4 Instances"

Description : This gives a brief description of exactly what happened during that task run.

Example : "4 Instances Started"

What does "X Skipped Instances" mean? : Automation does not support EC2 instances that have an attached volume that is encrypted. This is due to the permissions required to start instances from an external service. If you schedule a task that includes instances in this state, they will be skipped, so we don't stop something we cannot start. In future versions, these resources will be removed from the preview.

EBS - Clean up Unattached Volumes

Resources Affected : This refers to the number of Volumes that were terminated during that task run.

Example : "1 Instance"

Description : This gives a brief description of exactly what happened during that task run.

"1 new attached volumes" - This indicates that a new EBS volume is detected and is currently attached. It will be monitored if it becomes unattached in the future.

  • "1 new attached volumes" - This indicates that a new EBS volume is detected and is currently attached. It will be monitored if it becomes unattached in the future.
  • "3 new detached volumes" - This indicates that a new unattached volume is detected and tagged to an unattached time. It will be scheduled for snapshot and termination based on the threshold set in your task configuration.
  • "3 snapshots created" - This indicates that 3 unattached volumes are scheduled for termination, and we have created snapshots of them ahead of termination, which will happen when the next task runs in an hour.
  • "3 snapshots deleted" - This indicates that we can verify that snapshots were successfully taken on 3 volumes, and we have sent the required API calls to AWS to delete these three volumes.

All task types

Last Executed : This is the last time the task ran. For tasks with a schedule, this should always be based on the task's schedule. For items that run on a regular cadence like the EBS - Cleanup Unattached volumes task, this is the time related to the specific audit entry you are looking at.

Result : This indicates if the task run was successful, or in the unlikely case, failed. If failure is indicated, you can hover over the Error icon for an error code. If this happens, please let us know.

What does "0 Instances Affected" mean? : This means that the audit entry is not related to an event where we stopped, started, scaled, or terminated a resource. Examples of this are task creation, EBS volume discovery, or EBS snapshot creation.