I followed the link mentioned by you Installing and Running the CloudWatch Agent on Your Servers.
Below is my configuration for pushing the logs and few other metrics, which is generated by this command
Run the CloudWatch Agent Configuration Wizard
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard
{
"agent": {
"metrics_collection_interval": 60,
"run_as_user": "root"
},
"logs": {
"logs_collected": {
"files": {
"collect_list": [
{
"file_path": "/var/log/messages",
"log_group_name": "messages",
"log_stream_name": "{instance_id}"
}
]
}
}
},
"metrics": {
... # metrics configuration here
}
}
Started the client as described in the doc
/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a \
fetch-config -m ec2 -s -c file:///opt/aws/amazon-cloudwatch-agent/bin/config.json
Start the CloudWatch Agent Using the Command Line
# /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a status
{
"status": "running",
"starttime": "2021-03-26T11:46:14+0000",
"version": "1.247345.35"
}

You can look for troubles inside the logs directory if there are any
[root@ip-xx amazon-cloudwatch-agent]# ls
amazon-cloudwatch-agent.log configuration-validation.log state
[root@ip-xx amazon-cloudwatch-agent]# pwd
/var/log/amazon/amazon-cloudwatch-agent
On the side note if I just want to push the logs to cloudwatch, I would use this one
Quick Start: Install and Configure the CloudWatch Logs Agent on a Running EC2 Linux Instance