Microsoft Windows Server - AWS OpsWorks

Microsoft Windows Server

Important

AWS OpsWorks Stacks is no longer accepting new customers. Existing customers will be able to use the OpsWorks console, API, CLI, and CloudFormation resources as normal until May 26, 2024, at which time they will be discontinued. To prepare for this transition, we recommend you transition your stacks to AWS Systems Manager as soon as possible. For more information, see AWS OpsWorks Stacks End of Life FAQs and Migrating your AWS OpsWorks Stacks applications to AWS Systems Manager Application Manager.

The following notes describe AWS OpsWorks Stacks support for Windows instances. Windows instances are available only for Chef 12.2 stacks. The exact version of Chef in a Windows stack is 12.22.

Currently, the AWS OpsWorks Stacks agent cannot be installed on—and AWS OpsWorks Stacks cannot manage—Windows-based instances that use a system UI language other than English - United States (en-US).

Versions

AWS OpsWorks Stacks supports the following Windows 64-bit versions:

  • Microsoft Windows Server 2022 Base

  • Microsoft Windows Server 2022 with SQL Server Express

  • Microsoft Windows Server 2022 with SQL Server Standard

  • Microsoft Windows Server 2022 with SQL Server Web

  • Microsoft Windows Server 2019 Base

  • Microsoft Windows Server 2019 with SQL Server Express

  • Microsoft Windows Server 2019 with SQL Server Standard

  • Microsoft Windows Server 2019 with SQL Server Web

Creating Instances

You create Windows instances with the AWS OpsWorks Stacks console, API, or CLI. Windows instances are Amazon EBS-backed, but you cannot mount extra Amazon EBS volumes.

Windows stacks can use 24/7 instances, which you start and stop manually. They can also use time-based automatic scaling, which automatically starts and stops instances based on a user-specified schedule. Windows-based stacks cannot use load-based automatic scaling.

You cannot register Windows instances that were created outside of AWS OpsWorks Stacks with a stack.

Updates

AWS updates Windows AMIs for each set of patches, so when you create an instance, it will have the latest updates. However, AWS OpsWorks Stacks does not provide a way to apply updates to online Windows instances. The simplest way to ensure that Windows is up to date is to replace your instances regularly, so that they are always running the latest AMI.

Layers

To handle tasks such as installing and configuring software or deploying apps, you will need to implement one or more custom layers with custom recipes.

Chef

Windows instances use Chef 12.22, and run chef-client in local mode, which launches a local in-memory Chef server called chef-zero. The presence of this server enables custom recipes to use Chef search and data bags.

Remote Login

AWS OpsWorks Stacks provides authorized IAM users with a password that they can use to log in to Windows instances. This password expires after a specified time. Administrators can use an SSH key pair to retrieve an instance's Administrator password, which provides unlimited RDP access. For more information, see Logging In with RDP.

AWS SDK

AWS OpsWorks Stacks automatically installs the AWS SDK for .NET on each instance. This package includes the AWS .NET libraries and AWS Tools for Windows, including the AWS Tools for PowerShell. To use the Ruby SDK, you can have a custom recipe install the appropriate gem.

Monitoring and Metrics

Windows instances support the standard Amazon CloudWatch (CloudWatch) metrics, which you can view in the CloudWatch console.

Ruby

The Chef 12.22 client that AWS OpsWorks Stacks installs on Windows instances comes with Ruby 2.3.6. However, AWS OpsWorks Stacks does not add the executable's directory to the PATH environment variable. To have your applications use this Ruby version, you can typically find it in C:\opscode\chef\embedded\bin\.

AWS OpsWorks Stacks Agent CLI

The AWS OpsWorks Stacks agent on Windows instances does not expose a command-line interface.

Proxy Support

Do the following to set up proxy support for Windows instances:

  1. Modify machine.config to add the following, which adds proxy support to Windows PowerShell (initial bootstrap) and .NET (AWS OpsWorks Stacks agent) applications:

    <system.net> <defaultProxy> <proxy autoDetect="false" bypassonlocal="true" proxyaddress="http://10.100.1.91:3128" usesystemdefault="false" /> <bypasslist> <add address="localhost" /> <add address="169.254.169.254" /> </bypasslist> </defaultProxy> </system.net>
  2. Run the following commands to set environment variables for later use by Chef and Git:

    setx /m no_proxy "localhost,169.254.169.254" setx /m http_proxy "http://10.100.1.91:3128" setx /m https_proxy "http://10.100.1.91:3128"
Note

For more control over how AWS OpsWorks Stacks updates your instances, create a custom AMI based on Microsoft Windows Server 2022 Base. For example, with custom AMIs you can specify which software is installed on an instance, such as Web Server (IIS). For more information, see Using Custom AMIs.