AWS Developer Tools Blog

AWS Tools Installer V2 Preview

If you’ve been managing multiple AWS Tools for PowerShell modules individually, you know how time-consuming installations and updates can be. Today, we’re excited to announce AWS Tools Installer V2, which provides performance improvements and additional guidance.

Improvements in V2

Standard PowerShell installation commands like Install-Module and Install-PSResource download modules that are packaged individually. To maximize performance when installing hundreds of modules, AWS Tools Installer V2 installs modules that are packaged together from Amazon CloudFront. We recommend installing all AWS Tools for PowerShell modules together as a complete set so that commands are available for immediate use and to avoid module import conflicts that arise when all modules have not been updated to the same version.

The following example shows how to install all AWS Tools for PowerShell modules at once by running Install-AWSToolsModule. Use the -Version parameter to limit updates to minor versions of V5 of AWS Tools for PowerShell to reduce the risk of breaking changes.

Install-AWSToolsModule -Version 5.*

AWS Tools Installer V2 also introduces the self-update commands Install-AWSToolsInstaller and Uninstall-AWSToolsInstaller so that the installer module itself is easier to update.

The following example shows how to install the latest minor version updates for AWS Tools Installer V2 to reduce the risk of breaking changes.

Install-AWSToolsInstaller -Version 2.*

Bugs Fixed

V2 resolves two key issues:

  1. Previously, latest modules would no longer be installed on systems where discontinued modules were installed. V2 now successfully updates all modules that are not discontinued.
  2. During the daily release window, installations sometimes failed because modules were still being published. V2 avoids this by only installing versions of modules that have completed the publishing process.

New Features

  1. Support for Offline Installation: A new parameter called -SourceZipPath enables installation from locally-staged files in offline or air-gapped environments.
  2. Support for Prerelease Installation: A new parameter called -Prerelease enables installation of preview builds of AWS Tools for PowerShell and AWS Tools Installer.
  3. Installer Update Notifications: When importing AWS Tools Installer, it writes a message to the host to notify users if a new version is available.
  4. Support for Standard Removal of PowerShell Module: AWS Tools Installer now adds metadata to enable module removal through standard PowerShell commands (Uninstall-Module and Uninstall-PSResource).
  5. Removal of Legacy Modules: AWS Tools Installer V2 supports uninstalling the legacy AWSPowerShell and AWSPowerShell.NetCore modules from your PSModulePaths. Unlike these legacy modules, which load everything at once, AWS Tools for PowerShell modules import quickly and automatically as needed.
Uninstall-AWSToolsModule -CleanUpLegacyScope 'CurrentUser'
Install-AWSToolsModule -CleanUpLegacyScope 'CurrentUser'

Breaking Changes

You must plan for the following potential issues when upgrading:

  1. AWS Tools Installer V2 uses the endpoint https://sdk-for-net.amazonwebservices.com/ps/ to download zip files. You might need to update your firewall rules to allow access to this endpoint.
  2. The parameters -Proxy and -ProxyCredential have been removed. Please configure proxy settings for your environment if necessary.
  3. The -Force parameter has been removed for Uninstall-AWSToolsModule. Using Install-AWSToolsModule -Force will confirm that any existing module will be overwritten even if it has the same name and version compared to the module that was downloaded. To skip interactive confirmation prompts when using cmdlets, use the following syntax: -Confirm:$false.
  4. The parameters -SkipUpdate, -SkipPublisherCheck, and -AllowClobber are now ignored and have no effect. While these parameters are still accepted for backward compatibility, they no longer perform any function. Scripts relying on -SkipUpdate to prevent updates of other installed modules will now have all installed modules updated.

Note: The original behavior of cmdlets from V1 is preserved in the additional cmdlets: Install-AWSToolsModuleV1, Uninstall-AWSToolsModuleV1, and Update-AWSToolsModuleV1. An alias can be defined for each cmdlet so that all legacy scripts running on a system map back to the original functionality after upgrading to V2, for example:

Set-Alias -Name Install-AWSToolsModule -Value Install-AWSToolsModuleV1

Getting Started

To obtain the preview build of AWS Tools Installer V2 you can install from PSGallery using Install-Module:

Install-Module -Name AWS.Tools.Installer -MinimumVersion 2.0.0 -AllowPrerelease

Please note that this a preview build and is not intended for use in production environments.

Review Help Documentation

Once installed, run the following PowerShell command to list AWS Tools Installer commands.

Get-Command -Module AWS.Tools.Installer

Use the Get-Help command to view the documentation for a particular AWS Tools Installer command. For example:

Get-Help Install-AWSToolsModule -Full

Provide Feedback

We’re looking forward to hearing what you think about the new version of AWS Tools Installer. Please share any feedback you have on the AWS Tools Installer V2 Preview Tracker at the AWS Tools for PowerShell GitHub repository.

GA Release Following Preview

We are planning to release V2 for general availability once we’ve had an opportunity to collect feedback. To avoid breaking changes, please make sure that your production workloads are configured to NOT install major version updates:

Install-Module -Name AWS.Tools.Installer -MaximumVersion '1.9.999'
Jonathan Nunn

Jonathan Nunn

Jonathan is a Software Development Engineer at AWS, focusing on solutions that improve the customer experience for AWS Tools for PowerShell. You can find him on GitHub @jnunn-aws