Skip to main content

Setting up Spot Scaling

Connect your AWS account

To use Spot Scaling, you must provide access to your AWS account to the CMP.

If your account is not linked already, follow the instructions to link your AWS account.

You also need to create an AWS IAM role and attach an IAM Policy with a requisite set of permissions. These permissions allow Spot Scaling to monitor your ASG behavior and make spot instance recommendations; they also allow you to implement the recommendations. Refer to creating new policies: Spot Scaling for details about the requisite permissions.

Add Spot Scaling to your account

Once the account is linked, you need to update the role attached to your account with additional permissions for Spot Scaling by adding a feature.

Make sure to select the checkbox of Spot Scaling, as shown below.

Spot Scaling Recommendations via CMP

You can check the recommendations, modify them as needed, and apply the recommendations in the CMP.

View Recommendations

Open the Spot Scaling page under Savings in the top navigation.

Auto Scaling Groups (ASGs) associated with the linked AWS account will appear on your Spot Scaling page. ASGs not optimized will have a value of Not Optimized under the Optimization Status column.

You can click an ASG to view its Spot Scaling recommendations.

Modify Recommendations

For an un-optimized ASG, you'll see the following:

  • Current Values the ASG's current configuration
  • Recommended Values Spot Scaling's recommendations

You'll also find the current on-demand costs and hours running for that ASG in the upper-left corner.

You can adjust the recommendations to your needs. You may modify the following values:

  • On-Demand Base Capacity
  • On-Demand Instances
  • Spot Instances
  • Allowed Instance Types
  • Availability Zones

To edit the values of Allowed Instance Types and Availability Zones, click the corresponding EDIT button. Click UPDATE when you've made your changes.

Apply Recommendations

To reconfigure your ASG according to Spot Scaling's recommendations, click APPLY RECOMMENDATIONS.

Once you've applied the recommendation, the Recommended Values column will disappear, the values under the Current Values column will be updated to reflect the changes, and the metrics displayed at the top will show the actual cost/hour breakdowns for on-demand and Spot, as well as the actual savings.

You can adjust the time range for which the metrics are displayed by clicking the Time Range dropdown in the upper-right corner.

After applying the recommendation, your ASG will have a value of Optimized under the Optimization Status column.

General Settings

Spot Scaling provides two optional features:

  • Automatically update If selected, Spot Scaling will constantly look for savings opportunities and automatically optimize the ASG.
  • Fallback to On-Demand If selected, when there are not enough EC2 instances to meet the capacity demand for Spot Instances, Spot Scaling will automatically fall back to On-Demand Instances.

Spot Scaling Auto-Enrollment

Spot Scaling Auto-Enrollment is a tool-agnostic solution that allows you to implement Spot Scaling recommendations using Infrastructure as Code (IaC) tools, for example, Terraform and AWS CloudFormation, instead of having to log in to the CMP.

Spot Scaling Auto-Enrollment is ideal for DevOps or Platforms teams who prefer using IaC tools to deploy and maintain their cloud infrastructure.

Enable Spot Scaling Auto-Enrollment via AWS ASG tags

Spot Scaling Auto-Enrollment leverages AWS ASG tags.

To enable Auto-Enrollment, use the following tags when creating your ASGs:

  • Tag to apply Spot Scaling recommendations:

    • Key: doitintl:spotscaling:auto-enroll
    • Value:
      • always: Allows Spot Scaling to apply continuous recommendations by finding new savings opportunities when AWS modifies/updates their pricing for the Spot market or when new resources are updated or released.
      • never: Stops Spot Scaling from applying recommendations.
  • Tag to enable fallback to on-demand:

    • Key: doitintl:fallback-to-on-demand
    • Value:
      • true: When there are not enough EC2 instances to meet the capacity demand for Spot Instances, Spot Scaling will automatically fall back to On-Demand Instances.
      • false: Spot Scaling will not fall back to On-Demand Instances in case of Spot Instance interruptions.
note

Tag keys and values are case-sensitive.

info

The current implementation of Auto-Enrollment only allows the two tags mentioned above. Recommendations will be made based on 20% of desired capacity exists On-Demand and 80% with Spot Instances. For the allowed instance type, the recommendations are similar machine types based on vCPUs and memory configuration.

To adjust the recommendations, you need to log in to the CMP to Modify Recommendations.