Skip to content

AWS CloudShell has outdated PowerShell runtime and outdated AWS PowerShell module

0

The AWS CloudShell environment has an ancient version of PowerShell and the AWS PowerShell module (aka. AWS Tools for PowerShell SDK). Can the AWS CloudShell team get PowerShell and the AWS PowerShell module updated please?


Also, I just noticed that AWS re:Post has a Tag for AWS Tools for Windows PowerShell, but PowerShell is cross-platform. It's not just for Windows, but also runs on MacOS and Linux.

Can you please create a tag called powershell and/or AWS Tools for PowerShell?

3 Answers
0

Hello,

I have read your post and I understand that you want the AWS CloudShell team to get PowerShell and the AWS PowerShell module updated. The following shells are pre-installed and ready for use in AWS CloudShell: the Bash shell, PowerShell, and the Z shell.

Concerning versions and Powershell updates, the AWS CloudShell development environment is regularly updated to provide access to the latest software and AWS does not provide specific version numbers in their documentation.

Instead, they describe how you can check which version is installed. Often this can be done by entering the program name followed by the --version option (for example, git --version ) or for PowerShell you can use $PSVersionTable

When in AWS CloudShell, switch to PowerShell using pwsh command & press Enter.

To check the lastest version of PowerShell on AWS CloudShell use $PSVersionTable command.

Creating the tags you mentioned would be very much helpful, however, I think that's something AWS needs to do on their side.

I hope this helps.

answered 4 years ago

0

The PowerShell and AWS Tools versions are mostly up to date. At this time...

The current PowerShell version is 7.4.6 and Cloudshell has 7.4.5

[cloudshell-user@ip-x-x-x-x ~]$ pwsh --version
PowerShell 7.4.5

And the latest of AWS Tools for PowerShell is 4.1.690 and CloudShell has version 4.1.656

PS /home/cloudshell-user> Get-AWSPowerShellVersion
AWS Tools for PowerShell
Version 4.1.656

as the previous post noted, the versions are updated regularly.

AWS

answered 2 years ago

0

If you need the most current version of AWS.Tools for PowerShell, you can run paste this script into the CloudShell console (from the bash prompt)

The will download the lasts AWS.Tools zip file and expand it into the user folder. Note that it consumes about 800MB of the 1000MB available user storage. You may also see version mismatch error, however PowerShell will prefer the modules in the user directory.

# Upload this file to CloudShell, run 'chmod +x tools.sh' and execute from a bash prompt
# Alternate - copy and paste into a CloudShell session
find "/home/cloudshell-user/.local/share/powershell/Modules" -type d -name "AWS.Tools.*" -exec rm -rf {} \; 2>/dev/null || true
curl -s -o AWS.Tools.zip "https://sdk-for-net.amazonwebservices.com/ps/v5/latest/AWS.Tools.zip"
unzip -q -o AWS.Tools.zip -d "/home/cloudshell-user/.local/share/powershell/Modules"
rm -f AWS.Tools.zip
pwsh

to remove AWS.Tools from the user storage, just run line 3 from the above script:

find "/home/cloudshell-user/.local/share/powershell/Modules" -type d -name "AWS.Tools.*" -exec rm -rf {} \; 2>/dev/null || true
AWS

answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.