Manual installation on Amazon EC2 - Amazon CloudWatch
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 (PDF).

Manual installation on Amazon EC2

Note

Make sure the prerequisites are completed before installing the CloudWatch agent for the first time.

Installing on Amazon Linux using the package manager

You must also make sure that the IAM role attached to the instance has the CloudWatchAgentServerPolicy attached.

Installing on Amazon Linux using the command line

On all supported Linux operating systems, you can download and install the CloudWatch agent using the command line.

  1. wget download-link
    Architecture Platform Download link
    x86-64 Amazon Linux 2023 and Amazon Linux 2 https://amazoncloudwatch-agent.s3.amazonaws.com/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm
    ARM64 Amazon Linux 2023 and Amazon Linux 2 https://amazoncloudwatch-agent.s3.amazonaws.com/amazon_linux/arm64/latest/amazon-cloudwatch-agent.rpm
  2. After you have downloaded the package, you can optionally verify the package signature. For more information, see Verifying the signature of the CloudWatch agent package.

  3. Install the package. If you downloaded an RPM package on a Linux server, change to the directory containing the package and enter the following:

    sudo rpm -U ./amazon-cloudwatch-agent.rpm

    If you downloaded a DEB package on a Linux server, change to the directory containing the package and enter the following:

    sudo dpkg -i -E ./amazon-cloudwatch-agent.deb

Installing on Windows

On Windows Server, you can download and install the CloudWatch agent using the command line.

  1. Download the following file:

    https://amazoncloudwatch-agent.s3.amazonaws.com/windows/amd64/latest/amazon-cloudwatch-agent.msi
  2. After you have downloaded the package, you can optionally verify the package signature. For more information, see Verifying the signature of the CloudWatch agent package.

  3. Install the package. Change to the directory containing the package and enter the following:

    msiexec /i amazon-cloudwatch-agent.msi

    This command also works from within PowerShell. For more information about MSI command options, see Command-Line Options in the Microsoft Windows documentation.

Installing on macOS

On macOS computers, you can download and install the CloudWatch agent using the command line.

  1. Download the appropriate package for your architecture:

    https://amazoncloudwatch-agent.s3.amazonaws.com/darwin/amd64/latest/amazon-cloudwatch-agent.pkg

    For ARM64 architecture:

    https://amazoncloudwatch-agent.s3.amazonaws.com/darwin/arm64/latest/amazon-cloudwatch-agent.pkg
  2. After you have downloaded the package, you can optionally verify the package signature. For more information, see Verifying the signature of the CloudWatch agent package.

  3. Install the package. Change to the directory containing the package and enter the following:

    sudo installer -pkg ./amazon-cloudwatch-agent.pkg -target /