Step 1: Install or upgrade Amazon command line tools - Amazon Systems Manager
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Step 1: Install or upgrade Amazon command line tools

This topic is for users who have programmatic access to use Amazon Systems Manager (or any other Amazon service), and who want to run Amazon Command Line Interface (Amazon CLI) or Amazon Tools for Windows PowerShell commands from their local machines. (Programmatic access and console access are different permissions that can be granted to a user account by an Amazon Web Services account administrator. A user can be granted one or both access types. For information, see Create non-Admin IAM users and groups for Systems Manager.)

Tip

As an alternative to running commands from your local machine, you can use Amazon CloudShell. CloudShell is a browser-based, pre-authenticated shell that you can launch directly from the Amazon Web Services Management Console. You can run Amazon CLI commands against Amazon services using your preferred shell (Bash, PowerShell, or Z shell). And you can do this without needing to download or install command line tools. For more information, see the Amazon CloudShell User Guide.

Installing or upgrading and then configuring the Amazon CLI

The Amazon CLI is an open source tool that allows you to interact with Amazon services using commands in your command-line shell. With minimal configuration, the Amazon CLI allows you to start running commands that implement functionality equivalent to that provided by the browser-based Amazon Web Services Management Console from the command prompt in your terminal program.

For more information about the Amazon CLI, see the Amazon Command Line Interface User Guide.

For information about all Systems Manager commands you can run using the Amazon CLI, see the Systems Manager section of the Amazon CLI Command Reference.

Important

Starting January 10th, 2020, Amazon CLI version 1.17 and later no longer support Python 2.6 or Python 3.3. Since that date, the installer for the Amazon CLI requires Python 2.7, Python 3.4, or a later version.

To install or upgrade and then configure the Amazon CLI

  1. Follow the instructions in Installing the Amazon Command Line Interface version 2 in the Amazon Command Line Interface User Guide to install or upgrade the Amazon CLI on your local machine.

    Tip

    The Amazon CLI is frequently updated with new functionality. Upgrade (reinstall) the Amazon CLI periodically to verify that you have access to all the latest functionality.

  2. To configure the Amazon CLI, see Configuring the Amazon Command Line Interface in the Amazon Command Line Interface User Guide.

    In this step, you specify credentials that an Amazon administrator in your organization has given you, in the following format.

    Amazon Access Key ID: AKIAIOSFODNN7EXAMPLE Amazon Secret Access Key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
    Important

    When you configure the Amazon CLI, you're prompted to specify an Amazon Web Services Region. Choose one of the supported Regions listed for Systems Manager in Systems Manager service endpoints in the Amazon Web Services General Reference. If necessary, first verify with an administrator for your Amazon Web Services account which Amazon Web Services Region you should choose.

    For more information about access keys, see Managing access keys for IAM users in the IAM User Guide.

  3. To verify the installation or upgrade, run the following command from the Amazon CLI.

    aws ssm help

    If successful, this command displays a list of available Systems Manager commands.

Installing or upgrading and then configuring the Amazon Tools for PowerShell

The Amazon Tools for PowerShell are a set of PowerShell modules that are built on the functionality exposed by the Amazon SDK for .NET. The Amazon Tools for PowerShell allow you to script operations on your Amazon resources from the PowerShell command line. The cmdlets provide an idiomatic PowerShell experience for specifying parameters and handling results even though they are implemented using the various Amazon service HTTP query APIs.

For information about the Tools for Windows PowerShell, see the Amazon Tools for Windows PowerShell User Guide.

For information about all Systems Manager commands you can run using the Amazon Tools for PowerShell, see the Systems Manager section of the Amazon Tools for PowerShell Cmdlet Reference.

To install or upgrade and then configure the Amazon Tools for PowerShell

  1. Follow the instructions in Installing the Tools for PowerShell in the Amazon Tools for Windows PowerShell User Guide to install or upgrade Tools for PowerShell on your local machine.

    Tip

    Tools for PowerShell is frequently updated with new functionality. Upgrade (reinstall) the Tools for PowerShell periodically to ensure that you have access to all the latest functionality.

  2. To configure Tools for PowerShell, see Using Amazon Credentials in the Amazon Tools for Windows PowerShell User Guide.

    In this step, you specify credentials that an Amazon administrator in your organization has given you, using the following command.

    Set-AWSCredential ` -AccessKey AKIAIOSFODNN7EXAMPLE ` -SecretKey wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY ` -StoreAs MyProfileName
    Important

    When you configure Tools for PowerShell, you can run Set-DefaultAWSRegion to specify an Amazon Web Services Region. Choose one of the supported Regions listed for Systems Manager in Systems Manager service endpoints in the Amazon Web Services General Reference. If necessary, first verify with an administrator for your Amazon Web Services account which Region you should choose.

    For more information about access keys, see Managing access keys for IAM users in the IAM User Guide.

  3. To verify the installation or upgrade, run the following command from Tools for PowerShell.

    Get-AWSCmdletName -Service SSM

    If successful, this command displays a list of available Systems Manager cmdlets.