Amazon Elastic Container Service
Developer Guide (API Version 2014-11-13)

Installing the Amazon ECS CLI

Follow these instructions to install the Amazon ECS CLI on your macOS, Linux, or Windows system.

To install the Amazon ECS CLI

  1. Download the binary.

    • For macOS:

      sudo curl -o /usr/local/bin/ecs-cli
    • For Linux systems:

      sudo curl -o /usr/local/bin/ecs-cli
    • For Windows systems:

      Open Windows PowerShell and run the following commands:

      PS C:\> New-Item ‘C:\Program Files\Amazon\ECSCLI’ -type directory PS C:\> Invoke-WebRequest -OutFile ‘C:\Program Files\Amazon\ECSCLI\ecs-cli.exe’


      If you encounter permission issues, ensure you are running PowerShell as Administrator.

  2. (Optional) Verify the downloaded binary with the MD5 sum provided.

    • For macOS (compare the two output strings to verify that they match):

      curl -s && md5 -q /usr/local/bin/ecs-cli
    • For Linux systems (look for an OK in the output string):

      echo "$(curl -s /usr/local/bin/ecs-cli" | md5sum -c -
    • For Windows systems:

      Open Windows PowerShell and find the md5 hash of the executable you downloaded:

      PS C:\> Get-FileHash ecs-cli.exe -Algorithm MD5

      Compare that with this md5 hash:

      PS C:\> Invoke-WebRequest -OutFile md5.txt PS C:\> Get-Content md5.txt
  3. Apply execute permissions to the binary.

    • For macOS and Linux systems:

      sudo chmod +x /usr/local/bin/ecs-cli
    • For Windows systems:

      Edit the environment variables and add C:\Program Files\Amazon\ECSCLI to the PATH variable field, separated from existing entries by using a semicolon. For example:

      C:\existing\path;C:\Program Files\Amazon\ECSCLI

      Restart PowerShell (or the command prompt) so the changes will go into effect.


      Once the PATH variable is set, the ECS CLI can be used from either Windows PowerShell or the command prompt.

  4. Verify that the CLI is working properly.

    ecs-cli --version
  5. Proceed to Configuring the Amazon ECS CLI.


    You must configure the ECS CLI with your AWS credentials, an AWS region, and an Amazon ECS cluster name before you can use it.