Skip to content

Conversation

@cpr-nwright
Copy link

@cpr-nwright cpr-nwright commented Nov 10, 2025

This PR allows using the AWS.Tools powershell modules for the AWSPowershellModuleScript task.

Description

This PR changes the logic for autoinstalling the AWSPowershell module. Currently, the task will check if the AWSPowershell module is installed, and install it if it isn't. This change makes it so the task first checks for the AWS.Tools.Common module, and if it finds it, it does not attempt to install or import the AWSPowershell module. Additionally, if the AWS.Tools.Common module is found, it will attempt to import the AWS.Tools.SecurityToken module to facilitate role assumption using service connections.

This may break assuming a role via a service connection for agents that have AWS.Tools.Common installed without AWS.Tools.SecurityToken

Motivation

This allows agents to use the AWS.Tools powershell modules. These are the recommended way to install the AWS powershell cmdlets per this page, and they avoid the excessive load times seen with the monolithic modules.

Related Issue(s), If Filed

fixes #366 and fixes #520

Checklist

  • I have read the README document
  • I have read the CONTRIBUTING document
  • My code follows the code style of this project
  • [-] I have added tests to cover my changes
  • A short description of the change has been added to the changelog using the script npm run newChange

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@cpr-nwright cpr-nwright requested a review from a team as a code owner November 10, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure DevOps Task 'AWS Tools for Windows PowerShell Script' - Ignore PS Module Check Choose which modules install when Powershell Task runs

1 participant