Amazon Releases a Preview of the New AWS Tools for PowerShell

AWS

YOUR COSMETIC CARE STARTS HERE

Find the Best Cosmetic Hospitals

Trusted • Curated • Easy

Looking for the right place for a cosmetic procedure? Explore top cosmetic hospitals in one place and choose with confidence.

“Small steps lead to big changes — today is a perfect day to begin.”

Explore Cosmetic Hospitals Compare hospitals, services & options quickly.

✓ Shortlist providers • ✓ Review options • ✓ Take the next step with confidence

Originally reported by InfoQ, sourced from the Amazon AWS blog (August 2019).

Overview

Amazon announced a preview of a significantly refactored AWS Tools for PowerShell, giving developers and system administrators a faster, more modular way to manage AWS services from the PowerShell scripting environment. The preview introduced per-service modules, a shared common module, mandatory parameters, and the removal of several obsolete cmdlets.

Background: Growth of the Original Module

Since the first release of AWS Tools for PowerShell in 2012, Amazon steadily expanded the toolkit to nearly 6,000 cmdlets spanning more than 160 AWS services. Amazon also added a cross-platform module targeting PowerShell 6 and above (AWSPowerShell.NetCore), enabling use on Linux and macOS in addition to Windows.

Packaging all cmdlets in a single monolithic module, however, caused the module import time to grow substantially. Every PowerShell session that used AWS Tools had to load the entire library, regardless of how many services were actually needed.

What Changed in the Preview

Per-Service Modules on the PowerShell Gallery

To solve the load-time problem, Amazon published a preview set of individual modules to the PowerShell Gallery — one module per AWS service. This mirrors the approach Amazon already used for the AWS SDK for .NET on NuGet, where consumers install only the NuGet packages for the services they require.

Each service-specific module declares a dependency on a universal shared module named AWS.Tools.Common. Installing any service module automatically pulls in AWS.Tools.Common in the background, so users do not need to install it separately.

Key Improvements Explained by Amazon

Steve Roberts, senior technical evangelist at Amazon, outlined the main benefits of this approach:

  • Selective installation: Instead of downloading one large module, developers and administrators install only the modules for the services they use. Dependency resolution handles the rest automatically.
  • No explicit imports required: The CmdletsToExport manifest property is now correctly populated for each module, so PowerShell can discover and auto-import cmdlets without requiring an explicit Import-Module call in every script.
  • Aligned versioning: The new per-service modules follow the same versioning strategy as the existing AWSPowerShell and AWSPowerShell.NetCore modules. The AWS PowerShell team documented the details of this strategy in their GitHub repository.

Mandatory Parameters

The preview also introduced mandatory parameters as a feature. Cmdlet parameters that are always required can now be declared mandatory, causing PowerShell to prompt the user if those parameters are omitted — rather than failing with a less descriptive error at runtime.

Removal of Obsolete Cmdlets

During the refactoring, Amazon removed several old and obsolete cmdlets — including those previously associated with CloudWatchEvents and ElasticLoadBalancing — in favour of their modern equivalents. Teams migrating existing scripts should audit for any removed cmdlets before adopting the new modules.

Updating Your Scripts to Use the New Modules

When writing or updating PowerShell scripts and functions to use the preview modules, you need to declare module dependencies using the #Requires statement. You must add a #Requires line for each service-specific module your script uses, as well as for AWS.Tools.Common.

For example, if you are writing a Lambda function in PowerShell that interacts with Amazon Simple Storage Service (S3), add the following two statements at the top of your script file:

#Requires -Modules @{ModuleName='AWS.Tools.Common';ModuleVersion='3.3.x'}
#Requires -Modules @{ModuleName='AWS.Tools.S3';ModuleVersion='3.3.x'}Code language: PHP (php)

Note: Replace 3.3.x with the specific version available in the PowerShell Gallery at the time of your installation. Check the Gallery listing for the current version.

Where to Get the Modules and Submit Feedback

The preview modules are available on the PowerShell Gallery. Search for AWS.Tools.* to find the full list of available service modules. Developers and administrators can submit feedback, bug reports, or compatibility issues through the GitHub issues page of the AWS PowerShell team’s repository.

Summary

FeatureOld (Monolithic) ModuleNew (Per-Service) Modules
Installation unitSingle large module (~6,000 cmdlets)One module per AWS service
Import timeSlow — all services loadedFast — only needed services loaded
Explicit import neededOften requiredNot required (CmdletsToExport populated)
Shared dependencyNoneAWS.Tools.Common
Mandatory parametersNot supportedSupported
Cross-platformAWSPowerShell.NetCore onlyAll new modules support PS 6+

The move to per-service modules significantly reduces startup overhead and aligns the PowerShell toolkit with established practices in other AWS SDK ecosystems. Teams managing AWS infrastructure with PowerShell should evaluate the preview, test their existing scripts for removed cmdlets, and update their #Requires declarations before the stable release.

0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x