Scale Spot Fleet using scheduled scaling - Amazon Elastic Compute Cloud

Scale Spot Fleet using scheduled scaling

Scaling based on a schedule enables you to scale your application in response to predictable changes in demand. To use scheduled scaling, you create scheduled actions, which tell Spot Fleet to perform scaling activities at specific times. When you create a scheduled action, you specify an existing Spot Fleet, when the scaling activity should occur, minimum capacity, and maximum capacity. You can create scheduled actions that scale one time only or that scale on a recurring schedule.

You can only create a scheduled action for Spot Fleets that already exist. You can't create a scheduled action at the same time that you create a Spot Fleet.

Limitation

The Spot Fleet request must have a request type of maintain. Automatic scaling is not supported for requests of type request, or Spot blocks.

To create a one-time scheduled action

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Spot Requests.

  3. Select your Spot Fleet request and choose the Scheduled Scaling tab near the bottom of the screen.

  4. Choose Create Scheduled Action.

  5. For Name, specify a name for the scheduled action.

  6. Enter a value for Minimum capacity, Maximum capacity, or both.

  7. For Recurrence, choose Once.

  8. (Optional) Choose a date and time for Start time, End time, or both.

  9. Choose Submit.

To scale on a recurring schedule

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Spot Requests.

  3. Select your Spot Fleet request and choose the Scheduled Scaling tab near the bottom of the screen.

  4. For Recurrence, choose one of the predefined schedules (for example, Every day), or choose Custom and enter a cron expression. For more information about the cron expressions supported by scheduled scaling, see Cron Expressions in the Amazon CloudWatch Events User Guide.

  5. (Optional) Choose a date and time for Start time, End time, or both.

  6. Choose Submit.

To edit a scheduled action

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Spot Requests.

  3. Select your Spot Fleet request and choose the Scheduled Scaling tab near the bottom of the screen.

  4. Select the scheduled action and choose Actions, Edit.

  5. Make the needed changes and choose Submit.

To delete a scheduled action

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Spot Requests.

  3. Select your Spot Fleet request and choose the Scheduled Scaling tab near the bottom of the screen.

  4. Select the scheduled action and choose Actions, Delete.

  5. When prompted for confirmation, choose Delete.

To manage scheduled scaling using the AWS CLI

Use the following commands: