Buy being a state manager; you can create configuration policies,
apply them across your infrastructure, and ensure your systems always
remain complaint. The agent you install as part of the EC2 systems
manager is used to execute only management tasks.
As far as your question regarding getting memory stats for your
EC2 instances from CloudWatch, well you can't, since CloudWatch
operates at the hypervisor level, it can't report on OS level
metrics like memory break up(free/used), utilization(%) or swap
usage. To report on these metrics, you can deploy our server
monitoring agent on the instance. By doing this, you can also collect
process data, monitor disk usage for EBS volumes, measure system load
average and a lot more.
You can also script and collect custom metrics for various open
source application services running on top of your EC2 instance.