Automated Deployment - Cost Optimizer for WorkSpaces on AWS

Automated Deployment

Before you launch the automated deployment, please review the architecture, configuration, and other considerations discussed in this guide. Follow the step-by-step instructions in this section to configure and deploy Cost Optimizer for Amazon WorkSpaces into your account.

Important

Deploy the hub template first. If you have a single-account environment, you do not need to deploy the spoke template. If you have a multi-account environment, install the spoke template for each WorkSpaces account you wish to monitor.

Time to deploy: Approximately five minutes

Launch the stack – Hub template

Important

This solution includes an option to send anonymous operational metrics to AWS. We use this data to better understand how customers use this solution and related services and products. AWS owns the data gathered though this survey. Data collection is subject to the AWS Privacy Policy.

To opt out of this feature, download the template, modify the AWS CloudFormation mapping section, and then use the AWS CloudFormation console to upload your template and deploy the solution. For more information, refer to the Collection of Operational Metrics section of this guide.

This automated AWS CloudFormation template deploys Cost Optimizer for Amazon WorkSpaces on the AWS Cloud.

Note

You are responsible for the cost of the AWS services used while running this solution. For more details, see the Cost section of this guide and the pricing webpage for each AWS service that you will be using in this solution.

  1. Sign in to the AWS Management Console and choose the following Launch Solution button to launch the workspaces-cost-optimizer AWS CloudFormation template.

    
              Launch solution button

    You can also download the template as a starting point for your own implementation.

  2. The template launches in the US East (N. Virginia) Region by default. To launch Cost Optimizer for Amazon WorkSpaces in a different AWS Region, use the Region selector in the console navigation bar.

    Important

    This solution uses AWS Lambda, AWS Fargate, and Amazon WorkSpaces, which are currently available in specific AWS Regions only. However, once deployed, the solution will monitor the WorkSpaces in any AWS Region. Also, you must launch this solution in the same account as the WorkSpaces you want to monitor. For the most current availability by Region, refer to the AWS Regional Services List.

  3. On the Select Template page, verify that you selected the correct template and choose Next.

  4. Under Parameters, review the parameters for the template and modify them as necessary. This solution uses the following default values.

    Parameter Default Description
    Launch in Dry Run Mode? Yes

    Generates a change log, but does not execute any changes. For more information, refer to Dry Run Mode.

    Simulate End of Month No Overrides date and forces the solution to run as if it is the end of the month.
    Log Level INFO Sets the log level for the Lambda function logs in CloudWatch.
    Value Limit 81 The number of hours a Value instance can run in a month before being converted to ALWAYS_ON.
    Standard Limit 85 The number of hours a Standard instance can run in a month before being converted to ALWAYS_ON.
    Performance Limit 83 The number of hours a Performance instance can run in a month before being converted to ALWAYS_ON.
    Power Limit 83 The number of hours a Power instance can run in a month before being converted to ALWAYS_ON.
    Graphics Limit 217 The number of hours a Graphics instance can run in a month before being converted to ALWAYS_ON.
    PowerPro Limit 80 The number of hours a PowerPro instance can run in a month before being converted to ALWAYS_ON.
    GraphicsPro Limit 80 The number of hours a GraphicsPro instance can run in a month before being converted to ALWAYS_ON.
    VPC CIDR 10.215.0.0/16 The default VPC CIDR used to deploy the AWS Fargate container dynamically when the solution runs.
    Subnet1 CIDR 10.215.10.0/24 One of two subnets in different Availability Zones where the AWS Fargate container is deployed.
    Subnet2 CIDR 10.215.20.0/24 The second of two subnets in different Availability Zones where the AWS Fargate container is deployed.
    Create New VPC Yes Select Yes to deploy the solution in a new Amazon VPC.
    Subnet ID for first subnet <Optional input>

    Subnet ID to launch an Amazon ECS task.

    Leave this blank if you selected Yes for Create New VPC or enter an existing subnet ID to run an Amazon ECS task.

    Subnet ID for second subnet <Optional input>

    Subnet ID to launch an Amazon ECS task.

    Leave this blank if you selected Yes for Create New VPC or enter an existing subnet ID to run an Amazon ECS task.

    Security group ID to launch ECS task <Optional input>

    Security group ID to launch an Amazon ECS task

    Leave this blank if you selected Yes for Create New VPC or enter an existing security group ID to run an Amazon ECS task.

    Terminate Unused Workspaces No Select Yes to delete WorkSpaces not used for one month.
    List of AWS Regions <Requires input>

    Comma separated list of AWS Regions for the solution to monitor.

    Example: us-east-1, us-west-2.

    Organization ID for multi account deployment <Optional input>

    AWS Organizations ID to support multi-account deployment.

    Leave blank for single account deployments.

    Account ID of the Management Account for the Organization <Optional input>

    Account ID for the Organization's management account.

    Leave blank for single account deployments.

  5. Choose Next.

  6. On the Options page, choose Next.

  7. On the Review page, review and confirm the settings. Check the box acknowledging that the template will create IAM resources.

  8. Choose Create to deploy the stack.

You can view the status of the stack in the AWS CloudFormation console in the Status column. You should see a status of CREATE_COMPLETE in approximately five minutes.

Note

In addition to the CostOptimizerCreateTask AWS Lambda function, this solution includes the solution-helper Lambda function, which runs only during initial configuration or when resources are updated or deleted.

When running this solution, you will see all Lambda functions in the AWS Management Console, but only the CostOptimizerCreateTask function is regularly active. However, do not delete the solution-helper function as it is necessary to manage associated resources.

Launch the stack – Spoke template

Important

This solution includes an option to send anonymous operational metrics to AWS. We use this data to better understand how customers use this solution and related services and products. AWS owns the data gathered though this survey. Data collection is subject to the AWS Privacy Policy.

To opt out of this feature, download the template, modify the AWS CloudFormation mapping section, and then use the AWS CloudFormation console to upload your template and deploy the solution. For more information, refer to the Collection of Operational Metrics section of this guide.

This automated AWS CloudFormation template deploys the spoke for Cost Optimizer for Amazon WorkSpaces on the AWS Cloud.

Note

You are responsible for the cost of the AWS services used while running this solution. See the Cost section for more details. For full details, see the pricing webpage for each AWS service you will be using in this solution.

  1. Sign in to the AWS Management Console and choose the following Launch Solution button to launch the workspaces-cost-optimizer-spoke AWS CloudFormation template.

    
                Launch solution button

    You can also download the template as a starting point for your own implementation.

  2. The template launches in the US East (N. Virginia) Region by default. To launch Cost Optimizer for Amazon WorkSpaces in a different AWS Region, use the Region selector in the console navigation bar.

    Important

    This solution uses AWS Lambda, AWS Fargate, and Amazon WorkSpaces, which are currently available in specific AWS Regions only. However, once deployed, the solution will monitor the Workspaces in any AWS Region. Also, you must launch this solution in the same account as the WorkSpaces that you want to monitor. For the most current availability by Region, refer to the AWS Regional Services List.

  3. On the Select Template page, verify that you selected the correct template and choose Next.

  4. Under Parameters, review the parameters for the template and modify them as necessary. This solution uses the following default values:

Parameter Default Description
Hub account ID <Requires input> The ID of the hub account for the solution. This stack should be deployed in the same Region as the hub stack in the hub account.
Logging level INFO Logging level.