Installing AWS CLI
The AWS Command Line Interface (AWS CLI) is available in the following versions:
Version 2.x: The current, generally available release of the AWS CLI that is intended for use in production environments.
Version 1.x (32-bit support): The previous version of the AWS CLI is available for backward compatibility. Note: Healthjump recommends version 2 of the AWS CLI as Python 2.7 was deprecated by the Python Software Foundation on January 1, 2020. Going forward, customers using the AWS CLI version 1 should transition to using Python 3, with a minimum of Python 3.6. Python 2.7 support is deprecated for new versions of the AWS CLI version 1 starting 7/15/2021. Python 3.4 and 3.5 will be deprecated starting 2/1/2021.
Installing AWS CLI version 2
AWS CLI version 2 is the most recent major version of the AWS CLI and supports all of the latest features. TAWS CLI version 2 is available to install only as a bundled installer.
Before you can install or update the AWS CLI version 2 on Windows, be sure you have the following:
- A 64-bit version of Windows XP or later.
- Admin rights to install software
Download and run the AWS CLI MSI installer for Windows (64-bit):
For the latest version of the AWS CLI: https://awscli.amazonaws.com/AWSCLIV2.msi
For a specific version of the AWS CLI: Append a hyphen and the version number to the filename. For this example, the filename for the version
AWSCLIV2-2.0.30.msiresulting in the following link https://awscli.amazonaws.com/AWSCLIV2-2.0.30.msi. For a list of versions, see the AWS CLI version 2 changelog on GitHub.
Alternatively, you can run the
msiexec command to run the MSI installer.
C:\> msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi
AWS CLI version 1 (32-bit Support)
Download the appropriate MSI installer:
AWS CLI combined setup file for Windows: https://s3.amazonaws.com/aws-cli/AWSCLISetup.exe (includes both the 32-bit and 64-bit MSI installers, and automatically installs the correct version)
Run the downloaded MSI installer.
Follow the on-screen instructions. By default, the AWS CLI version 1 installs to:
C:\Program Files\Amazon\AWSCLI(64-bit version) or
C:\Program Files (x86)\Amazon\AWSCLI(32-bit version)
To confirm the installation, use the
aws --versioncommand at a command prompt (open the Start menu and search for
cmdto start a command prompt).
C:\> aws --version
aws-cli/1.19.3 Python/3.7.4 Windows/10 botocore/1.13
For general use, the
aws configure command is the fastest way to set up your AWS CLI installation. When you enter this command, the AWS CLI prompts you for four pieces of information:
Access key ID
Secret access key <Provided by your
AWS Region <us-west-2>
Output format <default>
The following example shows sample values. Replace them with your own values as described in the following sections.
$ aws configure
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: json
- To copy files from s3 run:
aws s3 cp s3://<bucket>/<folder>/ c:\<local folder> --recursive
- To move files from s3 run:
aws s3 mv s3://<bucket>/<folder>/ c:\<local folder> --recursive
- Open windows task scheduler
Click create basic task and give it a title
Hit next and set a desired schedule
Hit next and select “start a program”
Enter the command "aws” and the parameters from above “s3 mv ..."