Data & Analytics

Solutions for Cloud Operations

This solution provides an automated approach to analyze and optimize the usage of Amazon WorkSpaces by converting them to the most cost-effective billing option (hourly or monthly) based on individual usage patterns. Whether you are managing WorkSpaces in a single account or across multiple accounts within AWS Organizations, this solution helps monitor WorkSpace usage and reduce costs efficiently.


  1. Automatic WorkSpaces Conversion: The solution automatically converts WorkSpaces to the most cost-effective billing option (hourly or monthly) based on usage. You can also exclude specific WorkSpaces from automatic conversion by applying a resource tag.
  2. Usage Monitoring: Monitor WorkSpace usage and optimize costs using AWS CloudFormation, which automatically provisions and configures the required AWS services for individual WorkSpace conversions.
  3. Secure Deployment: Employ a secure one-click deployment mechanism through an AWS CloudFormation template designed following AWS Well-Architected Framework methodologies.

Technical Insights

  • Usage Calculation: The solution calculates hourly WorkSpace usage once daily, just before midnight GMT. If a WorkSpace surpasses the hourly usage threshold, it’s converted from hourly to monthly billing. If usage exceeds the threshold after the nightly calculation, the conversion occurs on the subsequent night’s calculation.
  • Manual Billing Change: You retain the flexibility to manually change the billing model via the Amazon WorkSpaces console. The solution’s AWS CloudFormation template includes parameters for adjusting the threshold at which WorkSpaces convert from hourly to monthly billing.

Architecture Flow

Step 1:
The spoke template establishes a custom resource invoking an AWS Lambda function, registering the account as a spoke account in an Amazon DynamoDB table within the hub account.

Step 2:
The hub template creates an Amazon EventBridge rule, triggering an Amazon Elastic Container Service (Amazon ECS) task every 24 hours.

Step 3:
The Amazon ECS task assumes an AWS Identity and Access Management (IAM) role in each spoke account to manage WorkSpaces.

Step 4a:
The Amazon ECS task polls AWS Directory Service to collect a list of all directories registered for Amazon WorkSpaces within a specific AWS Region.

Step 4b:
The task assesses total usage for each WorkSpace on hourly billing. If a WorkSpace meets the monthly usage threshold, it’s converted to monthly billing.

Step 4c:
Towards the end of the month, the task evaluates total usage for each WorkSpace on monthly billing. If a WorkSpace doesn’t meet the monthly usage threshold, it’s converted from monthly to hourly billing at the start of the next month.

Step 5:
The Amazon ECS task uploads outcomes to an Amazon Simple Storage Service (Amazon S3) bucket.

By leveraging this solution, you can seamlessly optimize your Amazon WorkSpaces costs based on actual usage patterns, ensuring you pay only for the resources you truly need. The provided architecture diagram offers a more comprehensive visual representation of the flow and components involved.

Why Choose Us

With great power comes great productivity.

Smart Solutions

We have smart solutions that will surely solve your problems

Certified Expert

We have the best experts in our team

24/7 Support

We will always help you when you contact us