Overview
Cost Optimizer for Amazon WorkSpaces 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 AWS Solution with a single account—or with AWS Organizations across multiple accounts—to help you monitor your WorkSpace usage and optimize costs.
This solution calculates hourly WorkSpace usage once per day, just before midnight GMT. If the WorkSpace exceeds the hourly usage threshold, the solution will convert the WorkSpace from hourly to monthly billing. If usage exceeds the threshold after the nightly calculation, the WorkSpace will not be converted until usage is calculated the following night.
You can manually change the billing model at any time using the WorkSpaces console. If you want to change the threshold for when each Workspace converts from hourly to monthly billing, the solution’s AWS CloudFormation template includes parameters that will execute these conversions. For more information, review Billing model conversion in the implementation guide.
Benefits
Automatically convert your WorkSpaces to the most cost-effective billing option (hourly or monthly), depending on your individual usage. If desired, you can apply a resource tag to individual WorkSpaces to exclude them from automatic conversions.
Monitor your WorkSpace usage and optimize costs by using AWS CloudFormation to automatically provision and configure the necessary AWS services to convert individual WorkSpaces.
Provide a secure one-click deployment with a CloudFormation template developed using the AWS Well-Architected Framework.
Technical details
You can automatically deploy this architecture using the implementation guide and the AWS CloudFormation template.
Step 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.
Step 2
The hub template creates an Amazon EventBridge rule that invokes 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 Amazon WorkSpaces.
Step 4a
The Amazon ECS task polls AWS Directory Service to gather a list of all directories registered for WorkSpaces in a specific AWS Region.
Step 4b
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.
Step 4c
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.
Step 5
The Amazon ECS task writes the results of the execution to the DynamoDB usage table, session tables, and uploads them to an Amazon Simple Cloud Storage (Amazon S3) bucket.
Related content
- Publish Date