For those who have been using Windows for a long time, adding and removing programs through the Control Panel might be familiar. The "Add or Remove Programs" feature was renamed to "Programs and Features," allowing users to view, modify, and remove installed software.

0. Checking AWS CLI Version

In Windows 11, you can search for "AWS" in the "Programs and Features" menu to see the installed version of AWS CLI, which is 2.15.9.0 in this example.

(Searching with "AWS" keyword on my Windows 11 computer)

 

AWS CLI is a command-line tool that lets you manage AWS services. By running aws configure, you can easily set up your Access Key ID, Secret Access Key, and your target region name to control your AWS services. Initially, you might have downloaded and installed AWS CLI directly from the official website. However, checking for updates and upgrading to the latest version can be tedious. This is where winget comes in handy for managing AWS CLI upgrades.

1. Introduction to winget

winget is a package manager for Windows 10 and later, allowing you to install, upgrade, and remove software easily. You can automate software management using CLI commands. To install winget, search for "App Installer" in the Microsoft Store or visit this link and click the "Install" button.

Installing "App Installer" for winget using Microsoft Store

 

2. Basic winget Commands

Using winget is similar to using apt on Ubuntu. If you're familiar with the sudo apt update && sudo apt upgrade commands, you'll find winget's update and upgrade commands straightforward. Note that update is an alias for upgrade. For detailed help, visit this link or refer to the blog post (in Korean) by Microsoft MVP Soonman Kwon.

 

winget vs. apt (looks quite similar, doesn't it?)

 

3. Installing AWS CLI

While the official AWS documentation provides instructions for downloading and installing the MSI installer, you can also use winget for a hassle-free installation. Visit winget.run for the AWS CLI installation command. Note that the site may not always have the latest version information.

How to install AWS CLI from https://winget.run/pkg/Amazon/AWSCLI (Note: this this may not be the latest version on the website).

4. Upgrading and Managing AWS CLI with winget

If AWS CLI is already installed, you can upgrade to the latest version with the following command:

> winget install Amazon.AWSCLI

To check the installed version of AWS CLI, run:

> aws --version
aws-cli/2.15.9 Python/3.11.6 Windows/10 exe/AMD64 prompt/off

 

You can also check the installed version and the latest available version using PowerShell:

> winget list | Select-String -Pattern AWS

Freedom Scientific JAWS 2024            FreedomScientific.JAWS.2024              2024.2310.70.400     2024.240??winget
Freedom Scientific JAWS Training Table??{AE1E7553-752E-4D04-9695-EE1FB83C54AE}   25.0.2005.0
AWS Command Line Interface v2           Amazon.AWSCLI                            2.15.9.0             2.16.4    winget

 

To update to the latest version, execute:

> winget upgrade Amazon.AWSCLI

 

To uninstall AWS CLI, use:

 
> winget uninstall Amazon.AWSCLI

5. Upgrading Multiple Packages with winget

winget allows you to upgrade multiple packages at once. To upgrade all software, use:

winget upgrade --all​
or below to upgrade a specific package:
 
winget upgrade [package_name]
 
 

Using winget to install, upgrade, and remove AWS CLI is straightforward. Keeping your software up to date ensures you have the latest features and security patches. Regularly check for upgrades using winget to manage AWS CLI and other installed software efficiently.

+ Recent posts