When working with our virtual machine instances in EC2, we are provided with standard metrics that can help us determine the performance and state of our instance. For each instance, we are able to enable detailed metrics if required and install a CloudWatch agent that can provide us with custom metrics and the ability to export system and application logs into the CloudWatch Logs component.
By default, the CloudWatch metrics being collected for EC2 instances are any metrics related to CPU, disk, and network utilization as well as the status check that determines the instance health. Most new users to EC2 are astonished to find that no information about memory usage is provided within the CloudWatch metrics. There is a simple reason for that: AWS has no access to the operating system and thus has no way of correctly determining the amount of memory the instance...