1. Create AWS IAMAWS IAM.icon roles or users that enable the agent to collect metrics from the server and optionally to integrate with AWS Systems Manager.
2. Download the agent package.
3. Modify the Amazon CloudWatchAmazon CloudWatch.icon agent configuration file and specify the metrics that you want to collect.
4. Install and start the agent on your servers. As you install the agent on an Amazon EC2Amazon EC2.icon instance, you attach the AWS IAMAWS IAM.icon role that you created in step 1. As you install the agent on an on-premises server, you specify a named profile that contains the credentials of the AWS IAMAWS IAM.icon user that you created in step 1.