Installing the CloudWatch agent
You can install the CloudWatch agent on your Amazon EC2 instances, on-premises servers, and in containerized environments to collect metrics, logs, and traces. The agent supports Linux, Windows, and macOS operating systems. There are several ways to install the agent, including using Systems Manager, from the CloudWatch console, installing from the command line, or installing using a configuration file. Before installing, make sure you have the required IAM permissions and network access configured.
Installation method comparison
The following table compares the supported ways to install and maintain the CloudWatch agent. Use it to choose the approach that fits your environment.
Method |
Best for |
Configuration |
Updates |
|---|---|---|---|
SSM Run Command |
Fleets of instances |
Stored in Parameter Store, applied centrally |
Updated via |
Manual download (CLI) |
Single instance or testing |
Local config file on the instance |
Manual re-download and reinstall; generated configuration files are left in place |
Package manager (Linux) |
Linux instances with existing config management |
Local config file |
Configuration preserved across package updates |