Amazon Releases a Preview of the New AWS Tools for PowerShell

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Source: infoq.com

In a recent blog post, Amazon announced it would release a preview of refactored AWS Tools for PowerShell allowing developers and administrators to manage their AWS services from the PowerShell scripting environment. The preview provides developers and administrators faster startup time by allowing them to choose which module to install, and includes a mandatory parameters feature and has removed some old and obsolete cmdlets.

Since the first release of AWS for PowerShell back in 2012, Amazon has expanded the cmdlets for the toolkit until it almost reached 6000, spanning over 160 services. Next, to these cmdlets, Amazon also added a module for users of PowerShell 6 or higher, capable of being run cross-platform. All of these cmdlets in a single module meant that the time to import significantly increased.

Now, Amazon has tackled the problem of the load time by releasing a new set of modules to the PowerShell Gallery. Users can now get a preview release of a PowerShell module for each AWS Service. Furthermore, each of these preview PowerShell modules depends on a universal shared module named AWS.Tools.Common – a similar approach Amazon took with the AWS SDK for .NET on NuGet. 

According to the announcement blog post, Steve Roberts, senior technical evangelist at Amazon, explains the implication of this approach: 

  • Instead of downloading and installing a single large module for all services, developers and administrators can now install only the modules for services they need. By installing a service-specific module, the universal module will install automatically in the background.
  • Developers and administrators no longer need to explicitly import any of the preview modules before use, as the CmdletsToExport manifest property for each module is now correctly specified. 
  • The versioning strategy for the new modules currently follows the AWSPowerShell and AWSPowerShell.NetCore modules. The AWS team responsible for the PowerShell has detailed this strategy in their GitHub repository notice for the preview.

With the refactoring, the team also made some other changes – they removed some old and obsolete cmdlets like CloudWatchEvents, and ElasticLoadBalacing in favour of newer modules. Furthermore, it added mandatory parameters as a feature – allowing developers and administrators to mark parameters as necessary.

When writing PowerShell functions, developers and administrators need to create or update their scripts using the #Requires statement to use the new modules. Furthermore, they also need to add this statement for the universal module AWS.Tools.Common. For instance, if a developer creates a Lambda function in PowerShell that uses Amazon Simple Storage Service (S3), then he or she needs to add the following two statements to their function’s script file:

Developers and administrators can access the new modules from the PowerShell Gallery. Furthermore, they can submit any feedback, thoughts or compatibility issues on the GitHub issues repository of the AWS team responsible for the PowerShell modules.

Subscribe
Notify of
guest

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

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x