Before downloading and installing the CloudWatch agent, you need to ensure that your EC2 instance is running at least version 2.2.93.0 of the SSM agent. If you need to update the SSM agent, please follow the instructions at https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-ssm-agent.html.
Another prerequisite is that your EC2 instances need to have outbound internet access to enable them to send data to CloudWatch Logs. The endpoints and port information used for both logging capture and SSM can be found at https://docs.aws.amazon.com/general/latest/gr/rande.html#cwl_region.
Once you have met the prerequisites, you can download the agent using SSM as follows:
- From within the AWS Management Console, navigate to the SSM console found under the Management & Governance category.
- Under Instances & Nodes on the left-hand side, select Run Command:
- In the Command document search field, enter AWS-ConfigureAWSPackage...