This code is designed to be executed via a scheduled CloudWatch event and will start any Workspaces that are currently in a "Stopped" state. This is intended to give administrators more control around when Workspaces receive Windows and application updates.
Please note that I cannot commit to supporting the provided code. This is meant to be used as an example and requires further testing to be used in a production environment
- Golang 1.x (https://golang.org/dl/)
- glide (https://glide.sh/)
- Execute the
local_build_script.sh
script - ZIP up the resulting binary file
bin/wm
- Create a new Lambda function from scratch (make sure the IAM role has the capability to describe/start/stop AWS Workspaces)
- Upload the zip (from the Build Step) as the Lambda "Function package" and set the handler to
wm
- Test the function (event content doesn't matter at this point)
- Add CloudFormation stack to deploy automatically
- Add support for Workspaces tags (only act on workspaces with a specific tag value)
- Add 'dry-run' support