What does this Amazon Web Services Solution do?

Amazon WorkSpaces is a fully managed, secure Desktop-as-a-Service (DaaS) solution which runs on Amazon Web Services . With Amazon WorkSpaces, you can easily provision virtual, cloud-based Microsoft Windows desktops for your users, providing them access to the documents, applications, and resources they need, anywhere, anytime, from any supported device. Amazon WorkSpaces offers the flexibility to pay hourly or monthly without any up-front commitment.

To help customers with unpredictable WorkSpace usage patterns monitor their Amazon WorkSpaces usage and optimize costs, the Amazon WorkSpaces Cost Optimizer is a solution analyzes all of your WorkSpace usage data and automatically converts the WorkSpace to the most cost-effective billing option (hourly or monthly) depending on the user's individual usage. This solution is easy to deploy and uses Amazon CloudFormation to automatically provision and configure the necessary Amazon Web Services services.

The following section assumes basic knowledge of architecting on the Amazon Web Services Cloud, virtual desktops and Amazon WorkSpaces.

Amazon Web Services Solution overview

This solution automatically converts WorkSpaces to the most cost-effective billing option (hourly or monthly) depending on a user's individual usage. The diagram below presents the Amazon WorkSpaces Cost Optimizer architecture you can automatically deploy using the solution’s implementation guide and accompanying Amazon CloudFormation template.

 Click to enlarge

Amazon WorkSpaces Cost Optimizer solution architecture

This solution deploys an Amazon CloudWatch event that invokes an Amazon Lambda function every 24 hours. The Lambda function leverages Amazon Elastic Container Service (Amazon ECS) to create an Amazon Fargate task definition to poll Amazon Directory Service to gather a list of all directories registered for Amazon WorkSpaces in a specific Amazon Web Services Region.

The Fargate task checks each WorkSpace for total usage for the month and converts the WorkSpace to the most efficient billing model depending on usage. Amazon Simple Storage Service (Amazon S3) stores a log file with the conversions.

Amazon WorkSpaces Cost Optimizer

Version 2.2.1
Last updated: 04/2020
Author: Amazon Web Services 

Estimated deployment time: 5 min

Source code 
Use the button below to subscribe to solution updates.

Note: To subscribe to RSS updates, you must have an RSS plug-in enabled for the browser you are using. 


Amazon WorkSpaces Cost Optimizer reference implementation

Leverage Amazon WorkSpaces Cost Optimizer as a reference implementation to automatically launch and configure the components necessary to monitor your Amazon WorkSpaces usage and convert the WorkSpaces to the most cost-effective billing model.

Automatic WorkSpaces conversion

Automatically convert your WorkSpaces billing model with Amazon CloudWatch, Amazon Lambda, Amazon Fargate, and Amazon Workspaces. Amazon S3 stores a log of the conversions.
Standard Product Icons (Features) Squid Ink
Explore all Amazon Web Services Solutions

Browse our portfolio of Amazon Web Services -built solutions to common architectural problems.

Learn more 
Find a Partner

Find Amazon Web Services certified consulting and technology partners to help you get started.

Learn more 
Standard Product Icons (Start Building) Squid Ink
Start building in the console

Sign-up and start exploring our services.

Get started