Cost Optimizer for Amazon WorkSpaces

What does this AWS Solution do?

This solution analyzes all of your Amazon WorkSpaces usage data and automatically converts the WorkSpace to the most cost-effective billing option (hourly or monthly), depending on your individual usage. You can use this solution with a single account, or with AWS Organizations across multiple accounts, to help you monitor your WorkSpace usage and optimize costs.

Benefits

Automatic WorkSpaces conversion

Automatically convert your WorkSpaces to the most cost-effective billing option (hourly or monthly), depending on your individual usage. 

Monitor your WorkSpaces usage

Monitor your WorkSpace usage and optimize costs by using AWS CloudFormation to automatically provision and configure the necessary AWS services to convert individual WorkSpaces.

Secure one-click deployment

Provide a secure one-click deployment using an AWS CloudFormation template developed with the AWS Well-Architected Framework methodologies.

AWS Solution overview

The diagram below presents the architecture you can automatically deploy using the solution's implementation guide and accompanying AWS CloudFormation template.

Cost Optimizer for Amazon WorkSpaces architecture

Note: This solution includes both a hub account template (deployed first) for a central account to manage the Workspaces and provide a centralized report, and a spoke account template (deployed second) for each WorkSpace account that you want to monitor. The solution generates a report per directory and also an aggregated report with information about WorkSpaces from all the directories combined. Refer to the Implementation Guide to access both templates.

  1. The spoke template creates a custom resource that invokes an AWS Lambda function to register the account as a spoke account in an Amazon DynamoDB table in the hub account.
  2. The hub template creates an Amazon EventBridge rule that invokes an Amazon Elastic Container Service (Amazon ECS) task every 24 hours.
  3. The Amazon ECS task assumes an AWS Identity and Access Management (IAM) role in each spoke account to manage WorkSpaces.
  4. The Amazon ECS task polls AWS Directory Service to gather a list of all directories registered for Amazon WorkSpaces in a specific AWS Region.
    • The task then checks the total usage for each WorkSpace that is on an hourly billing model. If a WorkSpace has met the monthly usage threshold, the solution will convert the individual WorkSpace to monthly billing.
    • At the end of the month, the task checks the total usage for each WorkSpace that is on a monthly billing model. If a WorkSpace has not met the monthly usage threshold, the solution will convert the individual WorkSpace from monthly to hourly billing at the start of the next month.
  5. The Amazon ECS task uploads the results to an Amazon Simple Storage Service (Amazon S3) bucket.

Cost Optimizer for Amazon WorkSpaces

Version 2.5.0
Last updated: 8/2022
Author: AWS

Estimated deployment time: 5 to 15 min

Use the button below to sign up for updates to this Solutions Implementation via email.
Did this Solutions Implementation help you?
Provide feedback 
Video
Solving with Solutions: Cost Optimizer for Amazon WorkSpaces
Build icon
Deploy an AWS Solution yourself

Browse our library of AWS Solutions to get answers to common architectural problems.

Learn more 
Find an APN partner
Find an AWS Partner Solution

Find AWS Partners to help you get started.

Explore icon
Explore Guidance

Find prescriptive architectural diagrams, sample code, and technical content for common use cases.

Learn more