logo
Menu

Amazon WorkSpaces: Billing Modes and Cost Optimization

A detailed guide for understanding cost and achieving cost efficiency when using Amazon WorkSpaces

Natallia Bahlai
Amazon Employee
Published Jun 7, 2024

Introduction

Customers use Amazon WorkSpaces, AWS's cloud-based Desktop-as-a-Service (DaaS) solution, to launch highly performant, scalable, and cost effective managed virtual desktops in the cloud. Managing costs is a crucial aspect for running such workloads, and Amazon WorkSpaces offers several options to help you optimize your spending. This article presents a comprehensive set of practical strategies to understand billing and optimize costs when using Amazon WorkSpaces, ensuring you only pay for the resources you actually need.

Amazon WorkSpaces billing modes explained

Amazon WorkSpaces operates in two running modes – the AutoStop running mode and the AlwaysOn running mode. The AutoStop running mode allows you to pay for your Amazon WorkSpaces by the hour. The AlwaysOn running mode is used when paying a fixed monthly fee for unlimited usage of your Amazon WorkSpaces. You can easily choose between monthly and hourly billing by selecting the running mode when you launch Amazon WorkSpaces through the Amazon Management Console, the Amazon WorkSpaces API, or the Amazon WorkSpaces CLI.
Running modeBilling modeCostWhen billedBilling scope
AlwaysOnMonthly billingFixed monthly feeat 00:00 UTC on 1/MM/YYRunning and stopped instances
AutoStopHourly billingFixed monthly feeat 00:00 UTC on 1/MM/YYRunning and stopped instances
Hourly feeWhen running (until stopped) or undergoing maintenanceRunning incl. undergoing maintenance instances
You can also switch between running modes for your Amazon WorkSpaces at any time, keeping in mind the following considerations:
  • If you choose to change the billing type from hourly to monthly, your total cost for a transition month will be a combination of hourly billing and prorated monthly billing (total cost $ = AutoStop monthly fee + AutoStop hourly fee for running hours + prorated AlwaysOn monthly fee). It's important to note that the cost might be slightly more during the transition month than it would be just in the AlwaysOn mode.
  • However, if you choose to change the billing type from monthly to hourly, your cost for a transition month will be AlwaysOn monthly fee. Hourly billing for AutoStop mode will take effect the following month, hence it is recommended to perform switch from the monthly AlwaysOn to the hourly AutoStop at the end of the month.
    Amazon WorkSpaces cost when billing mode changes mid-month
    Amazon WorkSpaces cost when billing mode changes mid-month

Cost optimization

There are multiple considerations to ensure cost-efficient usage of the Amazon WorkSpaces. These considerations are listed in the following table and explained in more details below:
DescriptionApproach
Save cost by switching WorkSpace to the most cost-effective running mode (AutoStop or AlwaysOn) based on the Workspaces usage relative to the break-even point.Approach 1) Identify break-even point leveraging Athena insights from Cost and Usage report by running CUR query. Approach 2) Leverage Cost optimizer tool for Workspaces to achieve automatic billing conversion to the most cost-effective option.
Terminate unused WorkSpacesTerminate unused WorkSpaces permanently from your account to stop the monthly fee associated with WorkSpaces.
Calibrate idle timeout for AutoStop WorkspacesReduce AutoStop time duration to min 1 hour to stop AutoStop Workspaces after users disconnect.
Right-size compute type (e.g. Standard, Power)Modify compute type with respect current usage patterns and matching Workspaces bundles specifications

Optimize running mode with respect to the usage

The best way to determine if a user should be on the AlwaysOn monthly plan or the AutoStop hourly plan is to understand the break-even point (see below image with formula) and compare the break-even point with the anticipated usage in hours. Below illustration demonstrates the cost-optimized line (dashed green line) by comparing costs of the different WorkSpace billing/running configurations (monthly AlwaysOn vs hourly AutoStop) across two usage level scenarios:
  • If usage is higher than break-even point, then the AlwaysOn with monthly billing provides the most cost savings.
  • If usage is lower than break-even point, then the AutoStop with hourly billing provides the most cost savings.
AlwaysOn vs AutoStop WorkSpaces cost comparison with respect to usage
AlwaysOn vs. AutoStop WorkSpaces cost comparison with respect to usage
The break-even point is slightly different for every bundle and can be calculated using the same formula:
f(x) = (AlwaysOn monthly fee – AutoStop monthly fee) / (AutoStop hourly fee)
To maintain cost-efficiency with Amazon Workspaces, it is advisable to regularly monitor WorkSpace usage patterns. As usage patterns evolve over time, adjusting the running mode accordingly can ensure you pay the lowest possible price.
Identify break-even point leveraging Amazon Athena insights based on the data from Cost and Usage report by running CUR query and modify running mode manually or through automated script
 
You can change the billing mode through AWS Management Console. Cost Optimizer for WorkSpaces supports this feature in automated mode where the solution converts a WorkSpace to the monthly or hourly billing model automatically, depending on the WorkSpace utilization for the given month and the break-even threshold.

Identify and terminate unused Amazon WorkSpaces

When AutoStop WorkSpaces are stopped, the hourly billing is suspended but the monthly fee still accrues. If the stopped WorkSpaces are no longer needed (e.g., users have been offboarded), deleting them entirely will eliminate the ongoing monthly idle charges.
There are multiple ways to identify unused workspaces:
    • Analyze CloudWatch metric UserConnected to identify unused workspaces. This metric is captured every few minutes and shows a value of 1 when a user is connected, and 0 when they are not.
  • Amazon WorkSpaces API:
  • AWS CLI:
    • The AWS CLI describe-workspaces-connection-status returns a paginated list, which includes a value for LastKnownUserConnectionTimestamp.
Once unused WorkSpaces are identified, you can delete the workspaces through the AWS Management Console. Alternatively, the Cost Optimizer feature for WorkSpaces can refer to LastKnownUserConnectionTimestamp to terminate unused WorkSpaces in the automated way. By default, this feature is set to "No", but you can allow this by selecting "Yes" or "Dry Run" for the input parameter "Terminate Unused WorkSpaces".
Keep in mind that the monthly fee is not prorated for partial month usage if you terminate WorkSpaces without utilizing an entire billing period.

Reduce idle timeout

Hourly usage charges are suspended when AutoStop WorkSpaces stop after a specified period of time of inactivity (timeout), or when scheduled maintenance is completed. Note that partial hours are rounded up as a full hour.
By default, the AutoStop Time (hours) is set to 1 hour, which means that the WorkSpace stops automatically 1 hour after being disconnected. Reducing the AutoStop timeout, for example to minimum 1 hour instead of 2 hours, can lead to significant cost savings. For example:
  • With a 2-hours timeout, if a user is active for 3.5 hours and then goes idle, the session is charged for 6 hours (3.5 hrs + 2 hr rounded up).
  • With a 1-hour timeout, the session is suspended after 5 hours instead of 6.
Extrapolating this across multiple users and instances, we start to see that lowering the AutoStop timeout to the default settings and reducing unnecessary idle charges can produce noticeable cost savings.

Right-size the compute type

Lastly, you can switch a WorkSpace between different compute types like Standard, Power, Performance, and PowerPro to match the actual compute requirements of the user.
The goal is to identify the most efficient bundle that aligns with the user's real resource needs to eliminate any overprovisioned instances and as result achieve cost savings.
The path to align the compute type with the most efficient bundle starts by analyzing CloudWatch metrics like CPU/memory used by the current compute type. It is recommended to analyze usage patterns, including peaks, over a longer period. As an example, you can created a data table for CPU Utilization by each WorkSpace as explained in the blog post. This will help you determine the appropriate target bundle. Refer to the Amazon Workspaces bundles table to identify the matching bundle that best fits the usage patterns. Once target bundle is identified, follow the instructions under modify a WorkSpace to change the WorkSpace compute type. Lastly, it is important to keep in mind that you can request a smaller compute type once every 30 days and a larger compute type once in a 6-hour period.
During the transition month, you are charged prorated amounts for both the new and the original WorkSpaces.

Conclusion

Throughout this post, we've explored the various billing modes of Amazon WorkSpaces and the key differences in billing, and outlined strategies to help you optimize Amazon WorkSpaces costs. In summary, we learned the following four practical options to achieve cost savings:
  • Billing/running mode calibration
  • Idle timeout customization
  • Termination of unused instances
  • Amazon WorkSpaces compute type right-sizing
By adopting these strategies, you can maximize cost-efficiency of your Amazon WorkSpaces.
 

Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.

Comments