For AWS CLI installation, we may need to have administrator rights otherwise we won’t be able to install AWS CLI on our work computer. But it’s still possible to install AWS CLI without the user being an administrator by following the below steps (These steps are only for Windows)
Contents
- Install AWS CLI on Windows as a Normal user
- Adding PATH for AWS CLI on windows
- Install AWS CLI on Windows SubSystem for Linux
Install AWS CLI on Windows as a Normal user
The below steps are only for Windows machines where you can install AWS CLI without being an Administrator. The only drawback of the below steps is AWS CLI won’t be added to PATH variable so you may need to launch it only from the folder where it is installed
Step 1: Go to AWS CLI from Amazon AWS site
Step 2: Scroll and Download the AWS CLI from the Window section
Step 3: Go to user Profile or just run the below command in the command prompt
msiexec /a %USERPROFILE%\Downloads\AWSCLIV2.msi /qb TARGETDIR=%USERPROFILE%\awscli
Step 4: Now go to the installation folder for AWS CLI (This will be under C:\Users\yourusername\awscli\Amazon\AWSCLIV2)
Step 5: Then open a command prompt from the above location
Step 6: Run the command “aws –version”
Step 7: This will display the current AWS version
Adding PATH for AWS CLI on windows
The above installation process is for an non-admin user. After installation of AWS the user needs to execute the AWS CLI only from the folder where it is installed. To set the PATH in Windows run the following command
setx PATH ^%PATH^%;"C:\Users\<<your_username>>\awscli\Amazon\AWSCLIV2"
Install AWS CLI on Windows SubSystem for Linux
The below steps are similar for any Linux system except here, you will open WSL and run the same commands
Step 1: Open WSL distro like Ubuntu you might have installed it from store
Step 2: Run curl “https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip” -o “awscliv2.zip” (The url may change from time to time)
Step 3: Once the zip file has been download, unzip it using the command “unzip awscliv2.zip“
Step 4: Then run the below command “sudo ./aws/install” to install AWS CLI on the Window Subsystem for Linux